Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ddab478 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Add mx31moboard MC13783 led support
  leds: Add mc13783 LED support
  leds: leds-ss4200: fix led_classdev_unregister twice in error handling
  leds: leds-lp3944: properly handle lp3944_configure fail in lp3944_probe
  leds: led-class: set permissions on max_brightness file to 0444
  leds: leds-gpio: Change blink_set callback to be able to turn off blinking
  leds: Add LED driver for the Soekris net5501 board
  leds: 88pm860x - fix checking in probe function
parents d1e0fe25 a7cca8ae
Loading
Loading
Loading
Loading
+44 −1
Original line number Original line Diff line number Diff line
@@ -220,11 +220,54 @@ static struct mc13783_regulator_init_data moboard_regulators[] = {
	},
	},
};
};


static struct mc13783_led_platform_data moboard_led[] = {
	{
		.id = MC13783_LED_R1,
		.name = "coreboard-led-4:red",
		.max_current = 2,
	},
	{
		.id = MC13783_LED_G1,
		.name = "coreboard-led-4:green",
		.max_current = 2,
	},
	{
		.id = MC13783_LED_B1,
		.name = "coreboard-led-4:blue",
		.max_current = 2,
	},
	{
		.id = MC13783_LED_R2,
		.name = "coreboard-led-5:red",
		.max_current = 3,
	},
	{
		.id = MC13783_LED_G2,
		.name = "coreboard-led-5:green",
		.max_current = 3,
	},
	{
		.id = MC13783_LED_B2,
		.name = "coreboard-led-5:blue",
		.max_current = 3,
	},
};

static struct mc13783_leds_platform_data moboard_leds = {
	.num_leds = ARRAY_SIZE(moboard_led),
	.led = moboard_led,
	.flags = MC13783_LED_SLEWLIMTC,
	.abmode = MC13783_LED_AB_DISABLED,
	.tc1_period = MC13783_LED_PERIOD_10MS,
	.tc2_period = MC13783_LED_PERIOD_10MS,
};

static struct mc13783_platform_data moboard_pmic = {
static struct mc13783_platform_data moboard_pmic = {
	.regulators = moboard_regulators,
	.regulators = moboard_regulators,
	.num_regulators = ARRAY_SIZE(moboard_regulators),
	.num_regulators = ARRAY_SIZE(moboard_regulators),
	.leds = &moboard_leds,
	.flags = MC13783_USE_REGULATOR | MC13783_USE_RTC |
	.flags = MC13783_USE_REGULATOR | MC13783_USE_RTC |
		MC13783_USE_ADC,
		MC13783_USE_ADC | MC13783_USE_LED,
};
};


static struct spi_board_info moboard_spi_board_info[] __initdata = {
static struct spi_board_info moboard_spi_board_info[] __initdata = {
+12 −10
Original line number Original line Diff line number Diff line
@@ -240,22 +240,23 @@ error_fail:


#define ORION_BLINK_HALF_PERIOD 100 /* ms */
#define ORION_BLINK_HALF_PERIOD 100 /* ms */


static int dns323_gpio_blink_set(unsigned gpio,
static int dns323_gpio_blink_set(unsigned gpio, int state,
	unsigned long *delay_on, unsigned long *delay_off)
	unsigned long *delay_on, unsigned long *delay_off)
{
{
	static int value = 0;


	if (!*delay_on && !*delay_off)
	if (delay_on && delay_off && !*delay_on && !*delay_off)
		*delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;
		*delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;


	if (ORION_BLINK_HALF_PERIOD == *delay_on
	switch(state) {
	    && ORION_BLINK_HALF_PERIOD == *delay_off) {
	case GPIO_LED_NO_BLINK_LOW:
		value = !value;
	case GPIO_LED_NO_BLINK_HIGH:
		orion_gpio_set_blink(gpio, value);
		orion_gpio_set_blink(gpio, 0);
		return 0;
		gpio_set_value(gpio, state);
		break;
	case GPIO_LED_BLINK:
		orion_gpio_set_blink(gpio, 1);
	}
	}

	return 0;
	return -EINVAL;
}
}


static struct gpio_led dns323_leds[] = {
static struct gpio_led dns323_leds[] = {
@@ -263,6 +264,7 @@ static struct gpio_led dns323_leds[] = {
		.name = "power:blue",
		.name = "power:blue",
		.gpio = DNS323_GPIO_LED_POWER2,
		.gpio = DNS323_GPIO_LED_POWER2,
		.default_trigger = "timer",
		.default_trigger = "timer",
		.active_low = 1,
	}, {
	}, {
		.name = "right:amber",
		.name = "right:amber",
		.gpio = DNS323_GPIO_LED_RIGHT_AMBER,
		.gpio = DNS323_GPIO_LED_RIGHT_AMBER,
+17 −0
Original line number Original line Diff line number Diff line
@@ -67,6 +67,16 @@ config LEDS_NET48XX
	  This option enables support for the Soekris net4801 and net4826 error
	  This option enables support for the Soekris net4801 and net4826 error
	  LED.
	  LED.


config LEDS_NET5501
	tristate "LED Support for Soekris net5501 series Error LED"
	depends on LEDS_CLASS && LEDS_TRIGGERS
	depends on LEDS_GPIO_PLATFORM && GPIO_CS5535
	select LEDS_TRIGGER_DEFAULT_ON
	default n
	help
	  Add support for the Soekris net5501 board (detection, error led
	  and GPIO).

config LEDS_FSG
config LEDS_FSG
	tristate "LED Support for the Freecom FSG-3"
	tristate "LED Support for the Freecom FSG-3"
	depends on MACH_FSG
	depends on MACH_FSG
@@ -285,6 +295,13 @@ config LEDS_DELL_NETBOOKS
	  This adds support for the Latitude 2100 and similar
	  This adds support for the Latitude 2100 and similar
	  notebooks that have an external LED.
	  notebooks that have an external LED.


config LEDS_MC13783
	tristate "LED Support for MC13783 PMIC"
	depends on MFD_MC13783
	help
	  This option enable support for on-chip LED drivers found
	  on Freescale Semiconductor MC13783 PMIC.

config LEDS_TRIGGERS
config LEDS_TRIGGERS
	bool "LED Trigger support"
	bool "LED Trigger support"
	help
	help
+2 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ obj-$(CONFIG_LEDS_MIKROTIK_RB532) += leds-rb532.o
obj-$(CONFIG_LEDS_S3C24XX)		+= leds-s3c24xx.o
obj-$(CONFIG_LEDS_S3C24XX)		+= leds-s3c24xx.o
obj-$(CONFIG_LEDS_AMS_DELTA)		+= leds-ams-delta.o
obj-$(CONFIG_LEDS_AMS_DELTA)		+= leds-ams-delta.o
obj-$(CONFIG_LEDS_NET48XX)		+= leds-net48xx.o
obj-$(CONFIG_LEDS_NET48XX)		+= leds-net48xx.o
obj-$(CONFIG_LEDS_NET5501)		+= leds-net5501.o
obj-$(CONFIG_LEDS_WRAP)			+= leds-wrap.o
obj-$(CONFIG_LEDS_WRAP)			+= leds-wrap.o
obj-$(CONFIG_LEDS_ALIX2)		+= leds-alix2.o
obj-$(CONFIG_LEDS_ALIX2)		+= leds-alix2.o
obj-$(CONFIG_LEDS_H1940)		+= leds-h1940.o
obj-$(CONFIG_LEDS_H1940)		+= leds-h1940.o
@@ -35,6 +36,7 @@ obj-$(CONFIG_LEDS_INTEL_SS4200) += leds-ss4200.o
obj-$(CONFIG_LEDS_LT3593)		+= leds-lt3593.o
obj-$(CONFIG_LEDS_LT3593)		+= leds-lt3593.o
obj-$(CONFIG_LEDS_ADP5520)		+= leds-adp5520.o
obj-$(CONFIG_LEDS_ADP5520)		+= leds-adp5520.o
obj-$(CONFIG_LEDS_DELL_NETBOOKS)	+= dell-led.o
obj-$(CONFIG_LEDS_DELL_NETBOOKS)	+= dell-led.o
obj-$(CONFIG_LEDS_MC13783)		+= leds-mc13783.o


# LED SPI Drivers
# LED SPI Drivers
obj-$(CONFIG_LEDS_DAC124S085)		+= leds-dac124s085.o
obj-$(CONFIG_LEDS_DAC124S085)		+= leds-dac124s085.o
+1 −1
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ static ssize_t led_max_brightness_show(struct device *dev,


static struct device_attribute led_class_attrs[] = {
static struct device_attribute led_class_attrs[] = {
	__ATTR(brightness, 0644, led_brightness_show, led_brightness_store),
	__ATTR(brightness, 0644, led_brightness_show, led_brightness_store),
	__ATTR(max_brightness, 0644, led_max_brightness_show, NULL),
	__ATTR(max_brightness, 0444, led_max_brightness_show, NULL),
#ifdef CONFIG_LEDS_TRIGGERS
#ifdef CONFIG_LEDS_TRIGGERS
	__ATTR(trigger, 0644, led_trigger_show, led_trigger_store),
	__ATTR(trigger, 0644, led_trigger_show, led_trigger_store),
#endif
#endif
Loading