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: <7832225b-115c-2316-025e-29929cd4f208@ti.com>
Date:   Thu, 10 May 2018 09:31:39 -0500
From:   "Andrew F. Davis" <afd@...com>
To:     Dan Murphy <dmurphy@...com>, <robh+dt@...nel.org>,
        <mark.rutland@....com>, <jacek.anaszewski@...il.com>,
        <pavel@....cz>
CC:     <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-leds@...r.kernel.org>
Subject: Re: [PATCH v4 2/2] leds: lm3601x: Introduce the lm3601x LED driver

On 05/10/2018 09:04 AM, Dan Murphy wrote:

>>> +static int lm3601x_remove(struct i2c_client *client)
>>> +{
>>> +	struct lm3601x_led *led = i2c_get_clientdata(client);
>>> +
>>> +	regmap_write(led->regmap, LM3601X_ENABLE_REG, 0);
>>> +
>>
>>
>> If probe doesn't enable this, remove shouldn't disable it. It can lead
>> to odd cases if the driver is removed and added again.
> 
> I want to make sure the LED is off and in standby mode.  Maybe I will just set it to
> the default value instead.
> 


Why? If you want to do this then implement PM controls and put it in
standby mode there.


>>
>> Plus, removing the driver is not a command to disable the LED anyway.
> 
> True but you don't want to leave any LEDs in the on state without a driver to support it.
> This could burn out the LED or the board if left on on max brightness
> 


I disagree, we should not try to decide what the user wants here. We
should only do what we are instructed to do, which for remove() is to
cleanup what probe has done so the driver can be removed w/o leaking
memory or device state.


> 
> Dan
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ