| Message ID | 20250512-dev-adp5589-fw-v3-0-092b14b79a88@analog.com |
|---|---|
| Headers | show |
| Series | mfd: adp5585: support keymap events and drop legacy Input driver | expand |
On Mon, 12 May 2025, Nuno Sá via B4 Relay wrote: > Hi all, > > Here it goes v3. There was some major refactoring in this version due to > Lee's and Laurent's feedback. There are some splits (and some explicit > requests) resulting in new patches being added. The biggest change is the > effort in trying to minimize the usage of specific child device bits in > the top level device (mainly stuff related to the keymap). I think now > it's fairly self contained and the only thing that we really need to > handle in the top device are the unlock and reset events as those can be > supported through both the input and gpio devices (via gpio_keys). This > results in a bit of more runtime complexity but well, that's life... > > Another change is Lee's suggestion of making use of templates (for > regmap and chip specific data) and fill things up at probe. > > I also refactored a bit the event handling so it's more generic now. > There were lot's of changes so odds are that I might have forgotten some > feedback and so, my apologies in advance :). > > I also dropped the tags in: > > patch 16/22 ("gpio: adp5585: support gpi events") as it has some > significant changes (replacing .init_valid_masks() with .request() and > .free()) Please run this set through checkpatch.pl before submitting again. Not sure if we've discussed this, but W=1 wouldn't hurt either.
On Wed, 2025-05-14 at 09:25 +0100, Lee Jones wrote: > On Mon, 12 May 2025, Nuno Sá via B4 Relay wrote: > > > Hi all, > > > > Here it goes v3. There was some major refactoring in this version due to > > Lee's and Laurent's feedback. There are some splits (and some explicit > > requests) resulting in new patches being added. The biggest change is the > > effort in trying to minimize the usage of specific child device bits in > > the top level device (mainly stuff related to the keymap). I think now > > it's fairly self contained and the only thing that we really need to > > handle in the top device are the unlock and reset events as those can be > > supported through both the input and gpio devices (via gpio_keys). This > > results in a bit of more runtime complexity but well, that's life... > > > > Another change is Lee's suggestion of making use of templates (for > > regmap and chip specific data) and fill things up at probe. > > > > I also refactored a bit the event handling so it's more generic now. > > There were lot's of changes so odds are that I might have forgotten some > > feedback and so, my apologies in advance :). > > > > I also dropped the tags in: > > > > patch 16/22 ("gpio: adp5585: support gpi events") as it has some > > significant changes (replacing .init_valid_masks() with .request() and > > .free()) > > Please run this set through checkpatch.pl before submitting again. > I've done that... It gave some issues but not sure there's anything to be done: ● 26ffbc19b2ce: mfd: adp5585: refactor how regmap defaults are handled ● checkpatch.pl: drivers/mfd/adp5585.c:94: WARNING: struct regmap_config should normally be const ● checkpatch.pl: drivers/mfd/adp5585.c:149: WARNING: struct regmap_config should normally be const The above is something we need given that we want to fill reg defaults during probe. Maybe we can go around that but not sure if it's worth it. ● 6183fc9ef938: gpio: adp5585: add support for the adp5589 expander ● checkpatch.pl: drivers/gpio/gpio-adp5585.c:26: CHECK: Macro argument reuse 'n' - possible side-effects? Again, not sure it's worth it to "fix" it and it was just copy pasted from the header. ● 3e0f3ba80ea5: Input: adp5589: remove the driver ● checkpatch.pl: drivers/input/keyboard/adp5589-keys.c:14: WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? the above is lack of an entry in the original file... > Not sure if we've discussed this, but W=1 wouldn't hurt either. I used the kernel test bot... I assume W=1 is part of the builds. - Nuno Sá
On Mon, 12 May 2025 13:38:52 +0100, Nuno Sá wrote: > Here it goes v3. There was some major refactoring in this version due to > Lee's and Laurent's feedback. There are some splits (and some explicit > requests) resulting in new patches being added. The biggest change is the > effort in trying to minimize the usage of specific child device bits in > the top level device (mainly stuff related to the keymap). I think now > it's fairly self contained and the only thing that we really need to > handle in the top device are the unlock and reset events as those can be > supported through both the input and gpio devices (via gpio_keys). This > results in a bit of more runtime complexity but well, that's life... > > [...] Applied, thanks! [01/22] dt-bindings: mfd: adp5585: ease on the required properties commit: 09d55a54b466d60a71573c78a99a901410ef73e0 [02/22] mfd: adp5585: only add devices given in FW (no commit info) [03/22] mfd: adp5585: enable oscilator during probe (no commit info) [04/22] pwm: adp5585: don't control OSC_EN in the pwm driver (no commit info) [05/22] mfd: adp5585: make use of MFD_CELL_NAME() (no commit info) [06/22] dt-bindings: mfd: adp5585: document adp5589 I/O expander commit: e65e2b0d0f7e75c40f426e0f3e0a1bb6faff93e6 [07/22] mfd: adp5585: refactor how regmap defaults are handled (no commit info) [08/22] mfd: adp5585: add support for adp5589 (no commit info) [09/22] mfd: adp5585: add a per chip reg struture (no commit info) [10/22] gpio: adp5585: add support for the adp5589 expander commit: 9f425bf713b511b1078e0fea5a88c497e13dbb64 [11/22] pwm: adp5585: add support for adp5589 commit: 75024f97e82e63d02b0743500efb1e264a1c2dd4 [12/22] dt-bindings: mfd: adp5585: add properties for input events commit: adf4932bc97ec9363dc5c0f8390ee5caccf0f41b [13/22] mfd: adp5585: add support for event handling (no commit info) [14/22] mfd: adp5585: support reset and unlock events (no commit info) [15/22] mfd: adp5585: add support for input devices (no commit info) [16/22] gpio: adp5585: support gpi events commit: 988b28a83b658137e58123f4dafc3a1588e1cb2b [17/22] Input: adp5585: Add Analog Devices ADP5585/89 support commit: 19298ac01306e564b48df9aa239731cf967298d2 [18/22] Input: adp5589: remove the driver commit: 3bdbd0858df6574b71cacaac073f117d65a36dc6 [19/22] mfd: adp5585: support getting vdd regulator (no commit info) [20/22] dt-bindings: mfd: adp5585: document reset gpio commit: ce262d6d629a926c8c9a2075af3b9a270ab6c641 [21/22] mfd: adp5585: add support for a reset pin (no commit info) [22/22] pwm: adp5585: make sure to include mod_devicetable.h (no commit info) -- Lee Jones [李琼斯]
Hi all, Here it goes v3. There was some major refactoring in this version due to Lee's and Laurent's feedback. There are some splits (and some explicit requests) resulting in new patches being added. The biggest change is the effort in trying to minimize the usage of specific child device bits in the top level device (mainly stuff related to the keymap). I think now it's fairly self contained and the only thing that we really need to handle in the top device are the unlock and reset events as those can be supported through both the input and gpio devices (via gpio_keys). This results in a bit of more runtime complexity but well, that's life... Another change is Lee's suggestion of making use of templates (for regmap and chip specific data) and fill things up at probe. I also refactored a bit the event handling so it's more generic now. There were lot's of changes so odds are that I might have forgotten some feedback and so, my apologies in advance :). I also dropped the tags in: patch 16/22 ("gpio: adp5585: support gpi events") as it has some significant changes (replacing .init_valid_masks() with .request() and .free()) Thanks! - Nuno Sá --- Changes in v3: - Patch 2: * New patch (only add devices given in DT). - Patch 5: * Don't include adp5585-keys (still not present at this point). - Patch 6: * Alphabetical order for compatibles. - Patch 7: * New patch. Refactor regmap_config and fill variant differences at probe. - Patch 8: * Rework according to changes introduced in patch 7; * Drop the regs struct in this patch. - Patch 9: * New patch. Add a per chip register structure. - Patch 10: * Moved the per variant gpio register into the gpio driver; * Moved ADP558[59]_GPIO_{BANK_BIT} into the gpio driver; * Moved ADP5589_GPIO_MAX and dropped the max_{col|row}. - Patch 11: * Moved the per variant pwm register into the pwm driver (hence adding a chip_info struct. - Patch 12: * Renamed the -keys suffix in the unlock/reset to events as that's the code we give in dt. - Patch 13: * New patch (add event handling in a more generic way). - Patch 14: * Support reset and unlock events in a separate patch; * Reworked how these events are validated. - Patch 15: * Add support for input devices in it's own patch; * Add a bitmap for marking pins busy so there's no overlaps between the input and gpio devices. - Patch 16: * Drop .init_valid_mask() and use .free() and .request() for checking pin availability; * Drop max_gpios variables as that info is now available from the top device; * Adapt events handling to the new code. - Patch 17: * Moved DT pin parsing into the input driver; * Validate reset/unlock events that are generated by the keymap; * Use error instead of ret; * Drop call to input_set_drvdata(); * Adapt events handling to the new code. - Patch 20: * Add a comment on the reset sleep time. - Link to v2: https://lore.kernel.org/r/20250415-dev-adp5589-fw-v2-0-3a799c3ed812@analog.com - Link to v1: https://lore.kernel.org/r/20250313-dev-adp5589-fw-v1-0-20e80d4bd4ea@analog.com --- Nuno Sá (22): dt-bindings: mfd: adp5585: ease on the required properties mfd: adp5585: only add devices given in FW mfd: adp5585: enable oscilator during probe pwm: adp5585: don't control OSC_EN in the pwm driver mfd: adp5585: make use of MFD_CELL_NAME() dt-bindings: mfd: adp5585: document adp5589 I/O expander mfd: adp5585: refactor how regmap defaults are handled mfd: adp5585: add support for adp5589 mfd: adp5585: add a per chip reg struture gpio: adp5585: add support for the adp5589 expander pwm: adp5585: add support for adp5589 dt-bindings: mfd: adp5585: add properties for input events mfd: adp5585: add support for event handling mfd: adp5585: support reset and unlock events mfd: adp5585: add support for input devices gpio: adp5585: support gpi events Input: adp5585: Add Analog Devices ADP5585/89 support Input: adp5589: remove the driver mfd: adp5585: support getting vdd regulator dt-bindings: mfd: adp5585: document reset gpio mfd: adp5585: add support for a reset pin pwm: adp5585: make sure to include mod_devicetable.h .../devicetree/bindings/mfd/adi,adp5585.yaml | 240 ++++- .../devicetree/bindings/trivial-devices.yaml | 2 - MAINTAINERS | 1 + drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-adp5585.c | 348 ++++++- drivers/input/keyboard/Kconfig | 21 +- drivers/input/keyboard/Makefile | 2 +- drivers/input/keyboard/adp5585-keys.c | 356 +++++++ drivers/input/keyboard/adp5589-keys.c | 1066 -------------------- drivers/mfd/adp5585.c | 794 ++++++++++++++- drivers/pwm/pwm-adp5585.c | 79 +- include/linux/mfd/adp5585.h | 148 ++- 12 files changed, 1852 insertions(+), 1206 deletions(-) --- base-commit: 407f60a151df3c44397e5afc0111eb9b026c38d3 change-id: 20250311-dev-adp5589-fw-e04cfd945286 -- Thanks! - Nuno Sá