[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c6919357-6c3b-1f69-4d51-2ed2ddd2c942@codeaurora.org>
Date: Thu, 12 Jul 2018 18:34:02 -0700
From: David Collins <collinsd@...eaurora.org>
To: Mark Brown <broonie@...nel.org>
Cc: lgirdwood@...il.com, robh+dt@...nel.org, mark.rutland@....com,
linux-arm-msm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, rnayak@...eaurora.org,
sboyd@...nel.org, dianders@...omium.org, mka@...omium.org
Subject: Re: [PATCH v8 2/2] regulator: add QCOM RPMh regulator driver
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
Powered by blists - more mailing lists