aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lm3532.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>