[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-i2c
Subject: [i2c] [patch 8/8] ANUBIS: Add i2c device list to Simtec Anubis
From: Ben Dooks <ben-linux () fluff ! org>
Date: 2008-05-29 13:22:52
Message-ID: 20080529132407.411945350 () fluff ! org ! uk
[Download RAW message or body]
Add i2c board info initialiser to setup the list of
I2C devices present on an Simtec Anubis.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.26-rc4-quilt1/arch/arm/mach-s3c2440/mach-anubis.c
===================================================================
--- linux-2.6.26-rc4-quilt1.orig/arch/arm/mach-s3c2440/mach-anubis.c 2008-05-28 00:04:12.000000000 +0100
+++ linux-2.6.26-rc4-quilt1/arch/arm/mach-s3c2440/mach-anubis.c 2008-05-28 00:05:42.000000000 +0100
@@ -1,6 +1,6 @@
/* linux/arch/arm/mach-s3c2440/mach-anubis.c
*
- * Copyright (c) 2003-2005 Simtec Electronics
+ * Copyright (c) 2003-2005,2008 Simtec Electronics
* http://armlinux.simtec.co.uk/
* Ben Dooks <ben@simtec.co.uk>
*
@@ -18,6 +18,7 @@
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
+#include <linux/i2c.h>
#include <linux/sm501.h>
#include <linux/sm501-regs.h>
@@ -421,6 +422,19 @@ static struct clk *anubis_clocks[] = {
&s3c24xx_uclk,
};
+/* I2C devices. */
+
+static struct i2c_board_info anubis_i2c_info[] __initdata = {
+ {
+ .type = "tps65011",
+ .addr = 0x48,
+ .irq = IRQ_EINT20,
+ }, {
+ .type = "eeprom",
+ .addr = 0x50,
+ }
+};
+
static void __init anubis_map_io(void)
{
/* initialise the clocks */
@@ -460,6 +474,9 @@ static void __init anubis_map_io(void)
static void __init anubis_init(void)
{
platform_add_devices(anubis_devices, ARRAY_SIZE(anubis_devices));
+
+ i2c_register_board_info(0, anubis_i2c_info,
+ ARRAY_SIZE(anubis_i2c_info));
}
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
_______________________________________________
i2c mailing list
i2c@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic