Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
tty: serial: altera_jtaguart: Add device tree support
tty: serial: altera_uart: Add devicetree support
dt: eliminate of_platform_driver shim code
dt: Eliminate of_platform_{,un}register_driver
dt/serial: Eliminate users of of_platform_{,un}register_driver
dt/usb: Eliminate users of of_platform_{,un}register_driver
dt/video: Eliminate users of of_platform_{,un}register_driver
dt/net: Eliminate users of of_platform_{,un}register_driver
dt/sound: Eliminate users of of_platform_{,un}register_driver
dt/spi: Eliminate users of of_platform_{,un}register_driver
dt: uartlite: merge platform and of_platform driver bindings
dt: xilinx_hwicap: merge platform and of_platform driver bindings
ipmi: convert OF driver to platform driver
leds/leds-gpio: merge platform_driver with of_platform_driver
dt/sparc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: move of_bus_type infrastructure to ibmebus
drivercore/dt: add a match table pointer to struct device
dt: Typo fix.
altera_ps2: Add devicetree support
...
This commit is contained in:
@@ -442,6 +442,7 @@ struct device {
|
||||
struct dev_archdata archdata;
|
||||
|
||||
struct device_node *of_node; /* associated device tree node */
|
||||
const struct of_device_id *of_match; /* matching of_device_id from driver */
|
||||
|
||||
dev_t devt; /* dev_t, creates the sysfs "dev" */
|
||||
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ extern void of_node_put(struct device_node *node);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* OF address retreival & translation
|
||||
* OF address retrieval & translation
|
||||
*/
|
||||
|
||||
/* Helper to read a big number; size is in cells (not bytes) */
|
||||
|
||||
@@ -18,10 +18,11 @@ extern void of_device_make_bus_id(struct device *dev);
|
||||
* @drv: the device_driver structure to test
|
||||
* @dev: the device structure to match against
|
||||
*/
|
||||
static inline int of_driver_match_device(const struct device *dev,
|
||||
static inline int of_driver_match_device(struct device *dev,
|
||||
const struct device_driver *drv)
|
||||
{
|
||||
return of_match_device(drv->of_match_table, dev) != NULL;
|
||||
dev->of_match = of_match_device(drv->of_match_table, dev);
|
||||
return dev->of_match != NULL;
|
||||
}
|
||||
|
||||
extern struct platform_device *of_dev_get(struct platform_device *dev);
|
||||
|
||||
@@ -23,13 +23,7 @@
|
||||
* of_platform_driver - Legacy of-aware driver for platform devices.
|
||||
*
|
||||
* An of_platform_driver driver is attached to a basic platform_device on
|
||||
* ether the "platform bus" (platform_bus_type), or the ibm ebus
|
||||
* (ibmebus_bus_type).
|
||||
*
|
||||
* of_platform_driver is being phased out when used with the platform_bus_type,
|
||||
* and regular platform_drivers should be used instead. When the transition
|
||||
* is complete, only ibmebus will be using this structure, and the
|
||||
* platform_driver member of this structure will be removed.
|
||||
* the ibm ebus (ibmebus_bus_type).
|
||||
*/
|
||||
struct of_platform_driver
|
||||
{
|
||||
@@ -42,26 +36,16 @@ struct of_platform_driver
|
||||
int (*shutdown)(struct platform_device* dev);
|
||||
|
||||
struct device_driver driver;
|
||||
struct platform_driver platform_driver;
|
||||
};
|
||||
#define to_of_platform_driver(drv) \
|
||||
container_of(drv,struct of_platform_driver, driver)
|
||||
|
||||
extern int of_register_driver(struct of_platform_driver *drv,
|
||||
struct bus_type *bus);
|
||||
extern void of_unregister_driver(struct of_platform_driver *drv);
|
||||
|
||||
/* Platform drivers register/unregister */
|
||||
extern int of_register_platform_driver(struct of_platform_driver *drv);
|
||||
extern void of_unregister_platform_driver(struct of_platform_driver *drv);
|
||||
|
||||
extern struct platform_device *of_device_alloc(struct device_node *np,
|
||||
const char *bus_id,
|
||||
struct device *parent);
|
||||
extern struct platform_device *of_find_device_by_node(struct device_node *np);
|
||||
|
||||
extern int of_bus_type_init(struct bus_type *bus, const char *name);
|
||||
|
||||
#if !defined(CONFIG_SPARC) /* SPARC has its own device registration method */
|
||||
/* Platform devices and busses creation */
|
||||
extern struct platform_device *of_platform_device_create(struct device_node *np,
|
||||
|
||||
Reference in New Issue
Block a user