summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-03-14 09:00:03 +0100
committerStefan Agner <stefan.agner@toradex.com>2014-03-14 09:32:00 +0100
commitaef4075a0bcc7860eafa17be0c6e6cfcecc68206 (patch)
tree67f3c74e998dc0780997c6739f6e31abbde02aa6
parent9d28b6ca80811b2129581b308fe34997bb3a199d (diff)
colibri_vf: add PWM LED platform data for PWM channels
Add platform data for PWM channels B, C and D to be LED PWM. The PWM value can now be set from userspace using /sys/class/leds/PWM*.
-rw-r--r--arch/arm/mach-mvf/board-colibri_vf.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/arm/mach-mvf/board-colibri_vf.c b/arch/arm/mach-mvf/board-colibri_vf.c
index f5a5a054e2a5..782d8d7b2ddd 100644
--- a/arch/arm/mach-mvf/board-colibri_vf.c
+++ b/arch/arm/mach-mvf/board-colibri_vf.c
@@ -550,30 +550,31 @@ static struct mxc_nand_platform_data mvf_data __initdata = {
.width = 1,
};
-#if 0
/* PWM LEDs */
static struct led_pwm tegra_leds_pwm[] = {
+#if 0
{
.name = "PWM<A>",
.pwm_id = 1,
.max_brightness = 255,
.pwm_period_ns = 19600,
},
+#endif
{
.name = "PWM<B>",
- .pwm_id = 1,
+ .pwm_id = 2,
.max_brightness = 255,
.pwm_period_ns = 19600,
},
{
.name = "PWM<C>",
- .pwm_id = 2,
+ .pwm_id = 3,
.max_brightness = 255,
.pwm_period_ns = 19600,
},
{
.name = "PWM<D>",
- .pwm_id = 3,
+ .pwm_id = 4,
.max_brightness = 255,
.pwm_period_ns = 19600,
},
@@ -583,7 +584,6 @@ static struct led_pwm_platform_data tegra_leds_pwm_data = {
.num_leds = ARRAY_SIZE(tegra_leds_pwm),
.leds = tegra_leds_pwm,
};
-#endif
static struct imx_asrc_platform_data imx_asrc_data = {
.channel_bits = 4,
@@ -667,13 +667,10 @@ static void __init mvf_board_init(void)
mvf_add_nand(&mvf_data);
-#if 0
- mvf_add_mxc_pwm(0);
-// mvf_add_mxc_pwm(1);
-// mvf_add_mxc_pwm(2);
-// mvf_add_mxc_pwm(3);
+ mvf_add_mxc_pwm(1);
+ mvf_add_mxc_pwm(2);
+ mvf_add_mxc_pwm(3);
mvf_add_pwm_leds(&tegra_leds_pwm_data);
-#endif
imx_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk");
imx_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk");