mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
omap4: Add platform changes for PWM LED
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>
This commit is contained in:
parent
d048aca2e2
commit
f389f4cb46
1 changed files with 24 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include <linux/gpio_keys.h>
|
#include <linux/gpio_keys.h>
|
||||||
#include <linux/regulator/machine.h>
|
#include <linux/regulator/machine.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
|
#include <linux/leds_pwm.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/omap4-common.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),
|
.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)
|
static int omap_prox_activate(struct device *dev)
|
||||||
{
|
{
|
||||||
gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
|
gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
|
||||||
|
@ -204,6 +227,7 @@ static struct platform_device *sdp4430_devices[] __initdata = {
|
||||||
&sdp4430_lcd_device,
|
&sdp4430_lcd_device,
|
||||||
&sdp4430_gpio_keys_device,
|
&sdp4430_gpio_keys_device,
|
||||||
&sdp4430_leds_gpio,
|
&sdp4430_leds_gpio,
|
||||||
|
&sdp4430_leds_pwm,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct omap_lcd_config sdp4430_lcd_config __initdata = {
|
static struct omap_lcd_config sdp4430_lcd_config __initdata = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue