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: <20190911222513.489b5235@aktux>
Date:   Wed, 11 Sep 2019 22:25:13 +0200
From:   Andreas Kemnade <andreas@...nade.info>
To:     Dan Murphy <dmurphy@...com>
Cc:     Daniel Thompson <daniel.thompson@...aro.org>,
        <lee.jones@...aro.org>, <jingoohan1@...il.com>,
        <jacek.anaszewski@...il.com>, <pavel@....cz>, <robh+dt@...nel.org>,
        <mark.rutland@....com>, <b.zolnierkie@...sung.com>,
        <dri-devel@...ts.freedesktop.org>, <linux-leds@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-fbdev@...r.kernel.org>,
        "H. Nikolaus Schaller" <hns@...delico.com>
Subject: Re: [PATCH v2 2/2] backlight: lm3630a: add an enable gpio for the
 HWEN pin

On Wed, 11 Sep 2019 13:48:36 -0500
Dan Murphy <dmurphy@...com> wrote:


> >> @@ -535,6 +538,13 @@ static int lm3630a_probe(struct i2c_client *client,
> >>   	}
> >>   	pchip->pdata = pdata;
> >>   
> >> +	pchip->enable_gpio = devm_gpiod_get_optional(&client->dev, "enable",
> >> +						GPIOD_OUT_HIGH);
> >> +	if (IS_ERR(pchip->enable_gpio)) {
> >> +		rval = PTR_ERR(pchip->enable_gpio);
> >> +		return rval;  
> 
> the enable gpio is optional so if it fails you log the error and move on
>
well, if the gpio is not there, then it returns NULL.
It might return e.g. -EDEFER. So I need to check for errors here.
 
> Also on driver removal did you want to set the GPIO to low to disable 
> the device to save power?
> 
page 5 of the datasheet says:

Ishdn = Typ. 1µA max. 4µA.
For HWEN=Vin, I2c shutdown  (I guess this means outputs powered off)
ond for HWEN=GND.

So are we really saving something here?

Regards,
Andreas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ