linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3] omap: rx51: Platform support for lp5523 led chip
Date: Tue, 5 Apr 2011 15:03:20 +0300	[thread overview]
Message-ID: <20110405120319.GC30505@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <1301652972-29666-1-git-send-email-ameya.palande@nokia.com>

On Fri, Apr 01, 2011 at 01:16:12PM +0300, Ameya Palande wrote:
> Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>

Reviewed-by: Felipe Balbi <balbi@ti.com>

> ---
>  arch/arm/mach-omap2/board-rx51-peripherals.c |   66 ++++++++++++++++++++++++++
>  1 files changed, 66 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
> index bbcb677..d8ec895 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -38,6 +38,7 @@
>  #include <sound/tpa6130a2-plat.h>
>  #include <media/radio-si4713.h>
>  #include <media/si4713.h>
> +#include <linux/leds-lp5523.h>
>  
>  #include <../drivers/staging/iio/light/tsl2563.h>
>  
> @@ -51,6 +52,7 @@
>  #define RX51_WL1251_IRQ_GPIO		42
>  #define RX51_FMTX_RESET_GPIO		163
>  #define RX51_FMTX_IRQ			53
> +#define RX51_LP5523_CHIP_EN_GPIO	41
>  
>  /* list all spi devices here */
>  enum {
> @@ -67,6 +69,64 @@ static struct tsl2563_platform_data rx51_tsl2563_platform_data = {
>  };
>  #endif
>  
> +#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
> +static struct lp5523_led_config rx51_lp5523_led_config[] = {
> +	{
> +		.chan_nr	= 0,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 1,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 2,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 3,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 4,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 5,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 6,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 7,
> +		.led_current	= 50,
> +	}, {
> +		.chan_nr	= 8,
> +		.led_current	= 50,
> +	}
> +};
> +
> +static int rx51_lp5523_setup(void)
> +{
> +	return gpio_request_one(RX51_LP5523_CHIP_EN_GPIO, GPIOF_DIR_OUT,
> +			"lp5523_enable");
> +}
> +
> +static void rx51_lp5523_release(void)
> +{
> +	gpio_free(RX51_LP5523_CHIP_EN_GPIO);
> +}
> +
> +static void rx51_lp5523_enable(bool state)
> +{
> +	gpio_set_value(RX51_LP5523_CHIP_EN_GPIO, !!state);
> +}
> +
> +static struct lp5523_platform_data rx51_lp5523_platform_data = {
> +	.led_config		= rx51_lp5523_led_config,
> +	.num_channels		= ARRAY_SIZE(rx51_lp5523_led_config),
> +	.clock_mode		= LP5523_CLOCK_AUTO,
> +	.setup_resources	= rx51_lp5523_setup,
> +	.release_resources	= rx51_lp5523_release,
> +	.enable			= rx51_lp5523_enable,
> +};
> +#endif
> +
>  static struct omap2_mcspi_device_config wl1251_mcspi_config = {
>  	.turbo_mode	= 0,
>  	.single_channel	= 1,
> @@ -816,6 +876,12 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
>  		.platform_data = &rx51_tsl2563_platform_data,
>  	},
>  #endif
> +#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
> +	{
> +		I2C_BOARD_INFO("lp5523", 0x32),
> +		.platform_data  = &rx51_lp5523_platform_data,
> +	},
> +#endif
>  	{
>  		I2C_BOARD_INFO("tpa6130a2", 0x60),
>  		.platform_data = &rx51_tpa6130a2_data,
> -- 
> 1.7.1
> 

-- 
balbi

  reply	other threads:[~2011-04-05 12:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 12:17 [PATCH] omap: rx51: Platform support for lp5523 led chip Ameya Palande
2011-03-31 12:27 ` Felipe Balbi
2011-03-31 12:27 ` Aaro Koskinen
2011-03-31 13:38   ` [PATCHv2] " Ameya Palande
2011-03-31 13:50     ` Jarkko Nikula
2011-03-31 14:26     ` Felipe Balbi
2011-03-31 15:30       ` Ameya Palande
2011-03-31 15:44         ` Felipe Balbi
2011-04-01  9:58           ` Ameya Palande
2011-04-01 10:16           ` [PATCHv3] " Ameya Palande
2011-04-05 12:03             ` Felipe Balbi [this message]
2011-05-31 12:55             ` Tony Lindgren
2011-04-05 12:00           ` [PATCHv2] " Ameya Palande
2011-04-05 12:03             ` 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=20110405120319.GC30505@legolas.emea.dhcp.ti.com \
    --to=balbi@ti.com \
    --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).