From: Felipe Balbi <balbi@ti.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Tony Lindgren <tony@atomide.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Felipe Balbi <balbi@ti.com>, Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case
Date: Mon, 18 Nov 2013 12:40:29 -0600 [thread overview]
Message-ID: <20131118184029.GA10676@saruman.home> (raw)
In-Reply-To: <20131118174638.GQ13640@lee--X1>
[-- Attachment #1.1: Type: text/plain, Size: 2185 bytes --]
Hi,
On Mon, Nov 18, 2013 at 05:46:38PM +0000, Lee Jones wrote:
> > > > +static struct of_dev_auxdata twl_auxdata_lookup[] = {
> > > > + OF_DEV_AUXDATA("ti,twl4030-gpio", 0, "twl4030-gpio", NULL),
> > > > + { /* sentinel */ },
> > > > +};
> > > > +
> > > > /* NOTE: This driver only handles a single twl4030/tps659x0 chip */
> > > > static int
> > > > twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
> > > > @@ -1271,10 +1276,14 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
> > > > twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
> > > > }
> > > >
> > > > - if (node)
> > > > - status = of_platform_populate(node, NULL, NULL, &client->dev);
> > > > - else
> > > > + if (node) {
> > > > + if (pdata)
> > > > + twl_auxdata_lookup[0].platform_data = pdata->gpio;
> > > > + status = of_platform_populate(node, NULL, twl_auxdata_lookup,
> > > > + &client->dev);
> > > > + } else {
> > > > status = add_children(pdata, irq_base, id->driver_data);
> > >
> > > Why doesn't the TWL driver use the MFD framework for this stuff?
> >
> > that's reminiscent from years ago and, surely, needs to be fixed. Should
> > we gate $subject for that, though ? This has been in tree for quite a
> > few years already and Tony's patch is still a step forward, since most
> > omap3 platforms would break on DT-only without it.
>
> I didn't say that I would reject the patch. I was just surprised to
> see so much hand-rolling, as the MFD core code does much of it
> automatically. This is the first time I've taken a look at this and it
> seems to be quite the relic.
alright, thanks for confirming.
> > There are quite a few folks who could volunteer to fixing that after
> > Tony's patch is in (me included, although there could be better choices
> > hehe).
>
> Well it's not doing any harm. I'll make a note to fix it myself if a)
> no one has done so already and b) I manage to find some spare
> time. The latter issue is less likely to be resolved. :)
>
> Are you Acking this patch by the way?
sure:
Acked-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2013-11-18 18:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 0:36 [PATCH 0/5] Prepare making omap3 device tree only and convert LDP Tony Lindgren
2013-11-16 0:36 ` [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case Tony Lindgren
2013-11-18 10:29 ` Lee Jones
2013-11-18 17:25 ` Felipe Balbi
2013-11-18 17:46 ` Lee Jones
2013-11-18 18:11 ` Tony Lindgren
2013-11-18 19:09 ` Lee Jones
2013-11-18 19:22 ` Tony Lindgren
2013-11-18 19:28 ` Lee Jones
2013-11-18 19:33 ` Tony Lindgren
2013-11-21 10:46 ` Lee Jones
2013-11-21 11:09 ` Lee Jones
2013-11-25 23:22 ` Tony Lindgren
2013-11-18 18:40 ` Felipe Balbi [this message]
2013-11-16 0:36 ` [PATCH 2/5] ARM: OMAP2+: Add support for legacy auxdata for twl Tony Lindgren
2013-11-16 0:36 ` [PATCH 3/5] ARM: OMAP2+: Add DT init code for DPI displays and make omap3 LDP to use it Tony Lindgren
2013-11-18 13:06 ` Tomi Valkeinen
2013-11-18 18:19 ` Tony Lindgren
2013-11-16 0:36 ` [PATCH 4/5] ARM: dts: Add basic support for omap3 LDP zoom1 labrador Tony Lindgren
2013-11-16 8:04 ` Sebastian Reichel
2013-11-16 14:40 ` Tony Lindgren
2013-11-16 0:36 ` [PATCH 5/5] ARM: OMAP2+: Remove legacy booting support for LDP Tony Lindgren
2013-11-16 12:05 ` N900 board code in 3.14 Sebastian Reichel
2013-11-16 14:12 ` Tony Lindgren
2013-11-16 15:50 ` Sebastian Reichel
2013-11-21 18:58 ` Tony Lindgren
2013-11-21 23:51 ` Sebastian Reichel
2013-11-22 10:41 ` Javier Martinez Canillas
2013-11-23 21:09 ` Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131118184029.GA10676@saruman.home \
--to=balbi@ti.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).