Skip to content

Commit

Permalink
Add i2c_board_info for RiscPC PCF8583
Browse files Browse the repository at this point in the history
Add the necessary i2c_board_info structure to fix the lack of PCF8583
RTC on RiscPC.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
  • Loading branch information
Russell King authored and Jean Delvare committed Feb 24, 2009
1 parent 082a4cf commit 531660e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions arch/arm/mach-rpc/riscpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/serial_8250.h>
#include <linux/ata_platform.h>
#include <linux/io.h>
#include <linux/i2c.h>

#include <asm/elf.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -201,8 +202,13 @@ static struct platform_device *devs[] __initdata = {
&pata_device,
};

static struct i2c_board_info i2c_rtc = {
I2C_BOARD_INFO("pcf8583", 0x50)
};

static int __init rpc_init(void)
{
i2c_register_board_info(0, &i2c_rtc, 1);
return platform_add_devices(devs, ARRAY_SIZE(devs));
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/i2c/busses/i2c-acorn.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ static struct i2c_algo_bit_data ioc_data = {
};

static struct i2c_adapter ioc_ops = {
.nr = 0,
.algo_data = &ioc_data,
};

static int __init i2c_ioc_init(void)
{
force_ones = FORCE_ONES | SCL | SDA;

return i2c_bit_add_bus(&ioc_ops);
return i2c_bit_add_numbered_bus(&ioc_ops);
}

module_init(i2c_ioc_init);

0 comments on commit 531660e

Please sign in to comment.