Commit 48b1e3e8 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Simon Horman

ARM: shmobile: marzen: Add GPIO LEDs

The board has 3 LEDs connected to GPIOs. Add a led-gpio device to
support them.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent dc3465a9
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/leds.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
#include <linux/regulator/fixed.h> #include <linux/regulator/fixed.h>
...@@ -168,12 +169,43 @@ static struct platform_device usb_phy_device = { ...@@ -168,12 +169,43 @@ static struct platform_device usb_phy_device = {
.num_resources = ARRAY_SIZE(usb_phy_resources), .num_resources = ARRAY_SIZE(usb_phy_resources),
}; };
/* LEDS */
static struct gpio_led marzen_leds[] = {
{
.name = "led2",
.gpio = 157,
.default_state = LEDS_GPIO_DEFSTATE_ON,
}, {
.name = "led3",
.gpio = 158,
.default_state = LEDS_GPIO_DEFSTATE_ON,
}, {
.name = "led4",
.gpio = 159,
.default_state = LEDS_GPIO_DEFSTATE_ON,
},
};
static struct gpio_led_platform_data marzen_leds_pdata = {
.leds = marzen_leds,
.num_leds = ARRAY_SIZE(marzen_leds),
};
static struct platform_device leds_device = {
.name = "leds-gpio",
.id = 0,
.dev = {
.platform_data = &marzen_leds_pdata,
},
};
static struct platform_device *marzen_devices[] __initdata = { static struct platform_device *marzen_devices[] __initdata = {
&eth_device, &eth_device,
&sdhi0_device, &sdhi0_device,
&thermal_device, &thermal_device,
&hspi_device, &hspi_device,
&usb_phy_device, &usb_phy_device,
&leds_device,
}; };
/* USB */ /* USB */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment