linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] omap4: Add platform changes for PWM LED
Date: Fri, 17 Dec 2010 19:05:41 -0800	[thread overview]
Message-ID: <20101218030541.10251.37326.stgit@baageli.muru.com> (raw)
In-Reply-To: <20101218030406.10251.73118.stgit@baageli.muru.com>

From: Hemanth V <hemanthv@ti.com>

Register TWL6030 PWM, which is used as charging LED

Signed-off-by: Hemanth V <hemanthv@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-4430sdp.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 66f8943..33b1f73 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -23,6 +23,7 @@
 #include <linux/gpio_keys.h>
 #include <linux/regulator/machine.h>
 #include <linux/leds.h>
+#include <linux/leds_pwm.h>
 
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
@@ -97,6 +98,28 @@ static struct gpio_led_platform_data sdp4430_led_data = {
 	.num_leds	= ARRAY_SIZE(sdp4430_gpio_leds),
 };
 
+static struct led_pwm sdp4430_pwm_leds[] = {
+	{
+		.name		= "omap4:green:chrg",
+		.pwm_id		= 1,
+		.max_brightness	= 255,
+		.pwm_period_ns	= 7812500,
+	},
+};
+
+static struct led_pwm_platform_data sdp4430_pwm_data = {
+	.num_leds	= ARRAY_SIZE(sdp4430_pwm_leds),
+	.leds		= sdp4430_pwm_leds,
+};
+
+static struct platform_device sdp4430_leds_pwm = {
+	.name	= "leds_pwm",
+	.id	= -1,
+	.dev	= {
+		.platform_data = &sdp4430_pwm_data,
+	},
+};
+
 static int omap_prox_activate(struct device *dev)
 {
 	gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
@@ -204,6 +227,7 @@ static struct platform_device *sdp4430_devices[] __initdata = {
 	&sdp4430_lcd_device,
 	&sdp4430_gpio_keys_device,
 	&sdp4430_leds_gpio,
+	&sdp4430_leds_pwm,
 };
 
 static struct omap_lcd_config sdp4430_lcd_config __initdata = {

      parent reply	other threads:[~2010-12-18  3:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-18  3:05 [PATCH 0/6] Misc omap board patches for v2.6.38 merge window Tony Lindgren
2010-12-18  3:05 ` [PATCH 1/6] omap1: Fix innovator FPGA init for multi-omap Tony Lindgren
2010-12-18  3:05 ` [PATCH 2/6] OMAP4: Pandaboard: Add omap_reserve functionality Tony Lindgren
2010-12-18  8:27   ` Russell King - ARM Linux
2010-12-18 17:20     ` Tony Lindgren
2010-12-18 17:36       ` Russell King - ARM Linux
2010-12-18 17:41         ` Tony Lindgren
2010-12-18 17:50           ` Russell King - ARM Linux
2010-12-18 18:13             ` Tony Lindgren
2010-12-18  3:05 ` [PATCH 3/6] omap3: igepv2: Don't call gpio_set_value right aftergpio_direction_output Tony Lindgren
2010-12-18  3:05 ` [PATCH 4/6] omap3: igepv2: LED gpio-led:green:d1 is active low Tony Lindgren
2010-12-18  3:05 ` [PATCH 5/6] omap4: Add platform changes for Ambient Light sensor Tony Lindgren
2010-12-18  3:05 ` Tony Lindgren [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=20101218030541.10251.37326.stgit@baageli.muru.com \
    --to=tony@atomide.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).