[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140212021525.GK841@joshc.qualcomm.com>
Date: Tue, 11 Feb 2014 20:15:25 -0600
From: Josh Cartwright <joshc@...eaurora.org>
To: Rob Herring <robherring2@...il.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH] of: Turn of_match_node into a static inline when
CONFIG_OF isn't set
On Tue, Feb 11, 2014 at 05:14:51PM -0600, Rob Herring wrote:
> On Tue, Feb 11, 2014 at 3:55 PM, Josh Cartwright <joshc@...eaurora.org> wrote:
[..]
> > Okay, so maybe caching a pointer in the device isn't the best option,
> > what if we considered extending the platform_driver callbacks to include
> > a set of per-method (?) probe callbacks which do provide a handle to
> > matched identifiers.
> >
> > In the case of a totally contrived platform_driver supporting ACPI, OF,
> > and !OF configurations, it might look something like:
> >
> > static const struct of_device_id acme_of_table[] = {
> > /* ... */
> > { },
> > };
> > MODULE_DEVICE_TABLE(of, acme_of_table);
> >
> > static int acme_probe_of(struct platform_device *pdev,
> > const struct of_device_id *id)
>
> I don't think this is the right direction. You might want to look at
> of_platform_driver in git history...
Thanks for the pointer, of_platform_driver was on it's way out the door
while I was still coming up to speed on devicetree.
To be clear, I'm not proposing that we reintroduce a new bus_type, or
duplicate driver instances, or anything that made of_platform_driver a
pain to deal with.
I'm only suggesting that we consider providing a set of interfaces that
1) provide a simpler/more convenient way for a driver to get at matched
id table entries, and 2) provide a clearer, declarative mechanism by
which a platform driver might isolate it's firmware-specific glue bits
from core driver logic.
Anyway, thanks for hearing me out!
Josh
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
--
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