[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5458B356.5000206@collabora.co.uk>
Date: Tue, 04 Nov 2014 12:07:02 +0100
From: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>
CC: Mark Brown <broonie@...nel.org>,
Kukjin Kim <kgene.kim@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Olof Johansson <olof@...om.net>,
Chris Zhong <zyw@...k-chips.com>,
Abhilash Kesavan <kesavan.abhilash@...il.com>,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v4 10/14] regulator: of: Add support for parsing initial
and suspend modes
Hello Krzysztof,
On 11/04/2014 11:41 AM, Krzysztof Kozlowski wrote:
>> + if (!of_property_read_u32(np, "regulator-initial-mode", &pval)) {
>> + if (desc && desc->map_modes)
>> + constraints->initial_mode = desc->map_modes(pval);
>> + else
>> + pr_warn("%s: failed to parse regulator-initial-mode\n",
>> + np->name);
>> + }
>> +
>
> Here's a hidden assumption that if driver does not provide map_modes
> then any "regulator-initial-mode" property is not valid. Shouldn't this
> be mentioned somewhere? Maybe in description of map_modes callback?
>
Well it can't be valid if the regulator core does not know how to map the
value in the property to one of the standard modes. The binding explains
that each PMIC has to define its hardware modes, I can also add a note
in the .map_modes. I guess no one will say no to more documentation :-)
Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists