Re: [PATCH RFT] regulator: pbias: Convert to use regmap helper functions

From: Axel Lin
Date: Fri Mar 07 2014 - 11:03:20 EST


2014-03-07 23:25 GMT+08:00 Balaji T K <balajitk@xxxxxx>:
> On Thursday 06 March 2014 06:40 PM, Axel Lin wrote:
>>
>> This patch converts this driver to use the regmap helper functions
>> provided by
>> regulator core.
>>
>> This fixes a few issues in current implementation:
>>
>> 1) In original code, the set voltage does not check max_uV,
>> which means if request max_uV < 1800000, it will still set the voltage
>> to 1800000.
>>
>
> Hi Axel,
>
> May be I am not getting your logic here, why would max_uV be less than
> min_uV

I think this is an unlikely case here.
>
> The intention was to set vmode to 0 for any voltage request lesser than
> 1.8V.

This statement sounds wrong to me.
For example, If the request voltage range is 1.0V ~ 1.5V.
We should return error rather than set the voltage to 1.8V (which may
damage the device).

> With regmap conversion, set voltage of 0V will become invalid. However
> since pbias is not set to 0V anywhere, I think it shouldn't be an issue.
ok.

> Will test and confirm.

Thanks,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/