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] [day] [month] [year] [list]
Message-ID: <fbeb1c97406c4ea8b6527ccbb25d5fe9@XBOX01.axis.com>
Date:   Thu, 18 Mar 2021 02:11:42 +0000
From:   Hermes Zhang <Hermes.Zhang@...s.com>
To:     Pavel Machek <pavel@....cz>, Marek Behun <marek.behun@....cz>
CC:     Dan Murphy <dmurphy@...com>, kernel <kernel@...s.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>
Subject: RE: [PATCH] leds: leds-dual-gpio: Add dual GPIO LEDs driver

> > +	priv = devm_kzalloc(dev, sizeof(struct gpio_dual_leds_priv),
> GFP_KERNEL);
> > +	if (!priv)
> > +		return -ENOMEM;
> > +
> > +	priv->low_gpio = devm_gpiod_get(dev, "low", GPIOD_OUT_LOW);
> > +	ret = PTR_ERR_OR_ZERO(priv->low_gpio);
> > +	if (ret) {
> > +		dev_err(dev, "cannot get low-gpios %d\n", ret);
> > +		return ret;
> > +	}
> > +
> > +	priv->high_gpio = devm_gpiod_get(dev, "high", GPIOD_OUT_LOW);
> > +	ret = PTR_ERR_OR_ZERO(priv->high_gpio);
> > +	if (ret) {
> > +		dev_err(dev, "cannot get high-gpios %d\n", ret);
> > +		return ret;
> > +	}
> 
> Actually... I'd call it led-0 and led-1 or something. Someone may/will come
> with 4-bit GPIO LED one day, and it would be cool if this could be used with
> minimal effort.
> 
> Calling it multi_led in the driver/bindings would bnot be bad, either.
> 

Hi all,

I have try to use leds-regulator to implement my case, most works. But the only thing doesn't work is the enable-gpio. In my case, we don't have a real enable gpio, so when we set LED_OFF, it could not off the LED as we expected. 

So I think I will back to the new multi LED driver, but make it more generic. 

Best Regards,
Hermes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ