LED / flash API integration - LED Flash Class drivers
Subsystems (4)
v5 cover LED / flash API integration - LED Flash Class drivers
This patch set is the follow-up of the LED / flash API integration series [1]. For clarity reasons the patchset has been split into five subsets:
- LED Flash Class
- Flash Manager
- V4L2 Flash
- LED Flash Class drivers
- Documentation
The series is based on linux-next-20140820.
Thanks,
Jacek Anaszewski
[1] https://lkml.org/lkml/2014/7/11/914
Jacek Anaszewski (3):
mfd: max77693: Fix register enum name
leds: Add support for max77693 mfd flash cell
leds: Add driver for AAT1290 current regulator
drivers/leds/Kconfig | 15 + drivers/leds/Makefile | 2 + drivers/leds/leds-aat1290.c | 448 +++++++++++++++ drivers/leds/leds-max77693.c | 1048 ++++++++++++++++++++++++++++++++++ drivers/mfd/max77693.c | 5 +- include/linux/mfd/max77693-private.h | 61 +- include/linux/mfd/max77693.h | 40 ++ 7 files changed, 1617 insertions(+), 2 deletions(-) create mode 100644 drivers/leds/leds-aat1290.c create mode 100644 drivers/leds/leds-max77693.c
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 1/3 mfd: max77693: Fix register enum name
According to the MAX77693 documentation the name of the register is FLASH_STATUS.
--- include/linux/mfd/max77693-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mfd/max77693-private.h +1 -1
@@ -46,7 +46,7 @@ enum max77693_pmic_reg {MAX77693_LED_REG_VOUT_FLASH2 =0x0C ,MAX77693_LED_REG_FLASH_INT =0x0E ,MAX77693_LED_REG_FLASH_INT_MASK =0x0F , -MAX77693_LED_REG_FLASH_INT_STATUS =0x10 , +MAX77693_LED_REG_FLASH_STATUS =0x10 ,MAX77693_PMIC_REG_PMIC_ID1 =0x20 , MAX77693_PMIC_REG_PMIC_ID2 = 0x21,
Signature · 1 line
1.7.9.5
Lee Jones
AppliedRe: [PATCH/RFC v5 1/3] mfd: max77693: Fix register enum name
Quoted 11 lines · Jacek Anaszewski
According to the MAX77693 documentation the name of the register is
FLASH_STATUS.Signed-off-by Jacek Anaszewski <[email protected]>Acked-by Kyungmin Park <[email protected]>Cc Lee Jones <[email protected]>Cc SangYoung Son <[email protected]>Cc Samuel Ortiz <[email protected]>--- include/linux/mfd/max77693-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Quoted 13 lines
include/linux/mfd/max77693-private.h +1
-1@@ -46,7 +46,7 @@ enum max77693_pmic_reg {MAX77693_LED_REG_VOUT_FLASH2 =0x0C ,MAX77693_LED_REG_FLASH_INT =0x0E ,MAX77693_LED_REG_FLASH_INT_MASK =0x0F , -MAX77693_LED_REG_FLASH_INT_STATUS =0x10 , +MAX77693_LED_REG_FLASH_STATUS =0x10 ,MAX77693_PMIC_REG_PMIC_ID1 =0x20 , MAX77693_PMIC_REG_PMIC_ID2 = 0x21,
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v5 2/3 leds: Add support for max77693 mfd flash cell
In reply to Jacek AnaszewskiThis patch adds led-flash support to Maxim max77693 chipset. A device can be exposed to user space through LED subsystem sysfs interface or through V4L2 subdevice when the support for V4L2 Flash sub-devices is enabled. Device supports up to two leds which can work in flash and torch mode. Leds can be triggered externally or by software.
--- drivers/leds/Kconfig | 9 + drivers/leds/Makefile | 1 + drivers/leds/leds-max77693.c | 1048 ++++++++++++++++++++++++++++++++++ drivers/mfd/max77693.c | 5 +- include/linux/mfd/max77693-private.h | 59 ++ include/linux/mfd/max77693.h | 40 ++ 6 files changed, 1161 insertions(+), 1 deletion(-) create mode 100644 drivers/leds/leds-max77693.c
drivers/leds/Kconfig +9 -0
@@ -465,6 +465,15 @@ config LEDS_TCA6507 LED driver chips accessed via the I2C bus. Driver support brightness control and hardware-assisted blinking. +config LEDS_MAX77693 + tristate "LED support for MAX77693 Flash" + depends on LEDS_CLASS_FLASH + depends on MFD_MAX77693 + help + This option enables support for the flash part of the MAX77693 + multifunction device. It has build in control for two leds in flash + and torch mode. + config LEDS_MAX8997 tristate "LED support for MAX8997 PMIC" depends on LEDS_CLASS && MFD_MAX8997
drivers/leds/Makefile +1 -0
@@ -55,6 +55,7 @@ obj-$(CONFIG_LEDS_MC13783) += leds-mc13783.o obj-$(CONFIG_LEDS_NS2) += leds-ns2.o obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o +obj-$(CONFIG_LEDS_MAX77693) += leds-max77693.o obj-$(CONFIG_LEDS_MAX8997) += leds-max8997.o obj-$(CONFIG_LEDS_LM355x) += leds-lm355x.o obj-$(CONFIG_LEDS_BLINKM) += leds-blinkm.o
drivers/leds/leds-max77693.c new file +1048 -0
1,048 lines not on this page · raw message
drivers/mfd/max77693.c +4 -1
@@ -44,9 +44,12 @@static const struct mfd_cell max77693_devs[] = { { .name ="max77693-pmic" , }, { .name ="max77693-charger" , }, - { .name ="max77693-flash" , }, { .name ="max77693-muic" , }, { .name ="max77693-haptic" , }, + { + .name ="max77693-flash" , + .of_compatible ="maxim,max77693-flash" , + }, };static const struct regmap_config max77693_regmap_config = {
include/linux/mfd/max77693-private.h +59 -0
65 lines not on this page · raw message
include/linux/mfd/max77693.h +40 -0
@@ -63,6 +63,45 @@ struct max77693_muic_platform_data {int path_uart; }; +/* MAX77693 led flash */ + +/* triggers */ +enum max77693_led_trigger { +MAX77693_LED_TRIG_OFF , +MAX77693_LED_TRIG_FLASH , +MAX77693_LED_TRIG_TORCH , +MAX77693_LED_TRIG_EXT , +MAX77693_LED_TRIG_SOFT , +}; + +/* trigger types */ +enum max77693_led_trigger_type { +MAX77693_LED_TRIG_TYPE_EDGE , +MAX77693_LED_TRIG_TYPE_LEVEL , +}; + +/* boost modes */ +enum max77693_led_boost_mode { +MAX77693_LED_BOOST_NONE , +MAX77693_LED_BOOST_ADAPTIVE , +MAX77693_LED_BOOST_FIXED , +}; + +struct max77693_led_platform_data { +u32 fleds[2 ]; +u32 iout_torch[2 ]; +u32 iout_flash[2 ]; +u32 trigger[2 ]; +u32 trigger_type[2 ]; +u32 num_leds; +u32 boost_mode; +u32 flash_timeout; +u32 boost_vout; +u32 low_vsys; +}; + +/* MAX77693 */ +struct max77693_platform_data {/* regulator data */ struct max77693_regulator_data *regulators;
@@ -70,5 +109,6 @@ struct max77693_platform_data {/* muic data */ struct max77693_muic_platform_data *muic_data; + struct max77693_led_platform_data *led_data; };#endif /* __LINUX_MFD_MAX77693_H */
Signature · 1 line
1.7.9.5
Re: [PATCH/RFC v5 2/3] leds: Add support for max77693 mfd flash cell
Quoted 15 lines · Jacek Anaszewski
This patch adds led-flash support to Maxim max77693 chipset. A device can be exposed to user space through LED subsystem sysfs interface or through V4L2 subdevice when the support for V4L2 Flash sub-devices is enabled. Device supports up to two leds which can work in flash and torch mode. Leds can be triggered externally or by software.
Signed-off-by Jacek Anaszewski <[email protected]>Signed-off-by Andrzej Hajda <[email protected]>Acked-by Kyungmin Park <[email protected]>Cc Lee Jones <[email protected]>Cc Bryan Wu <[email protected]>Cc Richard Purdie <[email protected]>Cc SangYoung Son <[email protected]>Cc Samuel Ortiz <[email protected]>
Quoted 7 lines
--- drivers/leds/Kconfig | 9 + drivers/leds/Makefile | 1 + drivers/leds/leds-max77693.c | 1048 ++++++++++++++++++++++++++++++++++ drivers/mfd/max77693.c | 5 +- include/linux/mfd/max77693-private.h | 59 ++ include/linux/mfd/max77693.h | 40 ++
Please break the MFD changes out into a separate patch, I can't (at first glace) see any reason why the changed need to be bundled together like this.
[...]
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v5 3/3 leds: Add driver for AAT1290 current regulator
In reply to Jacek AnaszewskiThis patch adds a driver for the 1.5A Step-Up Current Regulator for Flash LEDs. The device is programmed through a Skyworks' proprietary AS2Cwire serial digital interface.
--- drivers/leds/Kconfig | 6 + drivers/leds/Makefile | 1 + drivers/leds/leds-aat1290.c | 448 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 455 insertions(+) create mode 100644 drivers/leds/leds-aat1290.c
drivers/leds/Kconfig +6 -0
@@ -51,6 +51,12 @@ config LEDS_88PM860X This option enables support for on-chip LED drivers found on Marvell Semiconductor 88PM8606 PMIC. +config LEDS_AAT1290 + tristate "LED support for the AAT1290" + depends on LEDS_CLASS_FLASH + help + This option enables support for the LEDs on the AAT1290. + config LEDS_LM3530 tristate "LCD Backlight driver for LM3530" depends on LEDS_CLASS
drivers/leds/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o # LED Platform Drivers obj-$(CONFIG_LEDS_88PM860X) += leds-88pm860x.o +obj-$(CONFIG_LEDS_AAT1290) += leds-aat1290.o obj-$(CONFIG_LEDS_BD2802) += leds-bd2802.o obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o
drivers/leds/leds-aat1290.c new file +448 -0
448 lines not on this page · raw message
Signature · 1 line
1.7.9.5