aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lm3692x.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-11-03leds: lm3692x: Use flags from LM3692X_BRT_CTRLGuido Günther1-1/+1
Use LM3692X_RAMP_EN instead of LM3692X_PWM_HYSTER_4LSB since the later is a flag for the PWM register. The actual register value remains unchanged. Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Dan Murphy <dmurphy@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-11-03leds: lm3692x: Use flags from LM3692X_BOOST_CTRLGuido Günther1-3/+3
The current setup of LM3692X_BOOST_CTRL uses flags from LM3692X_BRT_CTRL. Use flags from LM3692X_BOOST_CTRL but leave the resulting register value unchanged. Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Dan Murphy <dmurphy@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-11-03leds: lm3692x: Handle failure to probe the regulatorGuido Günther1-2/+11
Instead use devm_regulator_get_optional since the regulator is optional and check for errors. Signed-off-by: Guido Günther <agx@sigxcpu.org> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-11-03leds: lm3692x: Don't overwrite return value in error pathGuido Günther1-4/+5
The driver currently reports successful initialization on every failure as long as it's able to power off the regulator. Don't check the return value of regulator_disable to avoid that. Signed-off-by: Guido Günther <agx@sigxcpu.org> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-11-03leds: lm3692x: Print error value on dev_errGuido Günther1-7/+10
This gives a way better idea what is going on. Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Dan Murphy <dmurphy@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-07-25leds: lm3692x: Use generic support for composing LED namesJacek Anaszewski1-16/+6
Switch to using generic LED support for composing LED class device name. At this occassion remove initialization of struct led_classdev's dev->of_node property in the driver, since now it will be taken from fwnode assigned to struct led_init_data and passed to the new devm_led_classdev_register_ext() API. Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Tested-by: Dan Murphy <dmurphy@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz>
2018-07-03leds: lm3692x: Support LED sync configurationDan Murphy1-38/+120
The LM36922 has one output but can sync current to 2 LED strings. The user may only use one sync so the other syncs need to be disabled. The LM36923 has 3 LED syncs. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-07-03leds: lm3692x: Change DT calls to fwnode callsDan Murphy1-17/+21
Update the code to use the fwnode calls as opposed to ARM DT node api's. This allows the device to be used with either DT configurations or ACPI definitions. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-07-03leds: lm3692x: Update license header to SPDXDan Murphy1-14/+3
Update the license header to the current SPDX licensing format. Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-01-08leds: lm3692x: Introduce LM3692x dual string driverDan Murphy1-0/+393
Introducing the LM3692x Dual-String white LED driver. Data sheet is located http://www.ti.com/lit/ds/snvsa29/snvsa29.pdf Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>