lkml.org 
[lkml]   [2015]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 5/6] regulator: tps65086: Add regulator driver for the TPS65086 PMIC
From
Date
On 10/31/2015 09:37 PM, Mark Brown wrote:
> On Fri, Oct 30, 2015 at 05:41:43PM -0500, Andrew F. Davis wrote:
>
>> +struct tps65086_regulator {
>> + struct regulator_desc desc;
>> + unsigned int decay_reg;
>> + unsigned int decay_mask;
>
> The decay_reg and decay_mask fields appear to be entirely write only,
> why are they present?
>

Not sure what you mean, they are written to differently for each regulator,
and read when setting the decay mode in _probe.

>> + ret = of_regulator_match(&pdev->dev, pdev->dev.of_node,
>> + tps65086_matches,
>> + ARRAY_SIZE(tps65086_matches));
>> + if (ret < 0) {
>> + dev_err(tps->dev, "Error parsing regulator init data\n");
>> + return ret;
>> + }
>
> Please match regulators using the fields in the regulator_desc rather
> than open coding.
>

I need to match to get the driver specific information for each regulator,
if I let regulator_register do it I never get a chance to process the match,
unless there is a callback or something I'm missing.


\
 
 \ /
  Last update: 2015-11-03 17:21    [W:0.053 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site