linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case
Date: Mon, 18 Nov 2013 10:11:10 -0800	[thread overview]
Message-ID: <20131118181110.GM10317@atomide.com> (raw)
In-Reply-To: <20131118174638.GQ13640@lee--X1>

* Lee Jones <lee.jones@linaro.org> [131118 09:47]:
> > > > +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.

Yeah it seems something from the early days of MFD code. Then grepping for
add_children shows that drivers/mfd/dm355evm_msp.c is doing it too, which
should also be fixed while at it.
 
> > 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. :)

Sounds like Felipe has already picked it up for future work :)
 
> Are you Acking this patch by the way?

If this looks acceptable to you guys, I'd like to merge this via my fixes
branch this week with your acks if that works for you. That way I can base
my omap legacy platform data removal patches on my fixes branch while keep
things working for the drivers. Alternatively I can naturally base my
legacy data removal on -rc2 too if this gets merged to mainline by then 
via the MFD tree.

Regards,

Tony

  reply	other threads:[~2013-11-18 18:11 UTC|newest]

Thread overview: 28+ 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 [this message]
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
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
     [not found] ` <20131116120508.GA22335@earth.universe>
2013-11-16 14:12   ` N900 board code in 3.14 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=20131118181110.GM10317@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).