aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ti-lmu.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-23mfd: ti-lmu: Use of_device_get_match_data() helperPavel Machek1-16/+14
Replace of_match_device() with of_device_get_match_data(), which slightly decreases lines of code and allows to move the DT table next to the I2C table. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-10-23mfd: ti-lmu: Use managed resource for everythingPavel Machek1-13/+8
This replaces all remaining unmanaged resources with device managed ones, so that the remove function is no longer needed. This makes the code slightly shorter and fixes two problems: 1. The hardware is disabled after the child devices have been removed. Previously there was a potential race condition. 2. The hardware is disabled when mfd_add_devices fails during probe. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-10-23mfd: ti-lmu: Switch to GPIODPavel Machek1-16/+12
Use new descriptor based API instead of the legacy one. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-10-23mfd: ti-lmu: constify mfd_cell tablesSebastian Reichel1-7/+7
Add const attribute to all mfd_cell structures. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-04-27mfd: Add TI LMU driverMilo Kim1-0/+259
TI LMU (Lighting Management Unit) driver supports lighting devices below. LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697. LMU devices have common features. - I2C interface for accessing device registers - Hardware enable pin control - Backlight brightness control - Notifier for hardware fault monitoring - Regulators for LCD display bias It contains fault monitor, backlight, LED and regulator driver. LMU fault monitor ----------------- LM3633 and LM3697 provide hardware monitoring feature. It enables open or short circuit detection. After monitoring is done, each device should be re-initialized. Notifier is used for this case. Separate patch for 'ti-lmu-fault-monitor' will be sent later. Backlight --------- It's handled by TI LMU backlight consolidated driver and chip dependent data. Separate patchset will be sent later. LED indicator ------------- LM3633 has 6 indicator LEDs. Programmable dimming pattern is also supported. Separate patch for 'leds-lm3633' will be sent later. Regulator --------- LM3631 has 5 regulators for the display bias. LM3632 supports 3 regulators. One consolidated driver enables it. The lm363x regulator driver is already upstreamed. Signed-off-by: Milo Kim <milo.kim@ti.com> Tested-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>