lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240220164730.03412479@bootlin.com>
Date: Tue, 20 Feb 2024 16:47:30 +0100
From: Herve Codina <herve.codina@...tlin.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Linus Walleij <linus.walleij@...aro.org>, Pavel Machek <pavel@....cz>,
 Lee Jones <lee@...nel.org>, Saravana Kannan <saravanak@...gle.com>,
 linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-leds@...r.kernel.org, Luca Ceresoli <luca.ceresoli@...tlin.com>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH RESEND 0/2] leds: gpio: Add devlink between the
 leds-gpio device and the gpio used.

Hi Bartosz,

On Tue, 20 Feb 2024 16:30:11 +0100
Bartosz Golaszewski <brgl@...ev.pl> wrote:

> On Tue, Feb 20, 2024 at 3:53 PM Herve Codina <herve.codina@...tlin.com> wrote:
> >
> > On Tue, 20 Feb 2024 15:19:57 +0100
> > Bartosz Golaszewski <brgl@...ev.pl> wrote:
> >  
> > > On Tue, Feb 20, 2024 at 2:39 PM Herve Codina <herve.codina@...tlin.com> wrote:  
> > > >
> > > > Hi,
> > > >
> > > > Note: Resent this series with Saravana added in Cc.
> > > >
> > > > 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
> > > >  
> > >
> > > Can you add some more context here in the form of DT snippets that
> > > lead to this being needed?  
> >
> > / {
> >         leds-dock {
> >                 compatible = "gpio-leds";
> >
> >                 led-5 {
> >                         label = "dock:alarm:red";
> >                         gpios = <&tca6424_dock_2 12 GPIO_ACTIVE_HIGH>;
> >                 };  
> 
> Do I understand correctly that the devlink is created between "led-5"
> and "tca6424_dock_2" but actually should also be created between
> "leds-dock" and "tca6424_dock_2"?
> 

Yes, that's my understanding too.

Best regards,
Hervé

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ