linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] leds: gpio: Add devlink between the leds-gpio device and the gpio used.
@ 2024-02-20 11:11 Herve Codina
  2024-02-20 11:11 ` [PATCH 1/2] gpiolib: Introduce gpiod_device_add_link() Herve Codina
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Herve Codina @ 2024-02-20 11:11 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Pavel Machek, Lee Jones
  Cc: linux-gpio, linux-kernel, linux-leds, Luca Ceresoli,
	Thomas Petazzoni, Herve Codina

Hi,

When a gpio used by the leds-gpio device is removed, the leds-gpio
device continues to use this gpio. Also, when the gpio is back, the
leds-gpio still uses the old removed gpio.

A consumer/supplier relationship is missing between the leds-gpio device
(consumer) and the gpio used (supplier).

This series adds an addionnal devlink between this two device.
With this link when the gpio is removed, the leds-gpio device is also
removed.

Best regards,
Hervé Codina

Herve Codina (2):
  gpiolib: Introduce gpiod_device_add_link()
  leds: gpio: Add devlinks between the gpio consumed and the gpio leds
    device

 drivers/gpio/gpiolib.c        | 32 ++++++++++++++++++++++++++++++++
 drivers/leds/leds-gpio.c      | 15 +++++++++++++++
 include/linux/gpio/consumer.h |  5 +++++
 3 files changed, 52 insertions(+)

-- 
2.43.0


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

end of thread, other threads:[~2024-02-21 22:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 11:11 [PATCH 0/2] leds: gpio: Add devlink between the leds-gpio device and the gpio used Herve Codina
2024-02-20 11:11 ` [PATCH 1/2] gpiolib: Introduce gpiod_device_add_link() Herve Codina
2024-02-21 22:44   ` Linus Walleij
2024-02-21 22:58     ` Saravana Kannan
2024-02-20 11:11 ` [PATCH 2/2] leds: gpio: Add devlinks between the gpio consumed and the gpio leds device Herve Codina
2024-02-21 22:45   ` Linus Walleij
2024-02-20 11:40 ` [PATCH 0/2] leds: gpio: Add devlink between the leds-gpio device and the gpio used Bartosz Golaszewski
2024-02-20 13:36   ` Herve Codina

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