From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: linux-omap@vger.kernel.org
Subject: [RFC PATCH 4/5] arm: omap: n8x0: add i2c-cbus platform data
Date: Wed, 29 Aug 2012 00:34:26 +0300 [thread overview]
Message-ID: <1346189667-32330-5-git-send-email-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <1346189667-32330-1-git-send-email-aaro.koskinen@iki.fi>
Add platform data to enable i2c-cbus on N8x0. It will be I2C bus #3.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/arm/mach-omap2/board-n8x0.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 677357f..8ea0dea 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -18,6 +18,7 @@
#include <linux/io.h>
#include <linux/stddef.h>
#include <linux/i2c.h>
+#include <linux/i2c-cbus.h>
#include <linux/spi/spi.h>
#include <linux/usb/musb.h>
#include <sound/tlv320aic3x.h>
@@ -42,6 +43,31 @@
#define TUSB6010_GPIO_ENABLE 0
#define TUSB6010_DMACHAN 0x3f
+#if defined(CONFIG_I2C_CBUS) || defined(CONFIG_I2C_CBUS_MODULE)
+static struct i2c_cbus_platform_data n8x0_cbus_data = {
+ .clk_gpio = 66,
+ .dat_gpio = 65,
+ .sel_gpio = 64,
+};
+
+static struct platform_device n8x0_cbus_device = {
+ .name = "i2c-cbus",
+ .id = 3,
+ .dev = {
+ .platform_data = &n8x0_cbus_data,
+ },
+};
+
+static void __init n8x0_cbus_init(void)
+{
+ platform_device_register(&n8x0_cbus_device);
+}
+#else /* CONFIG_I2C_CBUS */
+static void __init n8x0_cbus_init(void)
+{
+}
+#endif /* CONFIG_I2C_CBUS */
+
#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
/*
* Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
@@ -681,6 +707,7 @@ static void __init n8x0_init_machine(void)
gpmc_onenand_init(board_onenand_data);
n8x0_mmc_init();
n8x0_usb_init();
+ n8x0_cbus_init();
}
MACHINE_START(NOKIA_N800, "Nokia N800")
--
1.7.2.5
next prev parent reply other threads:[~2012-08-28 21:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 21:34 [RFC PATCH 0/5] cbus/retu drivers to mainline Aaro Koskinen
2012-08-28 21:34 ` [RFC PATCH 1/5] i2c: introduce i2c-cbus driver Aaro Koskinen
2012-08-29 23:35 ` Tony Lindgren
[not found] ` <1346189667-32330-2-git-send-email-aaro.koskinen-X3B1VOXEql0@public.gmane.org>
2012-08-30 15:34 ` Felipe Balbi
2012-08-28 21:34 ` [RFC PATCH 2/5] mfd: introduce retu-mfd driver Aaro Koskinen
2012-08-29 23:37 ` Tony Lindgren
2012-08-30 15:36 ` Felipe Balbi
2012-09-19 15:30 ` Samuel Ortiz
2012-08-28 21:34 ` [RFC PATCH 3/5] watchdog: introduce retu_wdt driver Aaro Koskinen
2012-08-29 23:38 ` Tony Lindgren
2012-08-28 21:34 ` Aaro Koskinen [this message]
2012-08-29 23:39 ` [RFC PATCH 4/5] arm: omap: n8x0: add i2c-cbus platform data Tony Lindgren
2012-08-30 15:38 ` Felipe Balbi
2012-08-28 21:34 ` [RFC PATCH 5/5] arm: omap: n8x0: enable retu Aaro Koskinen
2012-08-29 23:40 ` Tony Lindgren
2012-08-30 15:39 ` Felipe Balbi
2012-08-29 23:28 ` [RFC PATCH 0/5] cbus/retu drivers to mainline Tony Lindgren
2012-08-30 15:39 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346189667-32330-5-git-send-email-aaro.koskinen@iki.fi \
--to=aaro.koskinen@iki.fi \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).