RE: [PATCH 1/2] power: act8945a: add charger driver for ACT8945A

From: Yang, Wenyou
Date: Fri Jan 08 2016 - 02:59:09 EST


Hello Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:k.kozlowski@xxxxxxxxxxx]
> Sent: 2016å1æ8æ 15:03
> To: Yang, Wenyou <Wenyou.Yang@xxxxxxxxx>
> Cc: Sebastian Reichel <sre@xxxxxxxxxx>; Dmitry Eremin-Solenikov
> <dbaryshkov@xxxxxxxxx>; David Woodhouse <dwmw2@xxxxxxxxxxxxx>; Rob
> Herring <robh+dt@xxxxxxxxxx>; Pawel Moll <pawel.moll@xxxxxxx>; Mark
> Rutland <mark.rutland@xxxxxxx>; Ian Campbell <ijc+devicetree@xxxxxxxxxxxxxx>;
> Kumar Gala <galak@xxxxxxxxxxxxxx>; Ferre, Nicolas
> <Nicolas.FERRE@xxxxxxxxx>; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; linux-pm@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 1/2] power: act8945a: add charger driver for ACT8945A
>
> On 08.01.2016 15:43, Yang, Wenyou wrote:
>
> [...]
>
> >>> +static struct platform_driver act8945a_charger_driver = {
> >>> + .driver = {
> >>> + .name = "act8945a-charger",
> >>> + },
> >>> + .probe = act8945a_charger_probe,
> >>> + .remove = act8945a_charger_remove, };
> >>> +
> >>> +static int __init act8945a_charger_init(void) {
> >>> + return platform_driver_register(&act8945a_charger_driver);
> >>> +}
> >>> +subsys_initcall(act8945a_charger_init);
> >>
> >> Why subsys_initcall? This should be regular module_platform_driver.
> >
> > I want it to register early enough as MFD. Maybe I am wrong.
>
> No, you shouldn't manually order the probing by initcalls. This should be
> registered as usual and, if needed, support deferred probing. In this case I even
> can't find any reason to register it earlier than usual.

OK, I will change it.

Thanks.

Best Regards,
Wenyou Yang