Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334521

Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of subsys initcall

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of subsys initcall
Date 2016-02-15 16:30 +0100
Message-ID <r2tg6-2PB-27@gated-at.bofh.it> (permalink)
References <r1dGq-1XX-5@gated-at.bofh.it> <r1dGq-1XX-7@gated-at.bofh.it> <r2liy-5Ku-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Krzysztof,

On 02/15/2016 03:54 AM, Krzysztof Kozlowski wrote:
> On 12.02.2016 13:30, Javier Martinez Canillas wrote:
>> The driver's init and exit function don't do anything besides adding and
>> deleting the I2C driver so the module_i2c_driver() macro could be used.
>>
>> Currently is not being used because the driver is initialized at subsys
>> initcall level, claiming that this is done to allow consumers devices to
>> use the resources provided by this driver. But dependencies should be in
>> the DT and consumers drivers should not rely in the registration order.
>>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>> ---
>>
>>   drivers/mfd/max77686.c | 13 +------------
>>   1 file changed, 1 insertion(+), 12 deletions(-)
>>
>
> In the past not all dependencies supported deferred probing so such
> ordering was required.
>
> I don't like the "dependencies should be in DT" reason for the change...
> because it is kind of wishful thinking. Yeah, the dependencies should be
> in DT, but are they?
>
> Instead *please check it* and write:
> "Dependencies are in DT so manual ordering of init calls is not
> necessary any more".
>

For the max77802 I know that's the case since the only two DTS in mainline
that use it are the Peach Pit and Pi and I'm very familiar with those two.

But I wonder how can I check that this is the case for the max77686. Most
DTS in mainline have nodes that use some clocks and regulators provided by
the PMIC, only arch/arm/boot/dts/exynos5250-smdk5250.dts doesn't have one
of the regulators as input supply or clock consumer defined.

For the clock, I guess the RTC is just broken since it's using the s3c6410
controller that requires a source clock and this is not defined.

Now the question is if it doesn't really need the regulators or is that
the DTS isn't correctly defined and some drivers were relying on the MFD
and regulator drivers to be registered at subsys initcall level?

> My fast tests of this patch shown that it works good... but some more
> thorough tests should be done.
>

What do you suggest? The drivers now support deferred probing but as said,
I don't know how I can be sure that drivers aren't missing input supplies
and relying in regulators being registered early and marked as always-on.
  
> Best regards,
> Krzysztof
>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of subsys initcall Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-12 05:40 +0100
  Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-15 08:00 +0100
    Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Lee Jones <lee.jones@linaro.org> - 2016-02-15 09:30 +0100
    Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-15 16:30 +0100
      Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-16 00:30 +0100
        Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-16 21:50 +0100
          Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-17 08:50 +0100
            Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-17 19:40 +0100
        Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Marek Szyprowski <m.szyprowski@samsung.com> - 2016-02-17 10:30 +0100
          Re: [PATCH 2/4] mfd: max77686: Use module_i2c_driver() instead of  subsys initcall Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-17 10:40 +0100

csiph-web