12 Feb, 2019
2 commits
-
Add suspend/resume power management operations for
gpio backlight.Signed-off-by: Fancy Fang
-
Add fb name check function pwm_backlight_check_fb_name(),
pwm driver can banding to fb with fb name when driver working
in device tree architecture.Signed-off-by: Sandor Yu
03 Aug, 2018
1 commit
-
[ Upstream commit bb084c0f61d659f0e6d371b096e0e57998f191d6 ]
The documentation was wrong, gpiod_get_direction() returns 0/1 instead
of the GPIOF_* flags. The docs were fixed with commit 94fc73094abe47
("gpio: correct docs about return value of gpiod_get_direction"). Now,
fix this user (until a better, system-wide solution is in place).Signed-off-by: Wolfram Sang
Acked-by: Daniel Thompson
Reviewed-by: Simon Horman
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin
Signed-off-by: Greg Kroah-Hartman
03 Jul, 2018
3 commits
-
commit 2b12dfa124dbadf391cb9a616aaa6b056823bf75 upstream.
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.This would only cause trouble if the child node is missing while there
is an unrelated node named "backlight" elsewhere in the tree.Cc: stable # 3.7
Fixes: eebfdc17cc6c ("backlight: Add TPS65217 WLED driver")
Signed-off-by: Johan Hovold
Acked-by: Daniel Thompson
Signed-off-by: Lee Jones
Signed-off-by: Greg Kroah-Hartman -
commit d1cc0ec3da23e44c23712579515494b374f111c9 upstream.
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,
while the child backlight node was leaked.Cc: stable # 3.9
Fixes: 47ec340cb8e2 ("mfd: max8925: Support dt for backlight")
Signed-off-by: Johan Hovold
Acked-by: Daniel Thompson
Signed-off-by: Lee Jones
Signed-off-by: Greg Kroah-Hartman -
commit 4a9c8bb2aca5b5a2a15744333729745dd9903562 upstream.
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 # 3.10
Fixes: 59eb2b5e57ea ("drivers/video/backlight/as3711_bl.c: add OF support")
Signed-off-by: Johan Hovold
Acked-by: Daniel Thompson
Signed-off-by: Lee Jones
Signed-off-by: Greg Kroah-Hartman
12 Apr, 2018
1 commit
-
[ Upstream commit 2023b0524a6310e9ea80daf085f51c71bff9289f ]
Currently the LCD display (TD035S) on the cm-x300 platform is broken and
remains blank.The TD0245S specification requires that the chipselect is toggled
between commands sent to the panel. This was also the purpose of the
former patch of commit f64dcac0b124 ("backlight: tdo24m: ensure chip
select changes between transfers").Unfortunately, the "cs_change" field of a SPI transfer is
misleading. Its true meaning is that for a SPI message holding multiple
transfers, the chip select is toggled between each transfer, but for the
last transfer it remains asserted.In this driver, all the SPI messages contain exactly one transfer, which
means that each transfer is the last of its message, and as a
consequence the chip select is never toggled.Actually, there was a second bug hidding the first one, hence the
problem was not seen until v4.6. This problem was fixed by commit
a52db659c79c ("spi: pxa2xx: Fix cs_change management") for PXA based
boards.This fix makes the TD035S work again on a cm-x300 board. The same
applies to other PXA boards, ie. corgi and tosa.Fixes: a52db659c79c ("spi: pxa2xx: Fix cs_change management")
Reported-by: Andrea Adami
Signed-off-by: Robert Jarzmik
Acked-by: Daniel Thompson
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin
Signed-off-by: Greg Kroah-Hartman
25 Dec, 2017
1 commit
-
[ Upstream commit 5d0c49acebc9488e37db95f1d4a55644e545ffe7 ]
This fixes an overflow condition that can happen with high max
brightness and period values in compute_duty_cycle. This fixes it by
using a 64 bit variable for computing the duty cycle.Signed-off-by: Derek Basehore
Acked-by: Thierry Reding
Reviewed-by: Brian Norris
Signed-off-by: Lee Jones
Signed-off-by: Sasha Levin
Signed-off-by: Greg Kroah-Hartman
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
14 Sep, 2017
1 commit
-
... and __initconst if applicable.
Based on similar work for an older kernel in the Grsecurity patch.
[JD: fix toshiba-wmi build]
[JD: add htcpen]
[JD: move __initconst where checkscript wants it]Signed-off-by: Christoph Hellwig
Signed-off-by: Jean Delvare
08 Sep, 2017
1 commit
-
Pull backlight updates from Lee Jones:
"Fix-ups:
- Constification; pwm_bl
- Use new GPIO API; gpio_backlight
- Remove unused functionality; gpio_backlightBug Fixes:
- Fix artificial MAXREG limit; lm3630a_bl"* tag 'backlight-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
backlight: gpio_backlight: Delete pdata inversion
backlight: gpio_backlight: Convert to use GPIO descriptor
backlight: pwm_bl: Make of_device_ids const
backlight: lm3630a: Bump REG_MAX value to 0x50 instead of 0x1F
04 Sep, 2017
1 commit
-
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.Signed-off-by: Wolfram Sang
Acked-by: Greg Kroah-Hartman
Acked-by: Alexandre Belloni
Acked-by: Mark Brown
Acked-by: Sebastian Reichel
Acked-by: Jonathan Cameron
Acked-by: Dmitry Torokhov
Acked-by: Kishon Vijay Abraham I
Acked-by: Bartlomiej Zolnierkiewicz
Acked-by: Thierry Reding
Acked-by: Tony Lindgren
Acked-by: Daniel Thompson
Acked-by: Linus Walleij
Acked-by: Guenter Roeck
Signed-off-by: Lee Jones
08 Aug, 2017
3 commits
-
The option to invert the output of the GPIO (active low) is
not used by the only platform still using platform data to
set up a GPIO backlight (one SH board). Delete the option
as we do not expect to expand the use of board files for
this driver, and GPIO descriptors intrinsically keep track
of any signal inversion.Signed-off-by: Linus Walleij
Acked-by: Daniel Thompson
Reviewed-by: Laurent Pinchart
Signed-off-by: Lee Jones -
This driver is predominantly used by device tree systems, all
of which can deal with modern GPIO descriptors. The legacy
GPIO API is only used by one SH board so make the GPIO
descriptor the default way to deal with it.As an intended side effect we do not need to look around in
the device tree for the inversion flag since the GPIO
descriptors will intrinsically deal with this.Signed-off-by: Linus Walleij
Acked-by: Daniel Thompson
Reviewed-by: Laurent Pinchart
Signed-off-by: Lee Jones -
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by work with const
of_device_ids. So mark the non-const structs as const.Signed-off-by: Arvind Yadav
Acked-by: Thierry Reding
Acked-by: Daniel Thompson
Reviewed-by: Laurent Pinchart
Signed-off-by: Lee Jones
17 Jul, 2017
1 commit
-
In the lm3630a_chip_init we try to write to 0x50 register, which is
higher value then the max_register value, this resulted in regmap_write
return -EIO.Fix this by bumping REG_MAX value to 0x50.
This code was introduced with the chip revision in commit 28e64a68a2ef,
however setting filter strength was failing silently because it used
unsigned int for storing and comparing the return values. Bug related to
signedness was fixed in 2a0c316bf3cc, which made it error out correctly
instead of failing silently.I found this issue by using this driver on LGE Nexus 5 (hammerhead).
After this commit lm3630a_chip_init succeeds instead of failing with
-EIO.Fixes: 28e64a68a2ef ("backlight: lm3630: apply chip revision")
Fixes: 2a0c316bf3cc ("drivers/video/backlight/lm3630a_bl.c: fix
signedness bug in lm3630a_chip_init()")Suggested-by: Bjorn Andersson
Signed-off-by: Bhushan Shah
Acked-by: Daniel Thompson
Signed-off-by: Lee Jones
06 Jul, 2017
2 commits
-
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.Signed-off-by: Wolfram Sang
Acked-by: Daniel Thompson
Acked-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Lee Jones -
include/linux/i2c is not for client devices.
Move the header file to a more appropriate location.
Signed-off-by: Wolfram Sang
Acked-by: Daniel Thompson
Acked-by: Michael Hennerich
Signed-off-by: Lee Jones
30 May, 2017
1 commit
-
It is possible to update the backlight power and the brightness using
the sysfs and on writing it either returns the count or if the callback
function does not exist then returns the error code 'ENXIO'.We have a situation where the userspace client is writing to the sysfs
to update the power and since the callback function exists the client
receives the return value as count and considers the operation to be
successful. That is correct as the write to the sysfs was successful.
But there is no way to know if the actual operation was done or not.backlight_update_status() returns the error code if it fails. Pass that
to the userspace client who is trying to update the power so that the
client knows that the operation failed.Signed-off-by: Sudip Mukherjee
Acked-by: Daniel Thompson
Signed-off-by: Lee Jones
04 May, 2017
1 commit
-
Pull backlight update from Lee Jones:
"New Arctic Sand ARC2C0608 LED Backlight driver"* tag 'backlight-next-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
backlight: Add support for Arctic Sand LED backlight driver chips
dt-bindings: backlight: arcxcnn: Supply bindings for Arctic Sand backlight
25 Apr, 2017
1 commit
-
This driver provides support for the Arctic Sand arc2c0608 chip,
and provides a framework to support future devices.Signed-off-by: Olimpiu Dejeu
Reviewed-by: Daniel Thompson
Signed-off-by: Lee Jones
20 Apr, 2017
1 commit
-
Commit 7613c922315e308a ("backlight: pwm_bl: Move the checks for initial
power state to a separate function") not just moved some code, but made
slight changes in semantics.If a gpiochip doesn't implement the optional .get_direction() callback,
gpiod_get_direction always returns -EINVAL, which is never equal to
GPIOF_DIR_IN, leading to the GPIO not being configured for output.To avoid this, invert the test and check for not GPIOF_DIR_OUT instead,
like the original code did.This restores the display on r8a7740/armadillo.
Fixes: 7613c922315e308a ("backlight: pwm_bl: Move the checks for initial power state to a separate function")
Signed-off-by: Geert Uytterhoeven
Reviewed-by: Peter Ujfalusi
Acked-by: Philipp Zabel
Acked-by: Daniel Thompson
Signed-off-by: Daniel Thompson
04 Jan, 2017
5 commits
-
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-backlightAfter this patch:
$ modinfo drivers/video/backlight/da9052_bl.ko | grep alias
alias: platform:da9052-wled3
alias: platform:da9052-wled2
alias: platform:da9052-wled1Signed-off-by: Javier Martinez Canillas
Acked-by: Adam Thomson
Acked-by: Jingoo Han
Signed-off-by: Lee Jones -
If the PWM is not enabled the backlight initially should not be enabled
either if we have booted with DT and there is a phandle pointing to the
backlight node.The patch extends the checks to decide if we should keep the backlight off
initially.Signed-off-by: Peter Ujfalusi
Acked-by: Philipp Zabel
Reviewed-by: Thierry Reding
Signed-off-by: Lee Jones -
Move the checks to select the initial state for the backlight to a new
function and document the checks we are doing.With the separate function it is going to be easier to fix or improve the
initial power state configuration later and it is easier to read the code.Signed-off-by: Peter Ujfalusi
Reviewed-by: Philipp Zabel
Reviewed-by: Thierry Reding
Signed-off-by: Lee Jones -
If adp5520_bl_setup() fails, sysfs group left unremoved.
By the way, fix overcomplicated assignement of error code.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
Acked-by: Michael Hennerich
Signed-off-by: Lee Jones -
Once device_register is called for a device its attributes might be
accessed. As the callbacks of a lcd device's attributes make use of the
lcd_ops, the respective member must be setup before calling
device_register.Signed-off-by: Uwe Kleine-König
Signed-off-by: Lee Jones
06 Oct, 2016
2 commits
-
Some backlight GPIOs might be connected to some i2c based expanders whose
access might sleep.Since it's not in any critical path, use the cansleep variant of the GPIO
API.Signed-off-by: Maxime Ripard
Signed-off-by: Lee Jones -
The field "owner" is set by the core.
Thus delete an unneeded initialisation.Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Markus Elfring
Signed-off-by: Lee Jones
29 Jun, 2016
1 commit
-
The LP8556 datasheet describes an EN/VDDIO input, which serves "both as
a chip enable and as a power supply reference for PWM, SDA, and SCL
inputs." The LP8556 that I'm testing doesn't respond properly if I try
to talk I2C to it too quickly after enabling VDDIO, and the LP8555
datasheet mentions a t_RESPONSE delay of up to 1 millisecond.Support this EN/VDDIO by adding a regulator property to the binding;
enabling this regulator at probe time; and sleeping for 1 to 2ms, if the
EN/VDDIO regulator was provided.Signed-off-by: Brian Norris
Acked-by: Rob Herring
Acked-by: Milo Kim
Reviewed-by: Stephen Barber
Signed-off-by: Lee Jones
26 May, 2016
1 commit
-
…erry.reding/linux-pwm
Pull pwm updates from Thierry Reding:
"This set of changes introduces an atomic API to the PWM subsystem.
This is influenced by the DRM atomic API that was introduced a while
back, though it is obviously a lot simpler. The fundamental idea
remains the same, though: drivers provide a single callback to
implement the atomic configuration of a PWM channel.As a side-effect the PWM subsystem gains the ability for initial state
retrieval, so that the logical state mirrors that of the hardware.
Many use-cases don't care about this, but for others it is essential.These new features require changes in all users, which these patches
take care of. The core is transitioned to use the atomic callback if
available and provides a fallback mechanism for other drivers.Changes to transition users and drivers to the atomic API are
postponed to v4.8"* tag 'pwm/for-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (30 commits)
pwm: Add information about polarity, duty cycle and period to debugfs
pwm: Switch to the atomic API
pwm: Update documentation
pwm: Add core infrastructure to allow atomic updates
pwm: Add hardware readout infrastructure
pwm: Move the enabled/disabled info into pwm_state
pwm: Introduce the pwm_state concept
pwm: Keep PWM state in sync with hardware state
ARM: Explicitly apply PWM config extracted from pwm_args
drm: i915: Explicitly apply PWM config extracted from pwm_args
input: misc: pwm-beeper: Explicitly apply PWM config extracted from pwm_args
input: misc: max8997: Explicitly apply PWM config extracted from pwm_args
backlight: lm3630a: explicitly apply PWM config extracted from pwm_args
backlight: lp855x: Explicitly apply PWM config extracted from pwm_args
backlight: lp8788: Explicitly apply PWM config extracted from pwm_args
backlight: pwm_bl: Use pwm_get_args() where appropriate
fbdev: ssd1307fb: Use pwm_get_args() where appropriate
regulator: pwm: Use pwm_get_args() where appropriate
leds: pwm: Use pwm_get_args() where appropriate
input: misc: max77693: Use pwm_get_args() where appropriate
...
17 May, 2016
6 commits
-
Call pwm_apply_args() just after requesting the PWM device so that the
polarity and period are initialized according to the information
provided in pwm_args.This is an intermediate state, and pwm_apply_args() should be dropped as
soon as the atomic PWM infrastructure is in place and the driver makes
use of it.Signed-off-by: Boris Brezillon
Signed-off-by: Thierry Reding -
Call pwm_apply_args() just after requesting the PWM device so that the
polarity and period are initialized according to the information
provided in pwm_args.This is an intermediate state, and pwm_apply_args() should be dropped as
soon as the atomic PWM infrastructure is in place and the driver makes
use of it.Signed-off-by: Boris Brezillon
Signed-off-by: Thierry Reding -
Call pwm_apply_args() just after requesting the PWM device so that the
polarity and period are initialized according to the information
provided in pwm_args.This is an intermediate state, and pwm_apply_args() should be dropped as
soon as the atomic PWM infrastructure is in place and the driver makes
use of it.Signed-off-by: Boris Brezillon
Signed-off-by: Thierry Reding -
The PWM framework has clarified the concept of reference PWM config (the
platform dependent config retrieved from the DT or the PWM lookup table)
and real PWM state.Use pwm_get_args() when the PWM user wants to retrieve this reference
config and not the current state.This is part of the rework allowing the PWM framework to support
hardware readout and expose real PWM state even when the PWM has just
been requested (before the user calls pwm_config/enable/disable()).Signed-off-by: Boris Brezillon
Signed-off-by: Thierry Reding -
pwm->period field is not supposed to be changed by PWM users. The only
ones authorized to change it are the PWM core and PWM drivers.Signed-off-by: Boris Brezillon
Acked-by: Lee Jones
Signed-off-by: Thierry Reding -
The PWM period will be set when calling pwm_config. Remove this useless
call to pwm_set_period(), which might mess up the internal PWM state.Signed-off-by: Boris Brezillon
Acked-by: Lee Jones
Signed-off-by: Thierry Reding
05 May, 2016
2 commits
-
Since we will need the backlight_device_get_by_type API, we can use it
instead of the backlight_device_registered API whenever necessary so
remove the backlight_device_registered API.Signed-off-by: Aaron Lu
Acked-by: Jingoo Han
Signed-off-by: Rafael J. Wysocki -
It is useful to get the backlight device's pointer and use it to set
backlight in some cases(the following patch will make use of it) so add
the two APIs and export them.Signed-off-by: Aaron Lu
Acked-by: Jingoo Han
Signed-off-by: Rafael J. Wysocki
11 Jan, 2016
1 commit
-
If pwm is requested by legacy pwm_request() and if the following
backlight_device_register() call fails, add pwm_free() clean-up.Signed-off-by: Vladimir Zapolskiy
Signed-off-by: Lee Jones