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


Groups > linux.kernel > #1321712

Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for ACT8945A

From Javier Martinez Canillas <javier@dowhile0.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for ACT8945A
Date 2016-01-29 13:00 +0100
Message-ID <qWfSy-2qQ-9@gated-at.bofh.it> (permalink)
References <qVoEx-5wz-3@gated-at.bofh.it> <qVoEy-5wz-7@gated-at.bofh.it> <qW4X9-2Rx-3@gated-at.bofh.it> <qW6Ph-4bG-41@gated-at.bofh.it> <qWfzd-2gW-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Mark,

On Fri, Jan 29, 2016 at 8:35 AM, Mark Brown <broonie@kernel.org> wrote:
> On Fri, Jan 29, 2016 at 01:20:08AM +0000, Yang, Wenyou wrote:
>
>> > > +static const struct of_device_id act8945a_pmic_of_match[] = {
>> > > + { .compatible = "active-semi,act8945a-regulator" },
>> > > + { },
>> > > +};
>> > > +MODULE_DEVICE_TABLE(of, act8945a_pmic_of_match);
>
>> > This seems mostly OK but why do we have a compatible string here - shouldn't
>> > the MFD be able to instantiate the regulator function without needing this?
>
>> Because I got feedback from Javier for the act8945a-charger patches of this MFD series,
>> He said missing the OF match table will cause the module autoloading broken.
>
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/398113.html
>
>> What do you think about it?
>
> If then device is not being loaded from the DT (and it shouldn't be, the
> device looks like it should be instantiated directly by the MFD as it
> can't exist separately to that MFD) an OF table will do nothing.

Then he should remove the .of_compatible from the MFD cell definition.

Otherwise the MFD core will assign an of_node to this device in
mfd_add_device(), making the platform core to believe the device was
instantiated by OF. So an OF modalias uevent will be reported to load
the module and the OF table should be used for matching the device
with the driver.

IOW, the MFD and regulator driver have to agree on this. Either
everything should have OF or platform information, both work but
mixing these as it was on a previous version doesn't.

Best regards,
Javier

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


Thread

Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A Mark Brown <broonie@kernel.org> - 2016-01-29 01:20 +0100
  RE: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-01-29 03:20 +0100
    Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A Mark Brown <broonie@kernel.org> - 2016-01-29 12:40 +0100
      Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for ACT8945A Javier Martinez Canillas <javier@dowhile0.org> - 2016-01-29 13:00 +0100
        Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A Mark Brown <broonie@kernel.org> - 2016-01-29 13:10 +0100
        RE: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-02-01 07:00 +0100
          Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for ACT8945A Javier Martinez Canillas <javier@dowhile0.org> - 2016-02-01 14:20 +0100
            RE: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-02-02 03:30 +0100
            RE: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-02-03 03:40 +0100
              Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A Mark Brown <broonie@kernel.org> - 2016-02-03 18:50 +0100
                RE: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-02-04 14:30 +0100
      Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for ACT8945A Peter Korsgaard <peter@korsgaard.com> - 2016-02-02 18:50 +0100
        RE: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A "Yang, Wenyou" <Wenyou.Yang@atmel.com> - 2016-02-03 03:30 +0100
          Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for  ACT8945A Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-03 03:50 +0100

csiph-web