linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: greg@kroah.com, guenter.roeck@ericsson.com, khali@linux-fr.org,
	dmitry.torokhov@gmail.com, broonie@opensource.wolfsonmicro.com,
	alan@lxorguk.ukuu.org.uk, arnd@arndb.de,
	linus.walleij@linaro.org, maxime.ripard@free-electrons.com,
	thomas.petazzoni@free-electrons.com, zdevai@gmail.com,
	w.sang@pengutronix.de, marek.vasut@gmail.com,
	Jonathan Cameron <jic23@cam.ac.uk>
Subject: [PATCH 6/6] stargate2: example of map configuration for iio to hwmon example.
Date: Wed, 15 Feb 2012 19:48:05 +0000	[thread overview]
Message-ID: <1329335285-31006-7-git-send-email-jic23@kernel.org> (raw)
In-Reply-To: <1329335285-31006-1-git-send-email-jic23@kernel.org>

From: Jonathan Cameron <jic23@cam.ac.uk>

Do not commit.
---
 arch/arm/mach-pxa/stargate2.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index b0656e15..ce7f0a3 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -54,6 +54,8 @@
 #include <linux/mfd/da903x.h>
 #include <linux/sht15.h>
 
+#include "../../../drivers/staging/iio/machine.h"
+
 #include "devices.h"
 #include "generic.h"
 
@@ -406,6 +408,25 @@ static struct i2c_pxa_platform_data i2c_pdata = {
 	.fast_mode = 1,
 };
 
+static struct iio_map max1363_consumer_map[] = {
+	{
+		.adc_channel_label = "AIN1",
+		.consumer_dev_name = "iio_hwmon.0",
+		.consumer_channel = "testchan1",
+	}, {
+		.adc_channel_label = "AIN2",
+		.consumer_dev_name = "iio_hwmon.0",
+		.consumer_channel = "testchan2",
+	},
+	{}
+};
+
+static struct platform_device iio_hwmon_test = {
+	.name = "iio_hwmon",
+};
+
+
+
 static void __init imote2_stargate2_init(void)
 {
 
@@ -561,6 +582,7 @@ static struct i2c_board_info __initdata imote2_i2c_board_info[] = {
 		 * pull up resistors are missing.
 		 */
 		.irq = PXA_GPIO_TO_IRQ(99),
+		.platform_data = max1363_consumer_map,
 	}, { /* ITS400 Sensor board only */
 		.type = "tsl2561",
 		.addr = 0x49,
@@ -945,6 +967,7 @@ static struct i2c_board_info __initdata stargate2_i2c_board_info[] = {
 		 * pull up resistors are missing.
 		 */
 		.irq = PXA_GPIO_TO_IRQ(99),
+		.platform_data = max1363_consumer_map,
 	}, { /* ITS400 Sensor board only */
 		.type = "tsl2561",
 		.addr = 0x49,
@@ -977,6 +1000,7 @@ static struct platform_device *stargate2_devices[] = {
 	&stargate2_sram,
 	&smc91x_device,
 	&sht15,
+	&iio_hwmon_test,
 };
 
 static void __init stargate2_init(void)
-- 
1.7.8.4

  parent reply	other threads:[~2012-02-15 19:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 19:47 [PATCH 0/6 V6] IIO: in kernel (as opposed to userspace) pull consumers Jonathan Cameron
2012-02-15 19:48 ` [PATCH 1/6] staging:iio:core set the iio_dev.info pointer to null on unregister under lock Jonathan Cameron
2012-02-15 19:48 ` [PATCH 2/6] staging:iio:core add in kernel interface mapping and getting IIO channels Jonathan Cameron
2012-02-15 19:48 ` [PATCH 3/6] staging:iio: move iio data return types into types.h for use by inkern Jonathan Cameron
2012-02-15 19:48 ` [PATCH 4/6] staging:iio::hwmon interface client driver Jonathan Cameron
2012-02-15 19:48 ` [PATCH 5/6] staging:iio:Documentation in kernel pull description Jonathan Cameron
2012-02-15 19:48 ` Jonathan Cameron [this message]
2012-02-15 21:07   ` [PATCH 6/6] stargate2: example of map configuration for iio to hwmon example Jonathan Cameron
2012-02-24 20:07     ` Greg KH
2012-02-25 11:19       ` Jonathan Cameron
2012-02-15 21:11 ` [PATCH 5.5/6] staging:iio:max1363 enable use with inkernel interfaces Jonathan Cameron
2012-02-15 21:50 ` [PATCH 0/6 V6] IIO: in kernel (as opposed to userspace) pull consumers Linus Walleij
2012-02-24 20:10   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2011-10-20  9:33 [RFC V3 PATCH 0/6] IIO in kernel interfaces Jonathan Cameron
2011-10-20  9:33 ` [PATCH 6/6] stargate2: example of map configuration for iio to hwmon example Jonathan Cameron
2011-10-19 14:47 [RFC V2 PATCH 0/6] IIO in kernel interfaces Jonathan Cameron
2011-10-19 14:47 ` [PATCH 6/6] stargate2: example of map configuration for iio to hwmon example Jonathan Cameron
2011-10-18 15:29 [RFC PATCH 0/6] IIO in kernel interfaces Jonathan Cameron
2011-10-18 15:29 ` [PATCH 6/6] stargate2: example of map configuration for iio to hwmon example Jonathan Cameron

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=1329335285-31006-7-git-send-email-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=greg@kroah.com \
    --cc=guenter.roeck@ericsson.com \
    --cc=jic23@cam.ac.uk \
    --cc=khali@linux-fr.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=w.sang@pengutronix.de \
    --cc=zdevai@gmail.com \
    /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).