[lkml]   [2010]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [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


     \ /
      Last update: 2010-08-04 11:29    [W:0.021 / U:1.068 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site