diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2008-07-14 22:38:33 +0200 |
---|---|---|
committer | Jean Delvare <khali@mahadeva.delvare> | 2008-07-14 22:38:33 +0200 |
commit | 392a0408fdc4c9069c32a9a02b0088eae76c4618 (patch) | |
tree | afc609b4dfa91e8d3a230e8a7044c6d848f5a4d9 /drivers/i2c | |
parent | cf898dc5e9dfd1487b28ca0176b68722f05d4d48 (diff) |
i2c-sibyte: SWARM I2C board initialization
The standard rtc-m41t80.c driver cannot be used with the SWARM as it is,
because the board does not provide setup information for the I2C core.
As a result the bus and the address to probe for the M41T80 chip is not
known.
Here is a set of changes that fix the problem:
1. swarm-i2c.c -- SWARM I2C board setup, currently for the M41T80 chip on
the bus #1 only (there is a MAX6654 temperature sensor on the bus #0
which may be added in the future if we have a driver for that chip).
2. The i2c-sibyte.c BCM1250A SMBus controller driver now registers its
buses as numbered so that board setup is correctly applied.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-sibyte.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c index ac8822e7a5b..4ddefbf238e 100644 --- a/drivers/i2c/busses/i2c-sibyte.c +++ b/drivers/i2c/busses/i2c-sibyte.c @@ -143,7 +143,7 @@ static int __init i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed) csr_out32(speed, SMB_CSR(adap,R_SMB_FREQ)); csr_out32(0, SMB_CSR(adap,R_SMB_CONTROL)); - return i2c_add_adapter(i2c_adap); + return i2c_add_numbered_adapter(i2c_adap); } @@ -159,6 +159,7 @@ static struct i2c_adapter sibyte_board_adapter[2] = { .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .algo = NULL, .algo_data = &sibyte_board_data[0], + .nr = 0, .name = "SiByte SMBus 0", }, { @@ -167,6 +168,7 @@ static struct i2c_adapter sibyte_board_adapter[2] = { .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, .algo = NULL, .algo_data = &sibyte_board_data[1], + .nr = 1, .name = "SiByte SMBus 1", }, }; |