- 08 8月, 2017 1 次提交
-
-
由 Arvind Yadav 提交于
of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: NThierry Reding <thierry.reding@gmail.com> Acked-by: NDaniel Thompson <daniel.thompson@linaro.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 20 4月, 2017 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Commit 7613c922 ("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: 7613c922 ("backlight: pwm_bl: Move the checks for initial power state to a separate function") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NDaniel Thompson <daniel.thompson@linaro.org> Signed-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
-
- 04 1月, 2017 2 次提交
-
-
由 Peter Ujfalusi 提交于
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: NPeter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: NPhilipp Zabel <p.zabel@pengutronix.de> Reviewed-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Peter Ujfalusi 提交于
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: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NPhilipp Zabel <p.zabel@pengutronix.de> Reviewed-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 06 10月, 2016 1 次提交
-
-
由 Maxime Ripard 提交于
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: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 17 5月, 2016 2 次提交
-
-
由 Boris Brezillon 提交于
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: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Boris BREZILLON 提交于
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: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 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>
-