getting rid of subsys_initcall usage?
zhangfei.gao at linaro.org
Thu Aug 29 21:51:47 EDT 2013
On 13-08-28 05:57 PM, Wolfram Sang wrote:
> On Tue, Aug 20, 2013 at 04:32:28PM +0800, Zhangfei Gao wrote:
>> Instead of use platform_driver_probe, use module_platform_driver
>> To support deferred probing
>> Also subsys_initcall may too early to auto set pinctl
>> Signed-off-by: Zhangfei Gao <zhangfei.gao at linaro.org>
>> Acked-by: Baruch Siach <baruch at tkos.co.il>
> This patch is tougher than it looks. You need it, because
> subsys_initcall may be too early for pinctrl. Other people might be
> depending on subsys_initcall to get I2C active before they want to
> activate, say, PMICs. So, I fear regressions, since deferred probing
> might not be available in the needed places to avoid these regressions.
> I am all ears for a nice transition away from subsys_initcall, anyone?
The deferred probe will be successful if change platform_driver_probe to
platform_driver_register, to register itself to drv name list.
However, the effect is subsys_initcall is postponed, until pin control
driver is probed successfully.
If the pin is specific and does not need configure, there is no issue.
There may still have issue if the mulit-function pin need be configured
via pinctrl, except put pin control driver earlier too.
More information about the linux-arm-kernel