History log of /linux-master/drivers/video/backlight/as3711_bl.c
Revision Date Author Comments
# 41f1b3ed 05-Mar-2024 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

backlight: as3711_bl: Handle deferred probe

Don't pollute dmesg on deferred probe and simplify the code with
dev_err_probe().

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240305-backlight-probe-v2-4-609b0cf24bde@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>


# fb200218 10-Mar-2023 Rob Herring <robh@kernel.org>

backlight: as3711: Use of_property_read_bool() for boolean properties

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230310144731.1546190-1-robh@kernel.org


# 5a09765d 19-Jul-2020 Sam Ravnborg <sam@ravnborg.org>

backlight: as3711_bl: Simplify update_status

Replaces the open-coded checks of the state, with the
backlight_get_brightness() helper. This increases readability of the
code and align the functionality across the drivers.

Furthermore drop the debug prints in update_status().
If we need debug printing then we can add it to the backlight core.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 6f6d5c3f 05-Aug-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

media: backlight: as3711_bl: convert to SPDX identifiers

This patch updates license to use SPDX-License-Identifier
instead of verbose license text.

As original license mentioned, it is GPL-2.0 in SPDX.
Then, MODULE_LICENSE() should be "GPL v2" instead of "GPL".
See ${LINUX}/include/linux/module.h

"GPL" [GNU Public License v2 or later]
"GPL v2" [GNU Public License v2]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# d5318d30 20-Nov-2017 Johan Hovold <johan@kernel.org>

backlight: as3711_bl: Fix Device Tree node leaks

Two framebuffer device-node names were looked up during probe, but were
only used as flags to indicate the presence of two framebuffer device.

Drop the unused framebuffer name along with a likewise unused device
pointer from the driver data, and update the platform data to pass in
booleans instead of the framebuffer strings. This allows us do drop the
node references acquired during probe, which would otherwise leak.

Note that there are no other in-kernel users of the modified
platform-data fields.

Fixes: 59eb2b5e57ea ("drivers/video/backlight/as3711_bl.c: add OF support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 4a9c8bb2 20-Nov-2017 Johan Hovold <johan@kernel.org>

backlight: as3711_bl: Fix Device Tree node lookup

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent mfd node was also prematurely freed.

Cc: stable <stable@vger.kernel.org> # 3.10
Fixes: 59eb2b5e57ea ("drivers/video/backlight/as3711_bl.c: add OF support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 6728f2b1 13-Aug-2014 Peter Griffin <peter.griffin@linaro.org>

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>


# 83dedc05 12-Nov-2013 Jingoo Han <jg1.han@samsung.com>

backlight: as3711_bl: use devm_backlight_device_register()

Use devm_backlight_device_register() to make cleanup paths simpler, and
remove unnecessary remove().

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>


# 59eb2b5e 29-Apr-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

drivers/video/backlight/as3711_bl.c: add OF support

Add support for configuring AS3711 backlight driver from DT.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-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>


# de474b5b 21-Feb-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

backlight: add an AS3711 PMIC backlight driver

This is an initial commit of a backlight driver, using step-up DCDC
power supplies on AS3711 PMIC. Only one mode has actually been tested,
several further modes have been implemented "dry," but disabled to avoid
accidental hardware damage. Anyone wishing to use any of those modes
will have to modify the driver.

Tested on sh73a0-based kzm9g board. Only one mode has been tested and
is enabled. That mode copies the sample code from the manufacturer.
Deviations from that code proved to be fatal for the hardware...

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-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>