Commit Graph

9 Commits

Author SHA1 Message Date
Javier Martinez Canillas bb82250fc4 backlight: da9052: Fix module autoload
The driver has a platform device ID table with multiple device entries,
each setting a different register address in its driver_data to control
the WLED brightness.

But the driver doesn't export these as aliases with MODULE_DEVICE_TABLE()
when the driver is built as a module, instead it just has a single alias
using MODULE_ALIAS("platform:da9052-backlight"). That is clearly wrong
since there isn't a "da9052-backlight" in the platform device ID table,
so if that device name is used, the device won't even match the driver.

So instead of having a wrong alias, export the ones in the dev ID table.

Before this patch:

$ modinfo drivers/video/backlight/da9052_bl.ko | grep alias
alias:          platform:da9052-backlight

After this patch:

$ modinfo drivers/video/backlight/da9052_bl.ko | grep alias
alias:          platform:da9052-wled3
alias:          platform:da9052-wled2
alias:          platform:da9052-wled1

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-01-04 11:37:58 +00:00
Krzysztof Kozlowski dba5ff95b6 video: backlight: da9052: Constify platform_device_id
The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-23 15:28:59 +01:00
Andrey Ryabinin b1f85c0fec backlight: da9052_bl: Terminate da9052_wled_ids array with empty element
Array of platform_device_id elements should be terminated
with empty element.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-04-09 10:30:35 +01:00
Peter Griffin 6728f2b109 backlight: Remove .owner field for drivers using module_platform_driver
This patch removes the superflous .owner field for drivers which
use the module_platform_driver or platform_driver_register api,
as this is overriden in __platform_driver_register.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-08-28 14:09:48 +01:00
Jingoo Han 02f0092cb3 backlight: da9052_bl: use devm_backlight_device_register()
Use devm_backlight_device_register() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13 12:09:17 +09:00
Jingoo Han b5d6904bab drivers/video/backlight/da9052_bl.c: add missing const
Add 'const' to static array that was missing it in its definition.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-17 17:15:16 -08:00
Julia Lawall 66be0e5bf5 drivers/video/backlight/da9052_bl.c: drop devm_kfree of devm_kzalloc'd data
devm_kfree should not have to be explicitly used.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,d;
@@

x = devm_kzalloc(...)
...
?-devm_kfree(d,x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-06 03:04:54 +09:00
Jingoo Han 5333e254ab drivers/video/backlight/da9052_bl.c: use usleep_range() instead of msleep() for small sleeps
Since msleep() might not sleep for the desired amount when less than 20ms,
use usleep_range().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-06 03:04:52 +09:00
Ashish Jangam 6ede3d832a backlight: add driver for DA9052/53 PMIC v1
DA9052/53 PMIC has capability to supply power for upto 3 banks of 6
white serial LEDS.  It can also control intensity of independent banks
and to drive these banks boost converter will provide up to 24V and
forward current of max 50mA.

This patch allows to control intensity of the individual WLEDs bank
through DA9052/53 PMIC.

This patch is functionally tested on Samsung SMDKV6410.

Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-05 15:25:51 -07:00