- Subject: Re: [PATCH 6/6] stargate2: example of map configuration for iio to hwmon example.
- From: Jonathan Cameron <jic23@xxxxxxxxxx>
- Date: Wed, 15 Feb 2012 21:07:56 +0000
- Cc: greg@xxxxxxxxx, guenter.roeck@xxxxxxxxxxxx, khali@xxxxxxxxxxxx, dmitry.torokhov@xxxxxxxxx, broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxxxxxx, arnd@xxxxxxxx, linus.walleij@xxxxxxxxxx, maxime.ripard@xxxxxxxxxxxxxxxxxx, thomas.petazzoni@xxxxxxxxxxxxxxxxxx, zdevai@xxxxxxxxx, w.sang@xxxxxxxxxxxxxx, marek.vasut@xxxxxxxxx, Jonathan Cameron <jic23@xxxxxxxxx>
- In-reply-to: <1329335285-31006-7-git-send-email-jic23@kernel.org>
- References: <1329335285-31006-1-git-send-email-jic23@kernel.org> <1329335285-31006-7-git-send-email-jic23@kernel.org>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111224 Thunderbird/9.0.1
On 02/15/2012 07:48 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <jic23@xxxxxxxxx>
>
> Do not commit.
Whilst this example was never meant to be committed, the obvious flaw
is that max1363 doesn't actually support these interfaces because
I left one patch out. Lets call it 5.5 and stick it before this one.
Sorry about that.
> ---
> 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]