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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140827040629.GA3401@jack-ThinkPad-T520>
Date:	Wed, 27 Aug 2014 13:06:29 +0900
From:	Gyungoh Yoo <gyungoh@...il.com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	grant.likely@...aro.org, sameo@...ux.intel.com,
	jack.yoo@...worksinc.com, jason@...edaemon.net,
	heiko.stuebner@...eaders.com, florian.vaussard@...l.ch,
	thierry.reding@...il.com, andrew@...n.ch, silvio.fricke@...il.com,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Adding Skyworks SKY81452 MFD driver

On Tue, Aug 26, 2014 at 09:22:58AM +0100, Lee Jones wrote:
> On Mon, 25 Aug 2014, Gyungoh Yoo wrote:
> > On Thu, Aug 21, 2014 at 10:45:02AM +0100, Lee Jones wrote:
> > > When you send patch-sets, you should send them connected to one
> > > another AKA threaded.  That way, when we're reviewing we can look at
> > > the other patches in the set for reference.  See the man page for `git
> > > send-email` for details.
> > > 
> > > <commit log>
> > > 
> > > > Signed-off-by: Gyungoh Yoo <jack.yoo@...worksinc.com>
> > > > ---
> 
> [...]
> 
> > > > +static int sky81452_register_devices(struct device *dev,
> > > > +		const struct sky81452_platform_data *pdata)
> > > > +{
> > > > +	struct mfd_cell cells[] = {
> > > > +		{
> > > > +			.name = "sky81452-bl",
> > > > +			.platform_data = pdata->bl_pdata,
> > > > +			.pdata_size = sizeof(*pdata->bl_pdata),
> > > 
> > > Have you tested this with DT?
> > > 
> > > You're not passing the compatible string and not using
> > > of_platform_populate() so I'm struggling to see how it would work
> > > properly.
> > 
> > sky81452-bl and regulator-sky81452 is parsing the information
> > in regulator node of its parent node. So I thought these 2 drivers
> > don't need compatible attribute. That is what it didn't have
> > compatible string.
> > Is is mandatory that all drivers should have compatible attribute?
> 
> How do they obtain their DT nodes?

The backlight driver which is one of the child driver is obtain its DT node like this

np = of_get_child_by_name(dev->parent->of_node, "backlight");

> 
> [...]
> 
> > > > +	return mfd_add_devices(dev, -1, cells, ARRAY_SIZE(cells),
> > > > +			NULL, 0, NULL);
> > > 
> > > This doesn't really need to be in a function of its own.  Please put
> > > it in .probe().  Also check for the return value and present the user
> > > with an error message if it fails.
> > 
> > I think this need to be, in case of !CONFIG_OF.
> > Can you please explain more in details?
> 
> Then how to you obtain the shared register map you created?

regmap is stored in driver data in MFD.

i2c_set_clientdata(client, regmap);

The child drivers obain the regmap from the parent.

struct regmap *regmap = dev_get_drvdata(dev->parent);

> 
> [...]
> 
> -- 
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ