lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <B256D81BAE5131468A838E5D7A243641D63FE2C7@penmbx01>
Date:	Mon, 1 Feb 2016 05:54:46 +0000
From:	"Yang, Wenyou" <Wenyou.Yang@...el.com>
To:	Javier Martinez Canillas <javier@...hile0.org>,
	Mark Brown <broonie@...nel.org>
CC:	Liam Girdwood <lgirdwood@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	"Krzysztof Kozlowski" <k.kozlowski@...sung.com>,
	Lee Jones <lee.jones@...aro.org>,
	"Peter Korsgaard" <jacmet@...il.com>,
	"Ferre, Nicolas" <Nicolas.FERRE@...el.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: RE: [PATCH v4 1/2] regulator: act8945a: add regulator driver for
 ACT8945A

Hi Javier & Mark,

I am educated. Thank you all.

> -----Original Message-----
> From: Javier Martinez Canillas [mailto:javier@...hile0.org]
> Sent: 2016年1月29日 19:50
> To: Mark Brown <broonie@...nel.org>
> Cc: Yang, Wenyou <Wenyou.Yang@...el.com>; Liam Girdwood
> <lgirdwood@...il.com>; Rob Herring <robh+dt@...nel.org>; Pawel Moll
> <pawel.moll@....com>; Ian Campbell <ijc+devicetree@...lion.org.uk>; Kumar
> Gala <galak@...eaurora.org>; Krzysztof Kozlowski
> <k.kozlowski@...sung.com>; Lee Jones <lee.jones@...aro.org>; Peter
> Korsgaard <jacmet@...il.com>; Ferre, Nicolas <Nicolas.FERRE@...el.com>;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org;
> devicetree@...r.kernel.org
> Subject: Re: [PATCH v4 1/2] regulator: act8945a: add regulator driver for
> ACT8945A
> 
> Hello Mark,
> 
> On Fri, Jan 29, 2016 at 8:35 AM, Mark Brown <broonie@...nel.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/39
> >> 8113.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.

I tried it,

But if removed this .of_compatible, and reserved the OF table. 
the &pdev->dev->of_node is NULL, the driver fails to get the configuration value from DT, 

It seems the OF table still doesn't work. Where is wrong?

Could you help give some suggestion?

> 
> 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


Best Regards,
Wenyou Yang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ