lkml.org 
[lkml]   [2014]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()
Hello Krzysztof,

On 11/07/2014 04:23 PM, Krzysztof Kozlowski wrote:
>>
>> static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
>> - struct device_node *np)
>> + struct device_node *np,
>> + struct regulator_desc *desc)
>
> Not a const? Why not?
>

Right, I removed all your other mentions to the same issue but I'll double
check all the drivers to be sure that use const.

>> {
>> struct fan53555_platform_data *pdata;
>> int ret;
>> @@ -312,7 +313,7 @@ static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
>> if (!pdata)
>> return NULL;
>>
>> - pdata->regulator = of_get_regulator_init_data(dev, np);
>> + pdata->regulator = of_get_regulator_init_data(dev, np, desc);
>
> Desc would be always NULL here which is safe (check in patch 5/5) but if
> someone puts "regulator-initial-mode" in DTS then this will always print
> warning. Just wonder - is it actually what you wanted?
>
> This applies also for tps51632 and tps62360.
>

In an early version of the series I just passed NULL for all drivers but
Mark said that is more future proof to pass the descriptor and I agree.

I guess I should just remove the warning and only show an error if the
descriptor is not NULL and also the map mode function is defined but
the callback returns an error.

> (...)
>
> Rest looks fine.
>

Thanks a lot for the review.

> Krzysztof
>
>

Best regards,
Javier


\
 
 \ /
  Last update: 2014-11-07 17:41    [W:0.048 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site