[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100804103714.48ddbe0e@lxorguk.ukuu.org.uk>
Date: Wed, 4 Aug 2010 10:37:14 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Patrick Pannuto <ppannuto@...eaurora.org>
Cc: linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-omap.vger.kernel.org@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...e.de>, damm@...nsource.se,
lethal@...ux-sh.org, rjw@...k.pl, dtor@...l.ru,
eric.y.miao@...il.com, netdev@...r.kernel.org
Subject: Re: [RFC PATCH] platform: Faciliatate the creation of
pseduo-platform busses
> (possibly in a header)
> #ifdef CONFIG_MY_BUS
> #define MY_BUS_TYPE &my_bus_type
> #else
> #define MY_BUS_TYPE NULL
> #endif
>
> /drivers/my_driver.c
> static struct platform_driver my_driver = {
> .driver = {
> .name = "my-driver",
> .owner = THIS_MODULE,
> .bus = MY_BUS_TYPE,
> },
> };
>
> Which will allow the same driver to easily to used on either
> the platform bus or the newly defined bus type.
At compile time. I suspect there is an argument for having an
"ANY_BUS_TYPE" value for the devices so that you can runtime wildcard
stuff which works whatever sub-bus it is hung off.
> I believe this to be a fairly elegant and simple solution to the
> problem, but humbly RFC
It's exactly what I need to tidy up the SCU IPC devices on the new Intel
MID platforms certainly. It's also a very small patch to achieve it
Alan
--
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