[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201103141554.28515.arnd@arndb.de>
Date: Mon, 14 Mar 2011 15:54:28 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Grant Likely <grant.likely@...retlab.ca>
Cc: andy.green@...aro.org, Andy Green <andy@...mcat.com>,
Linux USB list <linux-usb@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
"Greg Kroah-Hartman" <gregkh@...e.de>
Subject: Re: RFC: Platform data for onboard USB assets
On Friday 11 March 2011, Grant Likely wrote:
> On Fri, Mar 11, 2011 at 2:50 AM, Andy Green <andy@...mcat.com> wrote:
> > Hi -
> >
> > platform_data is a well established way in Linux to pass configuration data
> > up to on-board assets from a machine file like mach-xyz.c. It's also
> > supported to pass platform_data up to devices that are probed asynchronously
> > from busses like i2c as well, which is very handy.
> >
> > However AFAIK it's not possible to bind platform_data to probed USB devices
> > as it stands.
>
> Oh, please no.
>
> platform_data is an ugly non-type-checked anonymous pointer. If you
> need to pass data to a driver, use something better designed. A
> device tree fragment would work, or provide some kind of query api.
> platform_data is definitely the wrong approach.
I'd still hope that we could do without either for hotpluggable
devices, but a device tree object fits better here, because
we already have ways to associate the data in the device node
with any device, not just platform devices, and the key/value
pairs make it much more flexible than platform data.
Arnd
--
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