lkml.org 
[lkml]   [2019]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RESEND PATCH v4 1/6] regulator: lm363x: Make the gpio register enable flexible
From
Date
Mark

On 5/23/19 8:03 AM, Mark Brown wrote:
> On Wed, May 22, 2019 at 02:27:28PM -0500, Dan Murphy wrote:
>> The use of and enablement of the GPIO can be used across devices.
>> Use the enable_reg in the regulator descriptor for the register to
>> write.
>
>> @@ -263,8 +263,8 @@ static int lm363x_regulator_probe(struct platform_device *pdev)
>>
>> if (gpiod) {
>> cfg.ena_gpiod = gpiod;
>> -
>> - ret = regmap_update_bits(regmap, LM3632_REG_BIAS_CONFIG,
>> + ret = regmap_update_bits(regmap,
>> + lm363x_regulator_desc[id].enable_reg,
>> LM3632_EXT_EN_MASK,
>> LM3632_EXT_EN_MASK);
>> if (ret) {
>
> Is it guaranteed that the bitmask for enabling the use of the GPIO is
> going to be the same for all regulators? The bitmasks for the regulator
> enable look to be different, and it also looks like this setting might
> affect multiple regulators since it seems there are multiple enable bits
> in the same register. If this affects multiple regulators then how's
> that working at the minute?
>

Yes for the 3632 and 36274 bit0 is the EXT_EN for LCM on these chips.
LM3631 does not have LCM GPIO control so there is no setting and this should not be called.
If it is then the developer implemented the DT wrong.

LM3631 - No LCM GPIO control

LM36274 reg 0x09 bit 0 7.6.9 of the data sheet
LM3632 reg 0x0c bit 0 7.6.12 of the data sheet

Dan

\
 
 \ /
  Last update: 2019-05-23 15:51    [W:0.092 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site