Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311969
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 5/5] regulator: max77620: add regulator driver for max77620/max20024 |
| Date | 2016-01-19 08:20 +0100 |
| Message-ID | <qSyK5-4tL-11@gated-at.bofh.it> (permalink) |
| References | <qQOzD-6od-7@gated-at.bofh.it> <qQOzE-6od-9@gated-at.bofh.it> <qSx1E-38E-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Thanks for review.
Here is my view on the some of the review comment.
On Tuesday 19 January 2016 10:59 AM, Krzysztof Kozlowski wrote:
> On 14.01.2016 20:32, Laxman Dewangan wrote:
> + return ret;
> +}
> +
> +static int max77620_init_pmic(struct max77620_regulator *pmic, int id)
> +{
> This function seems to be used only from max77620_of_parse_cb(). I would
> find easier to read if this was located before definition of
> max77620_of_parse_cb(). Can you move it (or you had other idea of
> placing algorithm)?
I wanted to keep all local function on top which is used on this file
and not the regulator ops.
Then implement regulator ops and then probe.
Let me see if I can do anything here.
>
>> + pmic->enable_power_mode[id]) {
>> + ret = max77620_regulator_set_power_mode(
>> + pmic, pmic->enable_power_mode[id], id);
> The 'pmic' argument should be after opening parenthesis, not at new line.
This is done for indenting alignment. I am using checkpatch --strict
option and for this the next line should be on same column of first
charcter after opening parenthesis.
To avoid this error, if we want to re-align the indenting for next line
then left the line empty after "(".
+
+static int __init max77620_regulator_init(void)
+{
+ return platform_driver_register(&max77620_regulator_driver);
+}
+subsys_initcall(max77620_regulator_init);
+
> Does it have to be subsys_initcall? Any special requirements for
> ordering the drivers? Probe deferring is encouraged instead.
>
>
This is to make sure th regulators are ready before other driver get
probed. This is basic need of some of driver and hence subsys_initcall.
I will move to module_init() as some of other PMIC driver (as3722) is in
the module init and used in tegra platform so not seeing much issue on this.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH V3 5/5] regulator: max77620: add regulator driver for max77620/max20024 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-19 06:30 +0100
Re: [PATCH V3 5/5] regulator: max77620: add regulator driver for max77620/max20024 Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-19 08:20 +0100
Re: [PATCH V3 5/5] regulator: max77620: add regulator driver for max77620/max20024 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-19 08:30 +0100
csiph-web