All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] leds: Fix pca955x GPIO pin mappings
@ 2021-07-23  7:58 ` Andrew Jeffery
  0 siblings, 0 replies; 39+ messages in thread
From: Andrew Jeffery @ 2021-07-23  7:58 UTC (permalink / raw)
  To: linux-leds, linux-gpio
  Cc: clg, robh+dt, joel, pavel, linus.walleij, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel

Hello,

This series does a bunch of crimes, so it's an RFC. I'm cross-posting to the
pinctrl/GPIO and LEDs lists because the PCA955x devices impact all of them. What
needs fixing is the leds-pca955x driver's failure to map the GPIO numberspace to
the pin numberspace of the PCA955x devices. The series solves that by
implementing pinctrl and pinmux in the leds-pca955x driver.

Things I'm unsure about:

1. Patch 1: The pinctrl_gpio_as_pin() API feels a bit dirty, not sure what
   others thoughts are on that (Linus?).

2. Patch 2: I've added a new callback to hook the entirety of the pinctrl map
   parsing rather than supplying a subnode-specific callback. This was necessary
   to handle the PCA955x devicetree binding in a backwards compatible way.

3. Patch 4: The PCA955x devices don't actually have any pinmux hardware, but the
   properties of the pinctrl/pinmux subsystems in the kernel map nicely onto the
   problem we have. But it's quite a bit of code...

4. Patch 6: I also lost a bunch of time to overlooking the get_group_pins()
   callback for pinctrl, and it seems odd to me that it isn't required.

Please review!

Andrew

Andrew Jeffery (6):
  pinctrl: Add pinctrl_gpio_as_pin()
  pinctrl: Add hook for device-specific map parsing
  leds: pca955x: Relocate chipdef-related descriptors
  leds: pca955x: Use pinctrl to map GPIOs to pins
  ARM: dts: rainier: Add presence-detect and fault indictor GPIO
    expander
  pinctrl: Check get_group_pins callback on init

 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts |  76 +++
 drivers/leds/leds-pca955x.c                  | 554 +++++++++++++++----
 drivers/pinctrl/core.c                       |  28 +-
 include/linux/pinctrl/pinctrl.h              |   4 +
 4 files changed, 566 insertions(+), 96 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-08-11  0:27 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23  7:58 [RFC PATCH 0/6] leds: Fix pca955x GPIO pin mappings Andrew Jeffery
2021-07-23  7:58 ` Andrew Jeffery
2021-07-23  7:58 ` [RFC PATCH 1/6] pinctrl: Add pinctrl_gpio_as_pin() Andrew Jeffery
2021-07-23  7:58   ` Andrew Jeffery
2021-07-23 16:15   ` kernel test robot
2021-08-10 13:34   ` Linus Walleij
2021-08-10 13:34     ` Linus Walleij
2021-08-11  0:24     ` Andrew Jeffery
2021-08-11  0:24       ` Andrew Jeffery
2021-07-23  7:58 ` [RFC PATCH 2/6] pinctrl: Add hook for device-specific map parsing Andrew Jeffery
2021-07-23  7:58   ` Andrew Jeffery
2021-07-23  7:58 ` [RFC PATCH 3/6] leds: pca955x: Relocate chipdef-related descriptors Andrew Jeffery
2021-07-23  7:58   ` Andrew Jeffery
2021-07-23  7:58 ` [RFC PATCH 4/6] leds: pca955x: Use pinctrl to map GPIOs to pins Andrew Jeffery
2021-07-23  7:58   ` Andrew Jeffery
2021-07-23 12:40   ` kernel test robot
2021-07-23 15:24   ` kernel test robot
2021-08-10 13:54   ` Linus Walleij
2021-08-10 13:54     ` Linus Walleij
2021-08-11  0:19     ` Andrew Jeffery
2021-08-11  0:19       ` Andrew Jeffery
2021-07-23  7:58 ` [RFC PATCH 5/6] ARM: dts: rainier: Add presence-detect and fault indictor GPIO expander Andrew Jeffery
2021-07-23  7:58   ` Andrew Jeffery
2021-07-23  7:58 ` [RFC PATCH 6/6] pinctrl: Check get_group_pins callback on init Andrew Jeffery
2021-07-23  7:58   ` Andrew Jeffery
     [not found] ` <CAHp75VeQML7njMZ6x8kC-ZJVexC1xJ6n1cB3JneVMAVfuOJgWw@mail.gmail.com>
2021-07-28  5:43   ` [RFC PATCH 0/6] leds: Fix pca955x GPIO pin mappings Andrew Jeffery
2021-07-28  5:43     ` Andrew Jeffery
2021-07-28  9:13     ` Andy Shevchenko
2021-07-28  9:13       ` Andy Shevchenko
2021-07-29  0:38       ` Andrew Jeffery
2021-07-29  0:38         ` Andrew Jeffery
2021-07-29  7:40         ` Andy Shevchenko
2021-07-29  7:40           ` Andy Shevchenko
2021-08-03  4:07           ` Andrew Jeffery
2021-08-03  4:07             ` Andrew Jeffery
2021-08-03 10:33             ` Andy Shevchenko
2021-08-03 10:33               ` Andy Shevchenko
2021-08-04  4:55               ` Andrew Jeffery
2021-08-04  4:55                 ` Andrew Jeffery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.