linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/22] mfd: adp5585: support keymap events and drop legacy Input driver
@ 2025-05-12 12:38 Nuno Sá via B4 Relay
  2025-05-12 12:38 ` [PATCH v3 01/22] dt-bindings: mfd: adp5585: ease on the required properties Nuno Sá via B4 Relay
                   ` (23 more replies)
  0 siblings, 24 replies; 63+ messages in thread
From: Nuno Sá via B4 Relay @ 2025-05-12 12:38 UTC (permalink / raw)
  To: linux-gpio, linux-pwm, devicetree, linux-input
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Uwe Kleine-König, Linus Walleij, Bartosz Golaszewski,
	Dmitry Torokhov, Laurent Pinchart, Liu Ying, Bartosz Golaszewski,
	Krzysztof Kozlowski

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á



^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2025-07-02 13:35 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 12:38 [PATCH v3 00/22] mfd: adp5585: support keymap events and drop legacy Input driver Nuno Sá via B4 Relay
2025-05-12 12:38 ` [PATCH v3 01/22] dt-bindings: mfd: adp5585: ease on the required properties Nuno Sá via B4 Relay
2025-05-12 12:38 ` [PATCH v3 02/22] mfd: adp5585: only add devices given in FW Nuno Sá via B4 Relay
2025-05-13 14:34   ` Lee Jones
2025-05-13 15:02     ` Nuno Sá
2025-05-13 15:19       ` Laurent Pinchart
2025-05-13 15:37         ` Nuno Sá
2025-05-13 16:12         ` Lee Jones
2025-05-12 12:38 ` [PATCH v3 03/22] mfd: adp5585: enable oscilator during probe Nuno Sá via B4 Relay
2025-05-13 14:26   ` Lee Jones
2025-05-13 14:52     ` Nuno Sá
2025-05-13 16:07       ` Lee Jones
2025-05-13 15:24   ` Laurent Pinchart
2025-05-13 15:38     ` Nuno Sá
2025-05-12 12:38 ` [PATCH v3 04/22] pwm: adp5585: don't control OSC_EN in the pwm driver Nuno Sá via B4 Relay
2025-05-13 15:26   ` Laurent Pinchart
2025-05-13 15:39     ` Nuno Sá
2025-05-13 16:04       ` Lee Jones
2025-05-12 12:38 ` [PATCH v3 05/22] mfd: adp5585: make use of MFD_CELL_NAME() Nuno Sá via B4 Relay
2025-05-13 14:39   ` Lee Jones
2025-05-13 14:50     ` Nuno Sá
2025-05-12 12:38 ` [PATCH v3 06/22] dt-bindings: mfd: adp5585: document adp5589 I/O expander Nuno Sá via B4 Relay
2025-05-12 12:38 ` [PATCH v3 07/22] mfd: adp5585: refactor how regmap defaults are handled Nuno Sá via B4 Relay
2025-05-13 15:00   ` Lee Jones
2025-05-13 15:02     ` Lee Jones
2025-05-13 15:32     ` Nuno Sá
2025-05-13 15:36       ` Laurent Pinchart
2025-05-13 16:03         ` Lee Jones
2025-05-13 15:35     ` Laurent Pinchart
2025-05-13 15:41       ` Nuno Sá
2025-05-12 12:39 ` [PATCH v3 08/22] mfd: adp5585: add support for adp5589 Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 09/22] mfd: adp5585: add a per chip reg struture Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 10/22] gpio: adp5585: add support for the adp5589 expander Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 11/22] pwm: adp5585: add support for adp5589 Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 12/22] dt-bindings: mfd: adp5585: add properties for input events Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 13/22] mfd: adp5585: add support for event handling Nuno Sá via B4 Relay
2025-05-13 15:59   ` Lee Jones
2025-05-15  5:56     ` Nuno Sá
2025-05-15  6:14     ` Nuno Sá
2025-05-12 12:39 ` [PATCH v3 14/22] mfd: adp5585: support reset and unlock events Nuno Sá via B4 Relay
2025-05-13 16:22   ` Lee Jones
2025-05-14  8:35     ` Laurent Pinchart
2025-05-14  8:46       ` Lee Jones
2025-05-15  5:46       ` Nuno Sá
2025-05-12 12:39 ` [PATCH v3 15/22] mfd: adp5585: add support for input devices Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 16/22] gpio: adp5585: support gpi events Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 17/22] Input: adp5585: Add Analog Devices ADP5585/89 support Nuno Sá via B4 Relay
2025-05-19 22:29   ` Dmitry Torokhov
2025-05-20  8:32     ` Nuno Sá
2025-05-20 18:33       ` Dmitry Torokhov
2025-05-21 10:06         ` Nuno Sá
2025-05-12 12:39 ` [PATCH v3 18/22] Input: adp5589: remove the driver Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 19/22] mfd: adp5585: support getting vdd regulator Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 20/22] dt-bindings: mfd: adp5585: document reset gpio Nuno Sá via B4 Relay
2025-05-12 12:39 ` [PATCH v3 21/22] mfd: adp5585: add support for a reset pin Nuno Sá via B4 Relay
2025-05-13 16:26   ` Lee Jones
2025-05-15  5:39     ` Nuno Sá
2025-05-12 12:39 ` [PATCH v3 22/22] pwm: adp5585: make sure to include mod_devicetable.h Nuno Sá via B4 Relay
2025-05-19 16:11   ` Uwe Kleine-König
2025-05-19 16:19     ` Nuno Sá
2025-05-14  8:25 ` [PATCH v3 00/22] mfd: adp5585: support keymap events and drop legacy Input driver Lee Jones
2025-05-14 11:04   ` Nuno Sá
2025-07-02 13:34 ` Lee Jones

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).