lkml.org 
[lkml]   [2018]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 2/2] regulator: add QCOM RPMh regulator driver
From
Date
On 07/12/2018 09:54 AM, Mark Brown wrote:
> On Mon, Jul 09, 2018 at 04:44:14PM -0700, David Collins wrote:
>> On 07/02/2018 03:28 AM, Mark Brown wrote:
>>> On Fri, Jun 22, 2018 at 05:46:14PM -0700, David Collins wrote:
>>>> +static unsigned int rpmh_regulator_pmic4_ldo_of_map_mode(unsigned int mode)
>>>> +{
>>>> + static const unsigned int of_mode_map[RPMH_REGULATOR_MODE_COUNT] = {
>>>> + [RPMH_REGULATOR_MODE_RET] = REGULATOR_MODE_STANDBY,
>>>> + [RPMH_REGULATOR_MODE_LPM] = REGULATOR_MODE_IDLE,
>>>> + [RPMH_REGULATOR_MODE_AUTO] = REGULATOR_MODE_INVALID,
>>>> + [RPMH_REGULATOR_MODE_HPM] = REGULATOR_MODE_FAST,
>>>> + };
>
>>> Same here, based on that it looks like auto mode is a good map for
>>> normal.
>
>> LDO type regulators physically do not support AUTO mode. That is why I
>> specified REGULATOR_MODE_INVALID in the mapping.
>
> The other question here is why this is even in the table if it's not
> valid (I'm not seeing a need for the MODE_COUNT define)?

I thought that having a table would be more concise and easier to follow.
I can change this to a switch case statement.

Take care,
David

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.078 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site