mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -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: (63 commits) of/platform: Register of_platform_drivers with an "of:" prefix of/address: Clean up function declarations of/spi: call of_register_spi_devices() from spi core code of: Provide default of_node_to_nid() implementation. of/device: Make of_device_make_bus_id() usable by other code. of/irq: Fix endian issues in parsing interrupt specifiers of: Fix phandle endian issues of/flattree: fix of_flat_dt_is_compatible() to match the full compatible string of: remove of_default_bus_ids of: make of_find_device_by_node generic microblaze: remove references to of_device and to_of_device sparc: remove references to of_device and to_of_device powerpc: remove references to of_device and to_of_device of/device: Replace of_device with platform_device in includes and core code of/device: Protect against binding of_platform_drivers to non-OF devices of: remove asm/of_device.h of: remove asm/of_platform.h of/platform: remove all of_bus_type and of_platform_bus_type references of: Merge of_platform_bus_type with platform_bus_type drivercore/of: Add OF style matching to platform bus ... Fix up trivial conflicts in arch/microblaze/kernel/Makefile due to just some obj-y removals by the devicetree branch, while the microblaze updates added a new file.
This commit is contained in:
commit
03c0c29aff
190 changed files with 2492 additions and 3864 deletions
|
|
@ -652,6 +652,7 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev,
|
|||
cpm->adap = cpm_ops;
|
||||
i2c_set_adapdata(&cpm->adap, cpm);
|
||||
cpm->adap.dev.parent = &ofdev->dev;
|
||||
cpm->adap.dev.of_node = of_node_get(ofdev->dev.of_node);
|
||||
|
||||
result = cpm_i2c_setup(cpm);
|
||||
if (result) {
|
||||
|
|
@ -676,11 +677,6 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev,
|
|||
dev_dbg(&ofdev->dev, "hw routines for %s registered.\n",
|
||||
cpm->adap.name);
|
||||
|
||||
/*
|
||||
* register OF I2C devices
|
||||
*/
|
||||
of_register_i2c_devices(&cpm->adap, ofdev->dev.of_node);
|
||||
|
||||
return 0;
|
||||
out_shut:
|
||||
cpm_i2c_shutdown(cpm);
|
||||
|
|
|
|||
|
|
@ -745,6 +745,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
|
|||
/* Register it with i2c layer */
|
||||
adap = &dev->adap;
|
||||
adap->dev.parent = &ofdev->dev;
|
||||
adap->dev.of_node = of_node_get(np);
|
||||
strlcpy(adap->name, "IBM IIC", sizeof(adap->name));
|
||||
i2c_set_adapdata(adap, dev);
|
||||
adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
|
||||
|
|
@ -760,9 +761,6 @@ static int __devinit iic_probe(struct of_device *ofdev,
|
|||
dev_info(&ofdev->dev, "using %s mode\n",
|
||||
dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
|
||||
|
||||
/* Now register all the child nodes */
|
||||
of_register_i2c_devices(adap, np);
|
||||
|
||||
return 0;
|
||||
|
||||
error_cleanup:
|
||||
|
|
|
|||
|
|
@ -625,13 +625,13 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
|
|||
i2c->adap = mpc_ops;
|
||||
i2c_set_adapdata(&i2c->adap, i2c);
|
||||
i2c->adap.dev.parent = &op->dev;
|
||||
i2c->adap.dev.of_node = of_node_get(op->dev.of_node);
|
||||
|
||||
result = i2c_add_adapter(&i2c->adap);
|
||||
if (result < 0) {
|
||||
dev_err(i2c->dev, "failed to add adapter\n");
|
||||
goto fail_add;
|
||||
}
|
||||
of_register_i2c_devices(&i2c->adap, op->dev.of_node);
|
||||
|
||||
return result;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/of_i2c.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/irqflags.h>
|
||||
|
|
@ -70,6 +72,10 @@ static int i2c_device_match(struct device *dev, struct device_driver *drv)
|
|||
if (!client)
|
||||
return 0;
|
||||
|
||||
/* Attempt an OF style match */
|
||||
if (of_driver_match_device(dev, drv))
|
||||
return 1;
|
||||
|
||||
driver = to_i2c_driver(drv);
|
||||
/* match on an id table if there is one */
|
||||
if (driver->id_table)
|
||||
|
|
@ -790,6 +796,9 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
|
|||
if (adap->nr < __i2c_first_dynamic_bus_num)
|
||||
i2c_scan_static_board_info(adap);
|
||||
|
||||
/* Register devices from the device tree */
|
||||
of_i2c_register_devices(adap);
|
||||
|
||||
/* Notify drivers */
|
||||
mutex_lock(&core_lock);
|
||||
dummy = bus_for_each_drv(&i2c_bus_type, NULL, adap,
|
||||
|
|
|
|||
Loading…
Reference in a new issue