* [PATCH 2/5] input: wacom - remove pressure for touch devices @ 2011-08-13 0:08 Ping Cheng 2011-08-15 3:27 ` Chris Bagwell 0 siblings, 1 reply; 4+ messages in thread From: Ping Cheng @ 2011-08-13 0:08 UTC (permalink / raw) To: linux-input; +Cc: dmitry.torokhov, Ping Cheng, Ping Cheng Touch devices do not report valid pressure or capacitance. Signed-off-by: Ping Cheng <pingc@wacom.com> --- drivers/input/tablet/wacom_sys.c | 14 -------------- drivers/input/tablet/wacom_wac.c | 6 +++--- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 449c0a4..36001eb 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -228,13 +228,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi get_unaligned_le16(&report[i + 3]); i += 4; } - } else if (usage == WCM_DIGITIZER) { - /* max pressure isn't reported - features->pressure_max = (unsigned short) - (report[i+4] << 8 | report[i + 3]); - */ - features->pressure_max = 255; - i += 4; } break; @@ -290,13 +283,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi pen = 1; i++; break; - - case HID_USAGE_UNDEFINED: - if (usage == WCM_DESKTOP && finger) /* capacity */ - features->pressure_max = - get_unaligned_le16(&report[i + 3]); - i += 4; - break; } break; diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index c1c2f7b..3eccf21 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -818,7 +818,6 @@ static int wacom_bpt_touch(struct wacom_wac *wacom) x <<= 5; y <<= 5; } - input_report_abs(input, ABS_MT_PRESSURE, p); input_report_abs(input, ABS_MT_POSITION_X, x); input_report_abs(input, ABS_MT_POSITION_Y, y); } @@ -1056,10 +1055,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, features->x_fuzz, 0); input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, features->y_fuzz, 0); - input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, - features->pressure_fuzz, 0); if (features->device_type == BTN_TOOL_PEN) { + input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, + features->pressure_fuzz, 0); + /* penabled devices have fixed resolution for each model */ input_abs_set_res(input_dev, ABS_X, features->x_resolution); input_abs_set_res(input_dev, ABS_Y, features->y_resolution); -- 1.7.6 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/5] input: wacom - remove pressure for touch devices 2011-08-13 0:08 [PATCH 2/5] input: wacom - remove pressure for touch devices Ping Cheng @ 2011-08-15 3:27 ` Chris Bagwell [not found] ` <CAF8JNh+90K2Qfpzu9Rwt_cdvqxTxaF8iJJ2-=nmWY8qLL6Wmzg@mail.gmail.com> 0 siblings, 1 reply; 4+ messages in thread From: Chris Bagwell @ 2011-08-15 3:27 UTC (permalink / raw) To: Ping Cheng; +Cc: linux-input, dmitry.torokhov, Ping Cheng On Fri, Aug 12, 2011 at 7:08 PM, Ping Cheng <pinglinux@gmail.com> wrote: > Touch devices do not report valid pressure or capacitance. > > Signed-off-by: Ping Cheng <pingc@wacom.com> > --- I'd prefer if we kept pressure support. At least for Bamboo's with product ID between 0xd0 and 0xd4. In my testing of an 0xd1 device, pressure works fine (low pressure and high pressure work great. Not much middle pressure sensitivity. Multi-touch will increase pressure reading. All pretty common behaviour). I don't use the pressure in day-to-day usage but do use it to drive testing of pressure features of some apps/drivers and so don't want to lose it. >From looking at the touch data on Bamboo's > 0xd4 that people have emailed me, it looks like pressure data was removed from firmware so a version of this patch will be useful for those. But that patch needs to also change the way it parses the touch data to reduce from 8-bits to 1-bit. Chris ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CAF8JNh+90K2Qfpzu9Rwt_cdvqxTxaF8iJJ2-=nmWY8qLL6Wmzg@mail.gmail.com>]
* Re: [PATCH 2/5] input: wacom - remove pressure for touch devices [not found] ` <CAF8JNh+90K2Qfpzu9Rwt_cdvqxTxaF8iJJ2-=nmWY8qLL6Wmzg@mail.gmail.com> @ 2011-08-17 6:50 ` Dmitry Torokhov [not found] ` <CAF8JNh+dpmh50ixyNKtVNL-ZGVZg3rfjbyvnVAi790nwvFCJVA@mail.gmail.com> 0 siblings, 1 reply; 4+ messages in thread From: Dmitry Torokhov @ 2011-08-17 6:50 UTC (permalink / raw) To: Ping Cheng; +Cc: Chris Bagwell, linux-input, Jason Gerecke On Mon, Aug 15, 2011 at 09:34:23PM -0700, Ping Cheng wrote: > On Sun, Aug 14, 2011 at 8:27 PM, Chris Bagwell <chris@cnpbagwell.com> wrote: > > > On Fri, Aug 12, 2011 at 7:08 PM, Ping Cheng <pinglinux@gmail.com> wrote: > > > Touch devices do not report valid pressure or capacitance. > > > > > > Signed-off-by: Ping Cheng <pingc@wacom.com> > > > --- > > > > I'd prefer if we kept pressure support. At least for Bamboo's with > > product ID between 0xd0 and 0xd4. > > > > In my testing of an 0xd1 device, pressure works fine (low pressure and > > high pressure work great. Not much middle pressure sensitivity. > > Multi-touch will increase pressure reading. All pretty common > > behaviour). > > > > Basically, there were three reasons to remove the pressure bit for all touch > devices: > > 1. The value is not a pressure and it does not report valid capacitance > either; > 2. The only valid use in the kernel driver is to decide if the finger is > touching the tablet or not, which has already been correctly reported by the > firmware in the other bits. So, it is redundant to check the pressure for > this purpose; > 3. Passing the invalid "pressure" to the user land would only introduce > bad user experience since touch is not designed for drawing. We don't want > to confuse user with that "pressure". Not speaking about touch per se, but pressure is important for other things besides drawing. Different people prefer different device sensitivity and if userspace knows pressure it can adjust according to user preference, like synaptics X driver does with touchpads that actually report it. I believe tslib allows similar for touchscreens. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CAF8JNh+dpmh50ixyNKtVNL-ZGVZg3rfjbyvnVAi790nwvFCJVA@mail.gmail.com>]
* Re: [PATCH 2/5] input: wacom - remove pressure for touch devices [not found] ` <CAF8JNh+dpmh50ixyNKtVNL-ZGVZg3rfjbyvnVAi790nwvFCJVA@mail.gmail.com> @ 2011-08-17 16:21 ` Dmitry Torokhov 0 siblings, 0 replies; 4+ messages in thread From: Dmitry Torokhov @ 2011-08-17 16:21 UTC (permalink / raw) To: Ping Cheng; +Cc: Chris Bagwell, linux-input, Jason Gerecke On Wed, Aug 17, 2011 at 08:32:28AM -0700, Ping Cheng wrote: > On Tue, Aug 16, 2011 at 11:50 PM, Dmitry Torokhov <dmitry.torokhov@gmail.com > > wrote: > > > On Mon, Aug 15, 2011 at 09:34:23PM -0700, Ping Cheng wrote: > > > On Sun, Aug 14, 2011 at 8:27 PM, Chris Bagwell <chris@cnpbagwell.com> > > wrote: > > > > > > > On Fri, Aug 12, 2011 at 7:08 PM, Ping Cheng <pinglinux@gmail.com> > > wrote: > > > > > Touch devices do not report valid pressure or capacitance. > > > > > > > > > > Signed-off-by: Ping Cheng <pingc@wacom.com> > > > > > --- > > > > > > > > I'd prefer if we kept pressure support. At least for Bamboo's with > > > > product ID between 0xd0 and 0xd4. > > > > > > > > In my testing of an 0xd1 device, pressure works fine (low pressure and > > > > high pressure work great. Not much middle pressure sensitivity. > > > > Multi-touch will increase pressure reading. All pretty common > > > > behaviour). > > > > > > > > > > Basically, there were three reasons to remove the pressure bit for all > > touch > > > devices: > > > > > > 1. The value is not a pressure and it does not report valid capacitance > > > either; > > > 2. The only valid use in the kernel driver is to decide if the finger > > is > > > touching the tablet or not, which has already been correctly reported by > > the > > > firmware in the other bits. So, it is redundant to check the pressure for > > > this purpose; > > > 3. Passing the invalid "pressure" to the user land would only introduce > > > bad user experience since touch is not designed for drawing. We don't > > want > > > to confuse user with that "pressure". > > > > Not speaking about touch per se, but pressure is important for other > > things besides drawing. Different people prefer different device > > sensitivity and if userspace knows pressure it can adjust according to > > user preference, like synaptics X driver does with touchpads that > > actually report it. I believe tslib allows similar for touchscreens. > > > > Your suggestion is based on the assumption that the value is pressure. I did not make any assumptions, I was just making general observation that if pressure data is available it is useful not only for drawing applications. > But > that is not true. The value is not pressure and it is unreliable. So what is this data then? Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-17 16:22 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-13 0:08 [PATCH 2/5] input: wacom - remove pressure for touch devices Ping Cheng 2011-08-15 3:27 ` Chris Bagwell [not found] ` <CAF8JNh+90K2Qfpzu9Rwt_cdvqxTxaF8iJJ2-=nmWY8qLL6Wmzg@mail.gmail.com> 2011-08-17 6:50 ` Dmitry Torokhov [not found] ` <CAF8JNh+dpmh50ixyNKtVNL-ZGVZg3rfjbyvnVAi790nwvFCJVA@mail.gmail.com> 2011-08-17 16:21 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).