summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingchang Lu <b35083@freescale.com>2012-09-12 13:50:15 +0800
committerAndy Voltz <andy.voltz@timesys.com>2012-10-17 14:37:22 -0400
commit163da8b897550dad394cd1483c6bca9aa730c8e1 (patch)
tree1761cf79da8a70199ad8bcc00454d7ae64aebc12
parentd69fab521df6877782ed38b11677057a5400cbc4 (diff)
ENGR00180956-3: Add PWM LED device support on MVF600
Four LEDS are connected to FTM0 ch0~3 on TWR-MVF600 board, the PWM signal can use control these LEDS on/off or demo. Signed-off-by: Jingchang Lu <b35083@freescale.com>
-rw-r--r--arch/arm/mach-mvf/board-twr-vf700.c15
-rw-r--r--arch/arm/mach-mvf/devices-mvf.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-mvf/board-twr-vf700.c b/arch/arm/mach-mvf/board-twr-vf700.c
index 187293ec369a..4b5e7cd7024c 100644
--- a/arch/arm/mach-mvf/board-twr-vf700.c
+++ b/arch/arm/mach-mvf/board-twr-vf700.c
@@ -339,6 +339,19 @@ static struct mxc_nand_platform_data mvf_data __initdata = {
.width = 2,
};
+static struct led_pwm mvf_led __initdata = {
+ .name = "mvf_leds",
+ .pwm_id = 1,
+ .active_low = 0,
+ .max_brightness = 6,
+ .pwm_period_ns = 100000000,
+};
+
+static struct led_pwm_platform_data mvf_led_data __initdata = {
+ .num_leds = 1,
+ .leds = &mvf_led,
+};
+
static void __init mvf_twr_init_usb(void)
{
imx_otg_base = MVF_IO_ADDRESS(MVF_USBC0_BASE_ADDR);
@@ -383,6 +396,8 @@ static void __init mvf_board_init(void)
mvf_add_nand(&mvf_data);
mvf_add_mxc_pwm(0);
+ mvf_add_pwm_leds(&mvf_led_data);
+
}
static void __init mvf_timer_init(void)
diff --git a/arch/arm/mach-mvf/devices-mvf.h b/arch/arm/mach-mvf/devices-mvf.h
index e96c7edd0395..4e852fef4a4c 100644
--- a/arch/arm/mach-mvf/devices-mvf.h
+++ b/arch/arm/mach-mvf/devices-mvf.h
@@ -207,3 +207,6 @@ extern const struct imx_pxp_data mvf_pxp_data __initconst;
extern const struct imx_epdc_data mvf_epdc_data __initconst;
#define mvf_add_imx_epdc(pdata) \
imx_add_imx_epdc(&mvf_epdc_data, pdata)
+
+#define mvf_add_pwm_leds(pdata) \
+ imx_add_platform_device("leds_pwm", 0, NULL, 0, pdata, sizeof(*pdata))