Skip to content

HID: cp2112: Cleanups and refactorings

Andy Shevchenko linux-input lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12lib/string_choices: Add str_write_read() helperinclude/linux/string_choices.h+1 -00 replies
2/12HID: cp2112: Use str_write_read() and str_read_write()drivers/hid/hid-cp2112.c+4 -50 replies
3/12HID: cp2112: Make irq_chip immutabledrivers/hid/hid-cp2112.c+20 -130 replies
4/12HID: cp2112: Switch to for_each_set_bit() to simplify the codedrivers/hid/hid-cp2112.c+2 -60 replies
5/12HID: cp2112: Don't call ->to_irq() explicitlydrivers/hid/hid-cp2112.c+3 -40 replies
6/12HID: cp2112: Remove dead codedrivers/hid/hid-cp2112.c+0 -542 replies
7/12HID: cp2112: Define maximum GPIO constant and use itdrivers/hid/hid-cp2112.c+3 -20 replies
8/12HID: cp2112: Define all GPIO mask and use itdrivers/hid/hid-cp2112.c+3 -20 replies
9/12HID: cp2112: Use BIT() in GPIO setter and getterdrivers/hid/hid-cp2112.c+2 -20 replies
10/12HID: cp2112: Use sysfs_emit() to instead of scnprintf()drivers/hid/hid-cp2112.c+1 -10 replies
11/12HID: cp2112: Convert to DEVICE_ATTR_RW()drivers/hid/hid-cp2112.c+19 -230 replies
12/12HID: cp2112: Use octal permissionsdrivers/hid/hid-cp2112.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 00/12] HID: cp2112: Cleanups and refactorings

After I updated GPIO library for the case Benjamin has with CP2112, I have a brief look into the CP2112 driver itself.

From GPIO perspective it has two main (maitenance) issues:
- usage of ->to_irq() with IRQ chip present;
- having IRQ chip not immutable.

Besides that there are plenty small cleanups here and there. Hence this series.

Compile tested only.

Andy Shevchenko (12):
lib/string_choices: Add str_write_read() helper
HID: cp2112: Use str_write_read() and str_read_write()
HID: cp2112: Make irq_chip immutable
HID: cp2112: Switch to for_each_set_bit() to simplify the code
HID: cp2112: Don't call ->to_irq() explicitly
HID: cp2112: Remove dead code
HID: cp2112: Define maximum GPIO constant and use it
HID: cp2112: Define all GPIO mask and use it
HID: cp2112: Use BIT() in GPIO setter and getter
HID: cp2112: Use sysfs_emit() to instead of scnprintf()
HID: cp2112: Convert to DEVICE_ATTR_RW()
HID: cp2112: Use octal permissions

 drivers/hid/hid-cp2112.c       | 169 +++++++++++----------------------
 include/linux/string_choices.h |   1 +
 2 files changed, 58 insertions(+), 112 deletions(-)
Signature · 1 line
2.40.0.1.gaa8946217a0b