From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932439AbdKDAMR (ORCPT ); Fri, 3 Nov 2017 20:12:17 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:45371 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751970AbdKDAMP (ORCPT ); Fri, 3 Nov 2017 20:12:15 -0400 X-Google-Smtp-Source: ABhQp+STJpXpiCCt3Y/1mukV/fstS3fV269D4vuuO85BPRXuD+tNYfzp+NQtLHVTWmC3FytGP6DyMw== Date: Fri, 03 Nov 2017 17:12:08 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20171103172947.15156-1-benjamin.tissoires@redhat.com> References: <20171103172947.15156-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Subject: Re: [PATCH] HID: Wacom: switch Dell canvas into highres mode To: Benjamin Tissoires , Jiri Kosina , Ping Cheng CC: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org From: Jason Gerecke Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vA40CMBg027736 On November 3, 2017 10:29:47 AM PDT, Benjamin Tissoires wrote: >The Dell Canvas exports 2 collections for the Pen part. The only >difference between the 2 is that the default one has half the >resolution >of the second one. > >The Windows driver switches the tablet into the second mode, so we >should >behave the same. > >Signed-off-by: Benjamin Tissoires >--- > >Hi, > >well, this is not the cleanest way of handling this mode set, but it is >the >less intrusive AFAICT. > >I was thinking that we might want to add a new field in struct >wacom_feature, >but then it wouldn't make sense to keep the set mode specifics in >_wacom_query_tablet_data(). > >So I am open to any better suggestion, but this one works and the >impact on >other HID generic tablets is null. > Hmm. Agreed that this isn't ideal. I'd like to take a look at the descriptor, if you wouldn't mind sharing it. The hardware should be similar to other devices of ours and it might be possible to piggyback on existing code. Jason >Cheers, >Benjamin > > drivers/hid/wacom_sys.c | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c >index 906e654fb0ba..ee71ad9b6cc1 100644 >--- a/drivers/hid/wacom_sys.c >+++ b/drivers/hid/wacom_sys.c >@@ -196,6 +196,13 @@ static void wacom_feature_mapping(struct >hid_device *hdev, > kfree(data); > break; > } >+ >+ if (hdev->vendor == USB_VENDOR_ID_WACOM && >+ hdev->product == 0x4200 /* Dell Canvas 27 */ && >+ field->application == HID_UP_MSVENDOR) { >+ wacom->wacom_wac.mode_report = field->report->id; >+ wacom->wacom_wac.mode_value = 2; >+ } > } > > /* -- Sent from my Android device with K-9 Mail. Please excuse my brevity.