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

Commit b98d13c7 authored by G.Shark Jeong's avatar G.Shark Jeong Committed by Bryan Wu
Browse files

leds: Add new LED driver for lm355x chips



This driver is a general version for LM355x,lm3554 and lm3556,led chips of TI.

LM3554 :
The LM3554 is a 2 MHz fixed-frequency synchronous boost
converter with 1.2A dual high side led drivers.
Datasheet: www.ti.com/lit/ds/symlink/lm3554.pdf

LM3556 :
The LM3556 is a 4 MHz fixed-frequency synchronous boost
converter plus 1.5A constant current driver for a high-current white LED.
Datasheet: www.national.com/ds/LM/LM3556.pdf

(bryan.wu@canonical.com: use flush_work() to replace flush_work_sync() which is
deprecated)

Signed-off-by: default avatarG.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@canonical.com>
parent 56a1e9ad
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -423,13 +423,13 @@ config LEDS_MAX8997
	  This option enables support for on-chip LED drivers on
	  MAXIM MAX8997 PMIC.

config LEDS_LM3556
	tristate "LED support for LM3556 Chip"
config LEDS_LM355x
	tristate "LED support for LM355x Chips, LM3554 and LM3556"
	depends on LEDS_CLASS && I2C
	select REGMAP_I2C
	help
	  This option enables support for LEDs connected to LM3556.
	  LM3556 includes Torch, Flash and Indicator functions.
	  This option enables support for LEDs connected to LM355x.
	  LM355x includes Torch, Flash and Indicator functions.

config LEDS_OT200
	tristate "LED support for the Bachmann OT200"
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o
obj-$(CONFIG_LEDS_ASIC3)		+= leds-asic3.o
obj-$(CONFIG_LEDS_RENESAS_TPU)		+= leds-renesas-tpu.o
obj-$(CONFIG_LEDS_MAX8997)		+= leds-max8997.o
obj-$(CONFIG_LEDS_LM3556)		+= leds-lm3556.o
obj-$(CONFIG_LEDS_LM355x)		+= leds-lm355x.o
obj-$(CONFIG_LEDS_BLINKM)		+= leds-blinkm.o

# LED SPI Drivers
+572 −0

File changed and moved.

Preview size limit exceeded, changes collapsed.

+0 −50
Original line number Diff line number Diff line
/*
 * Simple driver for Texas Instruments LM3556 LED Flash driver chip (Rev0x03)
 * Copyright (C) 2012 Texas Instruments
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 */

#ifndef __LINUX_LM3556_H
#define __LINUX_LM3556_H

#define LM3556_NAME "leds-lm3556"

enum lm3556_pin_polarity {
	PIN_LOW_ACTIVE = 0,
	PIN_HIGH_ACTIVE,
};

enum lm3556_pin_enable {
	PIN_DISABLED = 0,
	PIN_ENABLED,
};

enum lm3556_strobe_usuage {
	STROBE_EDGE_DETECT = 0,
	STROBE_LEVEL_DETECT,
};

enum lm3556_indic_mode {
	INDIC_MODE_INTERNAL = 0,
	INDIC_MODE_EXTERNAL,
};

struct lm3556_platform_data {
	enum lm3556_pin_enable torch_pin_en;
	enum lm3556_pin_polarity torch_pin_polarity;

	enum lm3556_strobe_usuage strobe_usuage;
	enum lm3556_pin_enable strobe_pin_en;
	enum lm3556_pin_polarity strobe_pin_polarity;

	enum lm3556_pin_enable tx_pin_en;
	enum lm3556_pin_polarity tx_pin_polarity;

	enum lm3556_indic_mode indicator_mode;
};

#endif /* __LINUX_LM3556_H */
+66 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading