lkml.org 
[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 84/96] ARM: Add i2c_board_info for RiscPC PCF8583

2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------

From: Russell King <rmk+kernel@arm.linux.org.uk>

commit 531660ef5604c75de6fdead9da1304051af17c09 upstream

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
arch/arm/mach-rpc/riscpc.c | 6 ++++++
drivers/i2c/busses/i2c-acorn.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)

--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -18,6 +18,7 @@
#include <linux/device.h>
#include <linux/serial_8250.h>
#include <linux/ata_platform.h>
+#include <linux/i2c.h>

#include <asm/elf.h>
#include <asm/io.h>
@@ -201,8 +202,13 @@ static struct platform_device *devs[] __
&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));
}

--- a/drivers/i2c/busses/i2c-acorn.c
+++ b/drivers/i2c/busses/i2c-acorn.c
@@ -84,6 +84,7 @@ static struct i2c_algo_bit_data ioc_data

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

@@ -91,7 +92,7 @@ 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);



\
 
 \ /
  Last update: 2009-03-14 01:51    [W:0.228 / U:1.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site