diff options
author | Matej Kenda <matej.kenda@hermes-softlab.com> | 2007-03-05 13:06:40 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-04-21 21:36:55 +0200 |
commit | a79220b7633b3926a9bd3527bdac3f04dbe6845c (patch) | |
tree | 3f468fa05d28b330858555bac598e968c55accf7 /include/asm-arm | |
parent | [ARM] 4236/2: basic {enable,disable}_irq_wake() support for PXA (diff) | |
download | linux-a79220b7633b3926a9bd3527bdac3f04dbe6845c.tar.xz linux-a79220b7633b3926a9bd3527bdac3f04dbe6845c.zip |
[ARM] 4246/1: i2c-pxa: add adapter class to platform specific data
Reposted patch for kernel 2.6.21-rc2.
The driver i2c-pxa doesn't set the class member in i2c_adapter, which
is used to register the I2C adapter. The hwmon (sensors) drivers (e.g.
adm1021) that are connected to a i2c-pxa adapter don't attach because
they expect that the adapter supports class I2C_CLASS_HWMON.
This patch adds functionality to allow platforms to set the class and
pass it as platform_data to the i2c-pxa driver. Sample usage in
platform code:
static struct i2c_pxa_platform_data my_i2c_platform_data = {
.class = I2C_CLASS_HWMON
};
static void __init my_platform_init(void)
{
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
pxa_set_i2c_info(&my_i2c_platform_data);
}
Signed-off-by: Matej Kenda <matej.kenda@hermes-softlab.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-pxa/i2c.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-arm/arch-pxa/i2c.h b/include/asm-arm/arch-pxa/i2c.h index 46ec2243974a..e404b233d8a8 100644 --- a/include/asm-arm/arch-pxa/i2c.h +++ b/include/asm-arm/arch-pxa/i2c.h @@ -64,6 +64,7 @@ struct i2c_slave_client; struct i2c_pxa_platform_data { unsigned int slave_addr; struct i2c_slave_client *slave; + unsigned int class; }; extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); |