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: <40684c50-6f6d-493c-97db-ff3bd8883259@kernel.org>
Date: Sun, 24 Nov 2024 11:50:17 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Kryštof Černý <cleverline1mc@...il.com>
Cc: Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 Stefan Wahren <stefan.wahren@...rgebyte.com>,
 Ben Gardner <bgardner@...tec.com>, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org
Subject: Re: [PATCH v2 1/3] w1: ds2482: Add regulator support

On 24/11/2024 11:22, Kryštof Černý wrote:
>>> +	/* Get the vcc regulator */
>>> +	data->vcc_reg = devm_regulator_get(&client->dev, "vcc");
>>> +	if (IS_ERR(data->vcc_reg))
>>> +		return PTR_ERR(data->vcc_reg);
>>> +
>>> +	/* Enable the vcc regulator */
>>> +	ret = regulator_enable(data->vcc_reg);
>>
>> You wanted devm_regulator_get_enable().
>>
>> ... but your comment also suggests devm_regulator_get_enable_optional().
>>
> 
> This is a good point, my implementation is based on observation of a few 
> other drivers and it's not needed in this case. This will reduce the 
> amount of changes.
> 
> I think my wording was not correct. By optionally I meant that most 
> hardware designs do not use a separate power supply regulator, so they 
> do not need to specify one, but the device needs power to function.
> My current view is that it should not be optional after all, so I would 
> go with devm_regulator_get_enable(). Could you please tell me your view 
> on this?
> 


Sure, fine.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ