mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
of: change of_match_device to work with struct device
of: Remove duplicate fields from of_platform_driver
drivercore: Add of_match_table to the common device drivers
arch/microblaze: Move dma_mask from of_device into pdev_archdata
arch/powerpc: Move dma_mask from of_device into pdev_archdata
of: eliminate of_device->node and dev_archdata->{of,prom}_node
of: Always use 'struct device.of_node' to get device node pointer.
i2c/of: Allow device node to be passed via i2c_board_info
driver-core: Add device node pointer to struct device
of: protect contents of of_platform.h and of_device.h
of/flattree: Make unflatten_device_tree() safe to call from any arch
of/flattree: make of_fdt.h safe to unconditionally include.
This commit is contained in:
commit
62a11ae340
211 changed files with 1254 additions and 974 deletions
|
|
@ -33,6 +33,7 @@ struct class;
|
|||
struct class_private;
|
||||
struct bus_type;
|
||||
struct bus_type_private;
|
||||
struct device_node;
|
||||
|
||||
struct bus_attribute {
|
||||
struct attribute attr;
|
||||
|
|
@ -127,6 +128,10 @@ struct device_driver {
|
|||
|
||||
bool suppress_bind_attrs; /* disables bind/unbind via sysfs */
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
const struct of_device_id *of_match_table;
|
||||
#endif
|
||||
|
||||
int (*probe) (struct device *dev);
|
||||
int (*remove) (struct device *dev);
|
||||
void (*shutdown) (struct device *dev);
|
||||
|
|
@ -435,6 +440,9 @@ struct device {
|
|||
override */
|
||||
/* arch specific additions */
|
||||
struct dev_archdata archdata;
|
||||
#ifdef CONFIG_OF
|
||||
struct device_node *of_node;
|
||||
#endif
|
||||
|
||||
dev_t devt; /* dev_t, creates the sysfs "dev" */
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include <linux/device.h> /* for struct device */
|
||||
#include <linux/sched.h> /* for completion */
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/of.h> /* for struct device_node */
|
||||
|
||||
extern struct bus_type i2c_bus_type;
|
||||
|
||||
|
|
@ -251,6 +252,9 @@ struct i2c_board_info {
|
|||
unsigned short addr;
|
||||
void *platform_data;
|
||||
struct dev_archdata *archdata;
|
||||
#ifdef CONFIG_OF
|
||||
struct device_node *of_node;
|
||||
#endif
|
||||
int irq;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef _LINUX_OF_DEVICE_H
|
||||
#define _LINUX_OF_DEVICE_H
|
||||
|
||||
#ifdef CONFIG_OF_DEVICE
|
||||
#include <linux/device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
|
@ -10,7 +11,7 @@
|
|||
#define to_of_device(d) container_of(d, struct of_device, dev)
|
||||
|
||||
extern const struct of_device_id *of_match_device(
|
||||
const struct of_device_id *matches, const struct of_device *dev);
|
||||
const struct of_device_id *matches, const struct device *dev);
|
||||
|
||||
extern struct of_device *of_dev_get(struct of_device *dev);
|
||||
extern void of_dev_put(struct of_device *dev);
|
||||
|
|
@ -26,5 +27,6 @@ static inline void of_device_free(struct of_device *dev)
|
|||
|
||||
extern ssize_t of_device_get_modalias(struct of_device *ofdev,
|
||||
char *str, ssize_t len);
|
||||
#endif /* CONFIG_OF_DEVICE */
|
||||
|
||||
#endif /* _LINUX_OF_DEVICE_H */
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ struct boot_param_header {
|
|||
__be32 dt_struct_size; /* size of the DT structure block */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_OF_FLATTREE)
|
||||
/* TBD: Temporary export of fdt globals - remove when code fully merged */
|
||||
extern int __initdata dt_root_addr_cells;
|
||||
extern int __initdata dt_root_size_cells;
|
||||
|
|
@ -98,6 +99,9 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
|
|||
/* Other Prototypes */
|
||||
extern void unflatten_device_tree(void);
|
||||
extern void early_init_devtree(void *);
|
||||
#else /* CONFIG_OF_FLATTREE */
|
||||
static inline void unflatten_device_tree(void) {}
|
||||
#endif /* CONFIG_OF_FLATTREE */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* _LINUX_OF_FDT_H */
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_OF_DEVICE
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
|
@ -30,10 +31,6 @@ extern struct bus_type of_platform_bus_type;
|
|||
*/
|
||||
struct of_platform_driver
|
||||
{
|
||||
const char *name;
|
||||
const struct of_device_id *match_table;
|
||||
struct module *owner;
|
||||
|
||||
int (*probe)(struct of_device* dev,
|
||||
const struct of_device_id *match);
|
||||
int (*remove)(struct of_device* dev);
|
||||
|
|
@ -66,5 +63,6 @@ static inline void of_unregister_platform_driver(struct of_platform_driver *drv)
|
|||
extern struct of_device *of_find_device_by_node(struct device_node *np);
|
||||
|
||||
extern int of_bus_type_init(struct bus_type *bus, const char *name);
|
||||
#endif /* CONFIG_OF_DEVICE */
|
||||
|
||||
#endif /* _LINUX_OF_PLATFORM_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue