* [PATCH 0/2] ARM; shmobile: kzm9g: enable sensors on the board
@ 2012-09-14 9:14 Tetsuyuki Kobayashi
2012-09-18 1:37 ` Simon Horman
2012-09-18 1:54 ` Simon Horman
0 siblings, 2 replies; 6+ messages in thread
From: Tetsuyuki Kobayashi @ 2012-09-14 9:14 UTC (permalink / raw)
To: linux-sh
Hello, simon-san
KZM-A9-GT board (kzm9g) has 2 sensor chip on the board.
- magnetometer AK8975
- three-axis digital accelerometer ADXL345
This patch registers device driver and assign I2C slave address and IRQ.
Tetsuyuki Kobayashi (2):
ARM: shmobile: kzm9g: enable magnetometer ak8975.
ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345
arch/arm/configs/kzm9g_defconfig | 4 ++++
arch/arm/mach-shmobile/board-kzm9g.c | 10 +++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] ARM: shmobile: kzm9g: enable magnetometer ak8975.
@ 2012-09-14 9:14 Tetsuyuki Kobayashi
0 siblings, 0 replies; 6+ messages in thread
From: Tetsuyuki Kobayashi @ 2012-09-14 9:14 UTC (permalink / raw)
To: linux-sh
This patch enables magnetometer ak8975.
I checked ak8975_probe() returns successfully.
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
arch/arm/configs/kzm9g_defconfig | 2 ++
arch/arm/mach-shmobile/board-kzm9g.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig
index 2388c86..2aaa2ff 100644
--- a/arch/arm/configs/kzm9g_defconfig
+++ b/arch/arm/configs/kzm9g_defconfig
@@ -118,6 +118,8 @@ CONFIG_DMADEVICES=y
CONFIG_SH_DMAE=y
CONFIG_ASYNC_TX_DMA=y
CONFIG_STAGING=y
+CONFIG_SENSORS_AK8975=y
+CONFIG_IIO=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY_USER=y
CONFIG_VFAT_FS=y
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 04c836d..9c045d4 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -562,7 +562,11 @@ static struct i2c_board_info i2c0_devices[] = {
},
{
I2C_BOARD_INFO("r2025sd", 0x32),
- }
+ },
+ {
+ I2C_BOARD_INFO("ak8975", 0x0c),
+ .irq = intcs_evt2irq(0x3380), /* IRQ28 */
+ },
};
static struct i2c_board_info i2c1_devices[] = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] ARM; shmobile: kzm9g: enable sensors on the board
2012-09-14 9:14 [PATCH 0/2] ARM; shmobile: kzm9g: enable sensors on the board Tetsuyuki Kobayashi
@ 2012-09-18 1:37 ` Simon Horman
2012-09-18 1:54 ` Simon Horman
1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2012-09-18 1:37 UTC (permalink / raw)
To: linux-sh
On Fri, Sep 14, 2012 at 06:14:27PM +0900, Tetsuyuki Kobayashi wrote:
> Hello, simon-san
>
> KZM-A9-GT board (kzm9g) has 2 sensor chip on the board.
> - magnetometer AK8975
> - three-axis digital accelerometer ADXL345
> This patch registers device driver and assign I2C slave address and IRQ.
>
> Tetsuyuki Kobayashi (2):
> ARM: shmobile: kzm9g: enable magnetometer ak8975.
> ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345
Thanks I have applied these changes to the boards branch,
I will now send them to linux-arm-kernel@lists.infradead.org for review
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] ARM; shmobile: kzm9g: enable sensors on the board
2012-09-14 9:14 [PATCH 0/2] ARM; shmobile: kzm9g: enable sensors on the board Tetsuyuki Kobayashi
2012-09-18 1:37 ` Simon Horman
@ 2012-09-18 1:54 ` Simon Horman
2012-09-18 1:54 ` [PATCH 1/2] ARM: shmobile: kzm9g: enable magnetometer ak8975 Simon Horman
2012-09-18 1:54 ` [PATCH 2/2] ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345 Simon Horman
1 sibling, 2 replies; 6+ messages in thread
From: Simon Horman @ 2012-09-18 1:54 UTC (permalink / raw)
To: linux-arm-kernel
This is a forward of a short patch series by Tetsuyuki Kobayashi
to linux-arm-kernel in preparation for a future pull request.
----------------------------------------------------------------
KZM-A9-GT board (kzm9g) has 2 sensor chip on the board.
- magnetometer AK8975
- three-axis digital accelerometer ADXL345
This patch registers device driver and assign I2C slave address and IRQ.
Tetsuyuki Kobayashi (2):
ARM: shmobile: kzm9g: enable magnetometer ak8975.
ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345
arch/arm/configs/kzm9g_defconfig | 4 ++++
arch/arm/mach-shmobile/board-kzm9g.c | 10 +++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] ARM: shmobile: kzm9g: enable magnetometer ak8975.
2012-09-18 1:54 ` Simon Horman
@ 2012-09-18 1:54 ` Simon Horman
2012-09-18 1:54 ` [PATCH 2/2] ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345 Simon Horman
1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2012-09-18 1:54 UTC (permalink / raw)
To: linux-arm-kernel
From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
This patch enables magnetometer ak8975.
I checked ak8975_probe() returns successfully.
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/kzm9g_defconfig | 2 ++
arch/arm/mach-shmobile/board-kzm9g.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig
index 2388c86..2aaa2ff 100644
--- a/arch/arm/configs/kzm9g_defconfig
+++ b/arch/arm/configs/kzm9g_defconfig
@@ -118,6 +118,8 @@ CONFIG_DMADEVICES=y
CONFIG_SH_DMAE=y
CONFIG_ASYNC_TX_DMA=y
CONFIG_STAGING=y
+CONFIG_SENSORS_AK8975=y
+CONFIG_IIO=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY_USER=y
CONFIG_VFAT_FS=y
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 53b7ea9..7965012 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -558,7 +558,11 @@ static struct i2c_board_info i2c0_devices[] = {
},
{
I2C_BOARD_INFO("r2025sd", 0x32),
- }
+ },
+ {
+ I2C_BOARD_INFO("ak8975", 0x0c),
+ .irq = intcs_evt2irq(0x3380), /* IRQ28 */
+ },
};
static struct i2c_board_info i2c1_devices[] = {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345
2012-09-18 1:54 ` Simon Horman
2012-09-18 1:54 ` [PATCH 1/2] ARM: shmobile: kzm9g: enable magnetometer ak8975 Simon Horman
@ 2012-09-18 1:54 ` Simon Horman
1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2012-09-18 1:54 UTC (permalink / raw)
To: linux-arm-kernel
From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
This patch enables three-axis digital accelerometer ADXL345.
Test:
sudo cat /dev/input/event2
then tip up the board. You get something from /dev/input/event2.
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/kzm9g_defconfig | 2 ++
arch/arm/mach-shmobile/board-kzm9g.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig
index 2aaa2ff..83047e0 100644
--- a/arch/arm/configs/kzm9g_defconfig
+++ b/arch/arm/configs/kzm9g_defconfig
@@ -73,6 +73,8 @@ CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ST1232=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_ADXL34X=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_NR_UARTS=9
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 7965012..72f75e2 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -563,6 +563,10 @@ static struct i2c_board_info i2c0_devices[] = {
I2C_BOARD_INFO("ak8975", 0x0c),
.irq = intcs_evt2irq(0x3380), /* IRQ28 */
},
+ {
+ I2C_BOARD_INFO("adxl34x", 0x1d),
+ .irq = intcs_evt2irq(0x3340), /* IRQ26 */
+ },
};
static struct i2c_board_info i2c1_devices[] = {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-18 1:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 9:14 [PATCH 0/2] ARM; shmobile: kzm9g: enable sensors on the board Tetsuyuki Kobayashi
2012-09-18 1:37 ` Simon Horman
2012-09-18 1:54 ` Simon Horman
2012-09-18 1:54 ` [PATCH 1/2] ARM: shmobile: kzm9g: enable magnetometer ak8975 Simon Horman
2012-09-18 1:54 ` [PATCH 2/2] ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345 Simon Horman
-- strict thread matches above, loose matches on Subject: below --
2012-09-14 9:14 [PATCH 1/2] ARM: shmobile: kzm9g: enable magnetometer ak8975 Tetsuyuki Kobayashi
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).