aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lm3532.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-06leds: lm3532: add pointer to documentation and fix typoPavel1-1/+2
Add pointer to datasheet and fix typo in printk message. Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-01-04leds: lm3532: use extended registration so that LED can be used for backlightPavel1-1/+7
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-09-12leds: lm3532: Fix optional led-max-microamp prop error handlingDan Murphy1-5/+8
Fix the error handling for the led-max-microamp property. Need to check if the property is present and then if it is retrieve the setting and its max boundary Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-09-03leds: lm3532: Move static keyword to the front of declarationsKrzysztof Wilczynski1-3/+3
Move the static keyword to the front of declarations ramp_table, als_avrg_table and als_imp_table, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1): drivers/leds/leds-lm3532.c:209:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] drivers/leds/leds-lm3532.c:266:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] drivers/leds/leds-lm3532.c:281:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Krzysztof Wilczynski <kw@linux.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-09-01leds: lm3532: Avoid potentially unpaired regulator callsTony Lindgren1-2/+24
We may currently get unpaired regulator calls when configuring the LED brightness via sysfs in case of regulator calls producing errors. Let's fix this by maintaining local state for enabled. Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-08-26leds: lm3532: Add full scale current configurationDan Murphy1-0/+25
Allow the full scale current to be configured at init. Valid rangles are 5mA->29.8mA. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-08-26leds: lm3532: Fixes for the driver for stabilityDan Murphy1-4/+13
Fixed misspelled words, added error check during probe on the init of the registers, and fixed ALS/I2C control mode. Fixes: bc1b8492c764 ("leds: lm3532: Introduce the lm3532 LED driver") Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dan Murphy <dmurphy@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-08-26leds: lm3532: Change the define for the fs current registerDan Murphy1-6/+6
Change the define name of the full scale current registers. Signed-off-by: Dan Murphy <dmurphy@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-08-26leds: lm3532: Fix brightness control for i2c modeDan Murphy1-14/+30
Fix the brightness control for I2C mode. Instead of changing the full scale current register update the ALS target register for the appropriate banks. In addition clean up some code errors and random misspellings found during coding. Tested on Droid4 as well as LM3532 EVM connected to a BeagleBoneBlack Fixes: bc1b8492c764 ("leds: lm3532: Introduce the lm3532 LED driver") Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dan Murphy <dmurphy@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-07-25leds: lm3532: Switch to use fwnode_property_count_uXX()Andy Shevchenko1-4/+1
Use fwnode_property_count_uXX() directly, that makes code neater. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-04-07leds: lm3532: Introduce the lm3532 LED driverDan Murphy1-0/+683
Introduce the Texas Instruments LM3532 White LED driver. The driver supports ALS configurability or manual brightness control. The driver also supports associating LED strings with specific control banks in a group or as individually controlled strings. Signed-off-by: Dan Murphy <dmurphy@ti.com> Tested-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>