mbox series

[v2,0/6] HID: Misc. fixes

Message ID 20210505213935.631351-1-hdegoede@redhat.com (mailing list archive)
Headers show
Series HID: Misc. fixes | expand

Message

Hans de Goede May 5, 2021, 9:39 p.m. UTC
Hi Jiri, Benjamin,

Here is v2 of what started out as a small series to fix spurious wakeups
on T101HA 2-in-1s.

This adds the discussed hid_is_usb_device() helper and uses that in:

"HID: multitouch: Disable event reporting on suspend when our parent is
not a wakeup-source"

To avoid needing to add a "depends on USB_HID" to hid-multitouch Kconfig
settings.

I've checked all other hid_is_using_ll_driver(hdev, &usb_hid_driver) callers
and the only one which can truely benefit from the new helper is the
hid-asus driver, which also deals with some I2C devices on some Asus hw.

All other drivers using hid_is_using_ll_driver(hdev, &usb_hid_driver)
are only for USB devices, so dropping the "depends on USB_HID" does not
make sense for them.

The one other driver which may benefit from the new hid_is_usb_device()
helper would be the Wacom driver which seems to also support I2C devices,
but that contains a lot of USB specific code, so I don't think we can
easily drop the "depends on USB_HID" there.

Even though this is a bit if a mixed-bag of patches, their are several
dependencies between them, so these should probably all go on a single
topic branch.

Regards,

Hans


Hans de Goede (6):
  HID: core: Remove extraneous empty line before
    EXPORT_SYMBOL_GPL(hid_check_keys_pressed)
  HID: core: Add a hid_is_usb_device() helper function
  HID: multitouch: Disable event reporting on suspend on the Asus T101HA
    touchpad
  HID: multitouch: Disable event reporting on suspend when our parent is
    not a wakeup-source
  HID: asus: Cleanup Asus T101HA keyboard-dock handling
  HID: asus: Switch to the new hid_is_usb_device() helper

 drivers/hid/Kconfig          |  2 +-
 drivers/hid/hid-asus.c       | 26 ++++++++-----------
 drivers/hid/hid-core.c       | 11 +++++++-
 drivers/hid/hid-multitouch.c | 49 ++++++++++++++++++++++++++++++++++--
 include/linux/hid.h          |  1 +
 5 files changed, 70 insertions(+), 19 deletions(-)

Comments

Jiri Kosina May 26, 2021, 10:38 a.m. UTC | #1
On Wed, 5 May 2021, Hans de Goede wrote:

> Hi Jiri, Benjamin,
> 
> Here is v2 of what started out as a small series to fix spurious wakeups
> on T101HA 2-in-1s.
> 
> This adds the discussed hid_is_usb_device() helper and uses that in:
> 
> "HID: multitouch: Disable event reporting on suspend when our parent is
> not a wakeup-source"
> 
> To avoid needing to add a "depends on USB_HID" to hid-multitouch Kconfig
> settings.
> 
> I've checked all other hid_is_using_ll_driver(hdev, &usb_hid_driver) callers
> and the only one which can truely benefit from the new helper is the
> hid-asus driver, which also deals with some I2C devices on some Asus hw.
> 
> All other drivers using hid_is_using_ll_driver(hdev, &usb_hid_driver)
> are only for USB devices, so dropping the "depends on USB_HID" does not
> make sense for them.
> 
> The one other driver which may benefit from the new hid_is_usb_device()
> helper would be the Wacom driver which seems to also support I2C devices,
> but that contains a lot of USB specific code, so I don't think we can
> easily drop the "depends on USB_HID" there.
> 
> Even though this is a bit if a mixed-bag of patches, their are several
> dependencies between them, so these should probably all go on a single
> topic branch.

Now in for-5.13/upstream-fixes. Thanks,
Hans de Goede May 26, 2021, 10:46 a.m. UTC | #2
Hi,

On 5/26/21 12:38 PM, Jiri Kosina wrote:
> On Wed, 5 May 2021, Hans de Goede wrote:
> 
>> Hi Jiri, Benjamin,
>>
>> Here is v2 of what started out as a small series to fix spurious wakeups
>> on T101HA 2-in-1s.
>>
>> This adds the discussed hid_is_usb_device() helper and uses that in:
>>
>> "HID: multitouch: Disable event reporting on suspend when our parent is
>> not a wakeup-source"
>>
>> To avoid needing to add a "depends on USB_HID" to hid-multitouch Kconfig
>> settings.
>>
>> I've checked all other hid_is_using_ll_driver(hdev, &usb_hid_driver) callers
>> and the only one which can truely benefit from the new helper is the
>> hid-asus driver, which also deals with some I2C devices on some Asus hw.
>>
>> All other drivers using hid_is_using_ll_driver(hdev, &usb_hid_driver)
>> are only for USB devices, so dropping the "depends on USB_HID" does not
>> make sense for them.
>>
>> The one other driver which may benefit from the new hid_is_usb_device()
>> helper would be the Wacom driver which seems to also support I2C devices,
>> but that contains a lot of USB specific code, so I don't think we can
>> easily drop the "depends on USB_HID" there.
>>
>> Even though this is a bit if a mixed-bag of patches, their are several
>> dependencies between them, so these should probably all go on a single
>> topic branch.
> 
> Now in for-5.13/upstream-fixes. Thanks,

Thank you, it seems that in the process of dropping the patches which
you had already merged from v1 of this series; and replacing them with v2,
you completely dropped:

[PATCH v2 5/6] HID: asus: Cleanup Asus T101HA keyboard-dock handling

(which was also in v1) at least I cannot find this in either one of:

https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/drivers/hid/hid-asus.c?h=for-next
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/drivers/hid/hid-asus.c?h=for-5.13/upstream-fixes

Regards,

Hans
Jiri Kosina May 26, 2021, 11:06 a.m. UTC | #3
On Wed, 26 May 2021, Hans de Goede wrote:

> >> Hi Jiri, Benjamin,
> >>
> >> Here is v2 of what started out as a small series to fix spurious wakeups
> >> on T101HA 2-in-1s.
> >>
> >> This adds the discussed hid_is_usb_device() helper and uses that in:
> >>
> >> "HID: multitouch: Disable event reporting on suspend when our parent is
> >> not a wakeup-source"
> >>
> >> To avoid needing to add a "depends on USB_HID" to hid-multitouch Kconfig
> >> settings.
> >>
> >> I've checked all other hid_is_using_ll_driver(hdev, &usb_hid_driver) callers
> >> and the only one which can truely benefit from the new helper is the
> >> hid-asus driver, which also deals with some I2C devices on some Asus hw.
> >>
> >> All other drivers using hid_is_using_ll_driver(hdev, &usb_hid_driver)
> >> are only for USB devices, so dropping the "depends on USB_HID" does not
> >> make sense for them.
> >>
> >> The one other driver which may benefit from the new hid_is_usb_device()
> >> helper would be the Wacom driver which seems to also support I2C devices,
> >> but that contains a lot of USB specific code, so I don't think we can
> >> easily drop the "depends on USB_HID" there.
> >>
> >> Even though this is a bit if a mixed-bag of patches, their are several
> >> dependencies between them, so these should probably all go on a single
> >> topic branch.
> > 
> > Now in for-5.13/upstream-fixes. Thanks,
> 
> Thank you, it seems that in the process of dropping the patches which
> you had already merged from v1 of this series; and replacing them with v2,
> you completely dropped:
> 
> [PATCH v2 5/6] HID: asus: Cleanup Asus T101HA keyboard-dock handling
> 
> (which was also in v1) at least I cannot find this in either one of:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/drivers/hid/hid-asus.c?h=for-next
> https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/drivers/hid/hid-asus.c?h=for-5.13/upstream-fixes

It will appear there shortly, not the full state of my tree has been 
mirrored out yet.

Thanks a lot for double-checking!