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]
Date:   Thu, 29 Apr 2021 23:12:23 +0200
From:   Pavel Machek <pavel@....cz>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     Dan Murphy <dmurphy@...com>, Rob Herring <robh+dt@...nel.org>,
        Andy Gross <agross@...nel.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-K?nig <u.kleine-koenig@...gutronix.de>,
        Lee Jones <lee.jones@...aro.org>,
        Martin Botka <martin.botka1@...il.com>,
        linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-pwm@...r.kernel.org
Subject: Re: [PATCH v6 2/4] leds: Add driver for Qualcomm LPG

Hi!

> > > +static int lpg_add_pwm(struct lpg *lpg)
> > > +{
> > > +	int ret;
> > > +
> > > +	lpg->pwm.base = -1;
> > > +	lpg->pwm.dev = lpg->dev;
> > > +	lpg->pwm.npwm = lpg->num_channels;
> > > +	lpg->pwm.ops = &lpg_pwm_ops;
> > > +
> > > +	ret = pwmchip_add(&lpg->pwm);
> > > +	if (ret)
> > > +		dev_err(lpg->dev, "failed to add PWM chip: ret %d\n", ret);
> > > +
> > > +	return ret;
> > > +}
> > 
> > Do we need to do this? I'd rather have LED driver, than LED+PWM
> > driver...
> > 
> 
> Yes, I believe we need to do this.
> 
> Because each piece of hardware has N channels, which can be wired to
> LEDs, grouped with other channels and wired to multicolor LEDs or be
> used as PWM signals. And this configuration is board specific.
> 
> One such example is the laptop in front of me, which has 3 channels
> wired to an RGB LED and 1 channel wired as a backlight control signal
> (i.e. using pwm-backlight).  Another example is a devboard where the
> 4 channels are wired to 4 LEDs.

Ok, so this is actually important. In this case you should have PWM
layer, exporting PWMs, and then rgb-LED driver that takes three of
those PWMs and turns them into LED, no?

And ... surprise ... that is likely to help other people, as LEDs
connected to PWMs are quite common.

Hmm.?

If you can't do this for some reason, you should probably explain in
the changelog, because this is going to be FAQ.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ