From: w.sang@pengutronix.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm: mxs: tx28: add i2c bus and connected RTC
Date: Mon, 28 Feb 2011 17:40:05 +0100 [thread overview]
Message-ID: <1298911205-3070-3-git-send-email-w.sang@pengutronix.de> (raw)
In-Reply-To: <1298911205-3070-1-git-send-email-w.sang@pengutronix.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
arch/arm/mach-mxs/Kconfig | 1 +
arch/arm/mach-mxs/mach-tx28.c | 10 ++++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index 895d066..4f0b673 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -45,6 +45,7 @@ config MODULE_TX28
select MXS_HAVE_AMBA_DUART
select MXS_HAVE_PLATFORM_AUART
select MXS_HAVE_PLATFORM_FEC
+ select MXS_HAVE_PLATFORM_MXS_I2C
select MXS_HAVE_PLATFORM_MXS_PWM
config MACH_TX28
diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c
index b609b84..b65e371 100644
--- a/arch/arm/mach-mxs/mach-tx28.c
+++ b/arch/arm/mach-mxs/mach-tx28.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
+#include <linux/i2c.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
@@ -140,6 +141,12 @@ static struct spi_board_info tx28_spi_board_info[] = {
},
};
+static struct i2c_board_info tx28_stk5v3_i2c_boardinfo[] __initdata = {
+ {
+ I2C_BOARD_INFO("ds1339", 0x68),
+ },
+};
+
static void __init tx28_stk5v3_init(void)
{
mxs_iomux_setup_multiple_pads(tx28_stk5v3_pads,
@@ -154,6 +161,9 @@ static void __init tx28_stk5v3_init(void)
ARRAY_SIZE(tx28_spi_board_info));
mxs_add_platform_device("leds-gpio", 0, NULL, 0,
&tx28_stk5v3_led_data, sizeof(tx28_stk5v3_led_data));
+ mx28_add_mxs_i2c(0);
+ i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo,
+ ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo));
}
static void __init tx28_timer_init(void)
--
1.7.2.3
prev parent reply other threads:[~2011-02-28 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 16:40 [PATCH 0/2] mach-mxs: dynamic device creation for i.MX28-i2c Wolfram Sang
2011-02-28 16:40 ` [PATCH 1/2] arm: mxs: add i2c-devices for mx28 Wolfram Sang
2011-03-16 20:40 ` [PATCH] ARM: mxs: fix naming of struct holding info for mxs-i2c devices Uwe Kleine-König
2011-02-28 16:40 ` Wolfram Sang [this message]
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=1298911205-3070-3-git-send-email-w.sang@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).