[PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()

2014-11-07 Thread Javier Martinez Canillas
The of_get_regulator_init_data() function is used to extract the regulator init_data but information on how to extract certain data is defined in the static regulator descriptor (e.g: how to map the hardware operating modes). Add a const struct regulator_desc * parameter to the function signature

Re: [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()

2014-11-07 Thread Krzysztof Kozlowski
On piÄ…, 2014-11-07 at 14:00 +0100, Javier Martinez Canillas wrote: The of_get_regulator_init_data() function is used to extract the regulator init_data but information on how to extract certain data is defined in the static regulator descriptor (e.g: how to map the hardware operating modes).

Re: [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()

2014-11-07 Thread Javier Martinez Canillas
Hello Mark, On 11/07/2014 04:07 PM, Mark Brown wrote: This is using the regulator descriptor before it is initialized which doesn't seem ideal... You are right, even if most of them are not used currently, that may change in the future so is safer to use it after all fields have been

Re: [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()

2014-11-07 Thread Javier Martinez Canillas
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,

Re: [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()

2014-11-07 Thread Mark Brown
On Fri, Nov 07, 2014 at 02:00:03PM +0100, Javier Martinez Canillas wrote: - initdata = of_get_regulator_init_data(dev, np); sreg = devm_kzalloc(dev, sizeof(*sreg), GFP_KERNEL); if (!sreg) return -ENOMEM; - sreg-initdata = initdata; sreg-name =