- 11 1月, 2016 3 次提交
-
-
由 Vladimir Zapolskiy 提交于
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: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Philipp Zabel 提交于
Commit ee65ad0e2a9e ("backlight: pwm_bl: Avoid backlight flicker when probed from DT") tries to dereference the device of_node pointer unconditionally, causing a NULL pointer dereference on non-dt platforms. Fix it by replacing the phandle variable with a node variable and by checking that for NULL before dereferencing it. Reported-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NThierry Reding <thierry.reding@gmail.com> Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Philipp Zabel 提交于
If the driver is probed from the device tree, and there is a phandle property set on it, and the enable GPIO is already configured as output, and the backlight is currently disabled, keep it disabled. If all these conditions are met, assume there will be some other driver that can enable the backlight at the appropriate time. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com> Tested-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 15 10月, 2015 1 次提交
-
-
由 Vladimir Zapolskiy 提交于
Platform PWM backlight data provided by board's device tree should be complete enough to successfully request a pwm device using pwm_get() API. This change fixes a bug, when an arbitrary (first found) PWM is connected to a "pwm-backlight" compatible device, when explicit PWM device reference is not given. Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt already describes "pwms" as a required property, instead of blind selection of a potentially wrong PWM reject legacy PWM device registration request, leave legacy API only for non-dt cases. Based on initial implementation done by Dmitry Eremin-Solenikov. Reported-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Acked-by: NThierry Reding <thierry.reding@gmail.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 23 6月, 2015 1 次提交
-
-
由 Axel Lin 提交于
Since 39b2bbe3 (gpio: add flags argument to gpiod_get*() functions), the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify the usage of devm_gpiod_get_optional accordingly. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 26 5月, 2015 1 次提交
-
-
由 Nicolas Ferre 提交于
When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER flag is not handled properly. It can lead to the PWM not being found. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NThierry Reding <thierry.reding@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 10 11月, 2014 1 次提交
-
-
由 Vladimir Zapolskiy 提交于
If PWM device is requested by means of legacy API pwm_request(), its resources are not freed on module unbind, which may cause an oops on access, e.g. by reading /sys/kernel/debug/pwm. Reported-by: NDmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 28 8月, 2014 1 次提交
-
-
由 Peter Griffin 提交于
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: NPeter Griffin <peter.griffin@linaro.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 20 8月, 2014 1 次提交
-
-
由 Lothar Waßmann 提交于
commit 257462db ("pwm-backlight: switch to gpiod interface") introduced a regression leading to acquiring a bogus GPIO-0 when configured from DT without an 'enable-gpios' property. The driver will happily accept the 0 initialized 'enable_gpio' member of the struct platform_pwm_backlight_data as valid gpio number, and request this GPIO as enable pin. In case of multiple driver instances, the second will fail to register with the error message: pwm-backlight backlight1.23: failed to request GPIO#0: -16 Fix this by setting enable_gpio in the pdata struct to -EINVAL. Signed-off-by: NLothar Waßmann <LW@KARO-electronics.de> Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 18 7月, 2014 1 次提交
-
-
由 Alexandre Courbot 提交于
Make use of the new devm_gpiod_get_optional() to simplify the probe code. Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 23 6月, 2014 1 次提交
-
-
由 Andrzej Hajda 提交于
Since backlight core returns props.brightness in case get_brightness is not implemented trivial implementations are not needed anymore. Acked-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 21 5月, 2014 1 次提交
-
-
由 Alexandre Belloni 提交于
The PWM core is now able to initialize the PWM period from a lookup table defined by board files. Use it if available and fallback to the value supplied in pwm_period_ns. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 07 5月, 2014 1 次提交
-
-
由 Alexandre Courbot 提交于
Switch to the new gpiod interface, which allows to handle GPIO properties such as active low transparently and removes a whole bunch of code. There are still a couple of users of this driver that rely on passing the enable GPIO number through platform data, so a fallback mechanism using a GPIO number is still available to avoid breaking them. It will be removed once current users have switched to the GPIO lookup tables provided by the gpiod interface. Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 02 5月, 2014 1 次提交
-
-
由 Thierry Reding 提交于
When a device is shut down, make sure to disable the backlight. If it stays lit, it gives the impression that the device hasn't turned off. Furthermore keeping the backlight on may consume power, which is not what users expect when they shut down a device. Tested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NThierry Reding <treding@nvidia.com>
-
- 17 12月, 2013 1 次提交
-
-
由 Fabio Estevam 提交于
No need to have a specific OOM message, since there is generic MM out of memory message in place. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 13 11月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 22 10月, 2013 2 次提交
-
-
由 Thierry Reding 提交于
I forgot to remove this during earlier cleanup patches and only checked various builds for errors, not warnings. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Huayi Li 提交于
Use SIMPLE_DEV_PM_OPS macro will initialize the member "freeze" and "thaw" of pwm_backlight_pm_ops as below, .freeze = suspend_fn, .thaw = resume_fn, then during the process of making hibernation snapshot, screen will be blank at the moment of freezing, and then light at the moment of thawing. this is not the right user experience for suspending to disk. so this patch drops freeze and thaw callback, make the LCD is always lighting before the final shutdown. Signed-off-by: NHuayi Li <huayi.li@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 18 10月, 2013 1 次提交
-
-
由 Thierry Reding 提交于
Split adjustment of the brightness (by changing the PWM duty cycle) from the power on sequence. This fixes an issue where the brightness can no longer be updated once the backlight has been enabled. Reported-by: NMarc Dietrich <marvin24@gmx.de> Signed-off-by: NThierry Reding <treding@nvidia.com>
-
- 16 10月, 2013 6 次提交
-
-
由 Mike Dunn 提交于
Currently the driver assumes that the values specified in the brightness-levels device tree property increase as they are parsed from left to right. But boards that invert the signal between the PWM output and the backlight will need to specify decreasing brightness-levels. This patch removes the assumption that the last element of the array is the maximum value, and instead searches the array for the maximum value and uses that in the duty cycle calculation. Signed-off-by: NMike Dunn <mikedunn@newsguy.com> Signed-off-by: NThierry Reding <treding@nvidia.com>
-
由 Thierry Reding 提交于
Backlights require a power supply to work properly. This commit adds a regulator to power up and power down the backlight. Signed-off-by: NThierry Reding <treding@nvidia.com>
-
由 Thierry Reding 提交于
Make use of the new enable_gpio field and allow it to be set from DT as well. Now that all legacy users of platform data have been converted to initialize this field to an invalid value, it is safe to use the field from the driver. Signed-off-by: NThierry Reding <treding@nvidia.com>
-
由 Thierry Reding 提交于
Follow up patches will add support for more complex means of powering the backlight on and off such as using a regulator. To prevent calls to the regulator API from becoming unbalanced, keep track of the enabled state internally. Signed-off-by: NThierry Reding <treding@nvidia.com>
-
由 Thierry Reding 提交于
In preparation for adding an optional regulator and enable GPIO to the driver, split the power on and power off sequences into separate functions to reduce code duplication at the multiple call sites. Signed-off-by: NThierry Reding <treding@nvidia.com>
-
由 Thierry Reding 提交于
Add more blank lines to increase readability. While at it, remove a trailing blank line at the end of the file. Signed-off-by: NThierry Reding <treding@nvidia.com>
-
- 08 3月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
When the macro such as SIMPLE_DEV_PM_OPS is used, there is no need to use '#ifdef CONFIG_PM' to prevent build error. Thus, this patch removes unnecessary ifdefs. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Cc: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
- 22 2月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper function for getting the driver data using backlight_device instead of using dev_get_drvdata with &bd->dev, so we can directly pass a struct backlight_device. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Cc: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 31 1月, 2013 1 次提交
-
-
由 Peter Ujfalusi 提交于
Move the dft_brightness validity check from the DT parsing function to the main probe. In this way we can validate it in case we are booting with or without DT. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
- 30 1月, 2013 1 次提交
-
-
由 Alexandre Courbot 提交于
According to include/linux/backlight.h, the fb_blank field is to be removed and blank status should preferably be set by setting the BL_CORE_FBBLANK bit of the state field. This patch ensures this condition is also taken into account when updating the backlight state. Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
- 06 10月, 2012 1 次提交
-
-
由 Sachin Kamat 提交于
Managed versions of the pwm_get() and pwm_put() functions were recently added to the PWM framework. They can be used to simplify cleanup in the error paths and the device removal callback. Cc: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Acked-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
- 23 7月, 2012 2 次提交
-
-
由 Alexandre Courbot 提交于
pwm_backlight_update_status calls the notify() and notify_after() callbacks before and after applying the new PWM settings. However, if brightness levels are used, the brightness value will be changed from the index into the levels array to the PWM duty cycle length before being passed to notify_after(), which results in inconsistent behavior. Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
由 Thierry Reding 提交于
This commit adds very basic support for device tree probing. Currently, only a PWM and a list of distinct brightness levels can be specified. Enabling or disabling backlight power via GPIOs is not yet supported. Reviewed-by: NShawn Guo <shawn.guo@linaro.org> Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
- 24 3月, 2012 1 次提交
-
-
由 Julia Lawall 提交于
The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 11 1月, 2012 2 次提交
-
-
由 Mark Brown 提交于
Should be no functional changes, mainly a reorganisation to support future work. [akpm@linux-foundation.org: fix CONFIG_PM=n build] Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Axel Lin 提交于
Convert the drivers in drivers/video/backlight/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-by: NHaojian Zhuang <haojian.zhuang@gmail.com> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> [ep93xx_bl.c] Cc: Mike Rapoport <mike@compulab.co.il> Cc: Richard Purdie <rpurdie@rpsys.net> Acked-by: NMichael Hennerich <michael.hennerich@analog.com> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 26 8月, 2011 1 次提交
-
-
由 Dilan Lee 提交于
We need a callback to do some things after pwm_enable, pwm_disable and pwm_config. Signed-off-by: NDilan Lee <dilee@nvidia.com> Reviewed-by: NRobert Morell <rmorell@nvidia.com> Reviewed-by: NArun Murthy <arun.murthy@stericsson.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 23 3月, 2011 2 次提交
-
-
由 Robert Morell 提交于
In systems with multiple framebuffer devices, one of the devices might be blanked while another is unblanked. In order for the backlight blanking logic to know whether to turn off the backlight for a particular framebuffer's blanking notification, it needs to be able to check if a given framebuffer device corresponds to the backlight. This plumbs the check_fb hook from core backlight through the pwm_backlight helper to allow platform code to plug in a check_fb hook. Signed-off-by: NRobert Morell <rmorell@nvidia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Arun Murthy <arun.murthy@stericsson.com> Cc: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matthew Garrett 提交于
There may be multiple ways of controlling the backlight on a given machine. Allow drivers to expose the type of interface they are providing, making it possible for userspace to make appropriate policy decisions. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: David Airlie <airlied@linux.ie> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 12 11月, 2010 1 次提交
-
-
由 Arun Murthy 提交于
The intensity of the backlight can be varied from a range of max_brightness to zero. Though most, if not all the pwm based backlight devices start flickering at lower brightness value. And also for each device there exists a brightness value below which the backlight appears to be turned off though the value is not equal to zero. If the range of brightness for a device is from zero to max_brightness. A graph is plotted for brightness Vs intensity for the pwm based backlight device has to be a linear graph. intensity | / | / | / |/ --------- 0 max_brightness But pratically on measuring the above we note that the intensity of backlight goes to zero(OFF) when the value in not zero almost nearing to zero(some x%). so the graph looks like intensity | / | / | / | | ------------ 0 x max_brightness In order to overcome this drawback knowing this x% i.e nothing but the low threshold beyond which the backlight is off and will have no effect, the brightness value is being offset by the low threshold value(retaining the linearity of the graph). Now the graph becomes intensity | / | / | / | / ------------- 0 max_brightness With this for each and every digit increment in the brightness from zero there is a change in the intensity of backlight. Devices having this behaviour can set the low threshold brightness(lth_brightness) and pass the same as platform data else can have it as zero. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: NArun Murthy <arun.murthy@stericsson.com> Acked-by: NLinus Walleij <linus.walleij@stericsson.com> Acked-by: NRichard Purdie <rpurdie@linux.intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 30 3月, 2010 1 次提交
-
-
由 Tejun Heo 提交于
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: NTejun Heo <tj@kernel.org> Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-