linux-mips
[Top] [All Lists]

[PATCH 3/3] MIPS: Octeon: Register some devices on the I2C bus.

To: linux-mips@linux-mips.org, ralf@linux-mips.org, linux-i2c@vger.kernel.org, ben-linux@fluff.org, khali@linux-fr.org
Subject: [PATCH 3/3] MIPS: Octeon: Register some devices on the I2C bus.
From: David Daney <ddaney@caviumnetworks.com>
Date: Thu, 7 Jan 2010 11:54:21 -0800
Cc: rade.bozic.ext@nsn.com, David Daney <ddaney@caviumnetworks.com>
In-reply-to: <4B463B1F.6000404@caviumnetworks.com>
References: <4B463B1F.6000404@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
CC: Rade Bozic <rade.bozic.ext@nsn.com>
---
 arch/mips/cavium-octeon/octeon-platform.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/mips/cavium-octeon/octeon-platform.c 
b/arch/mips/cavium-octeon/octeon-platform.c
index f2c0602..d8f8129 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -10,6 +10,7 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/i2c.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -165,6 +166,18 @@ out:
 }
 device_initcall(octeon_rng_device_init);
 
+static struct i2c_board_info __initdata octeon_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("ds1337", 0x68),
+       },
+};
+
+static int __init octeon_i2c_devices_init(void)
+{
+       return i2c_register_board_info(0, octeon_i2c_devices,
+                                      ARRAY_SIZE(octeon_i2c_devices));
+}
+arch_initcall(octeon_i2c_devices_init);
 
 #define OCTEON_I2C_IO_BASE 0x1180000001000ull
 #define OCTEON_I2C_IO_UNIT_OFFSET 0x200
-- 
1.6.0.6


<Prev in Thread] Current Thread [Next in Thread>