- 09 12月, 2018 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
This reverts the main change of commit bff23714 ("leds: leds-gpio: Set of_node for created LED devices") because of_node assignment is handled by core since commit 7ea79ae8 ("leds: gpio: use OF variant of LED registering function"). Basically the code was overwriting the of_node with same value. No functional change expected. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Tested-by: NRafał Miłecki <rafal@milecki.pl> Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
-
- 27 10月, 2018 1 次提交
-
-
由 Liviu Dudau 提交于
Commit 45d4c6de ("leds: gpio: Try to lookup gpiod from device") removed the common code path that set the led_dat->gpiod pointer in create_gpio_led(), but only added it back for the devices that have a valid gpio_led_platform_data structure. Calling gpio_leds_create() in gpio_led_probe() is not enough to get a valid gpiod pointer. Fortunately enough, gpio_leds_create() already gets the needed pointer, we just need to assign it to the relevant gpio_led_data structure. Fixes: 45d4c6de ("leds: gpio: Try to lookup gpiod from device") Signed-off-by: NLiviu Dudau <liviu@dudau.co.uk> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
-
- 11 9月, 2018 1 次提交
-
-
由 Linus Walleij 提交于
This augments the GPIO lookup code in the GPIO LEDs to attempt to look up a GPIO descriptor from the device with index. This makes it possible to use GPIO machine look-up tables and stop passing global GPIO numbers through platform data. Using this we can stepwise convert existing board files to use machine descriptor tables and then eventually drop the legacy GPIO support and only include <linux/gpio/consumer.h> and use descriptors exclusively. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
-
- 30 8月, 2017 1 次提交
-
-
由 Andrew Jeffery 提交于
In some systems, such as Baseboard Management Controllers (BMCs), we want to retain the state of LEDs across a reboot of the BMC (whilst the host remains up). Implement support for the retain-state-shutdown devicetree property in leds-gpio. Signed-off-by: NAndrew Jeffery <andrew@aj.id.au> Acked-by: NPavel Machek <pavel@ucw.cz> Tested-by: NBrandon Wyman <bjwyman@gmail.com> Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
-
- 09 3月, 2017 1 次提交
-
-
由 Rafał Miłecki 提交于
In leds-gpio we support LEDs specified in DT so we should use (devm_)of_led_classdev_register. This allows passing DT node as argument for use by the LED subsystem. Signed-off-by: NRafał Miłecki <rafal@milecki.pl> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
-
- 05 2月, 2017 1 次提交
-
-
由 Boris Brezillon 提交于
Rename devm_get_gpiod_from_child() into devm_fwnode_get_gpiod_from_child() to reflect the fact that this function is operating on a fwnode object. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NJacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 26 1月, 2017 2 次提交
-
-
由 Alexander Stein 提交于
Currently all users of fwnode_get_named_gpiod() have no way to specify a label for the GPIO. So GPIOs listed in debugfs are shown with label "?". With this change a proper label is used. Also adjust all users so they can pass a label, properly retrieved from device tree properties. Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
Make fwnode_get_named_gpiod() consistent with the rest of gpiod_get() like API, i.e. configure GPIO pin immediately after request. Besides obvious clean up it will help to configure pins based on firmware provided resources. Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 15 9月, 2016 7 次提交
-
-
由 Heiner Kallweit 提交于
Simplify the error handling and add a missing call to fwnode_handle_put when checking led.name. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Heiner Kallweit 提交于
Using the managed version of led_classdev_register allows to significantly simplify the code. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Heiner Kallweit 提交于
Checking for the presence of the property first isn't strictly needed as we can react on the return code of fwnode_property_read_string. Also, even if the presence of a property "label" was checked, reading a string value for it theoretically still can fail and this case isn't handled. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Heiner Kallweit 提交于
Definition of np can be moved into the loop as well to simplify the code a little. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Heiner Kallweit 提交于
Add a helper for the container_of as it's used more than once. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Heiner Kallweit 提交于
gpiod_get_value_cansleep returns 0, 1, or an error code. So far errors are not handled and treated the same as 1. Change this to bail out if an error code is returned and remove the double negation. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Heiner Kallweit 提交于
Introduce a typedef gpio_blink_set_t to improve readability of the code. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 11 7月, 2016 1 次提交
-
-
由 Rafał Miłecki 提交于
When working with Device Tree we iterate over children of "gpio-leds" compatible node and create LED device for each of them. We take care of all common DT properties (label, default trigger, state, etc.), however some triggers may want to support more of them. It could be useful for timer trigger to support setting delay on/off values with Device Tree property. Or for transient trigger to support e.g. duration property. We obviously should handle such properties in triggers, not in generic code. To let trigger drivers read properties from DT node we need to set of_node to point the relevant node. This change allows using all kind of of helpers in e.g. "activate" callbacks. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 06 5月, 2016 1 次提交
-
-
由 Ezequiel Garcia 提交于
Calling a GPIO LEDs is quite likely to work even if the kernel has paniced, so they are ideal to blink in this situation. This commit adds support for the new "panic-indicator" firmware property, allowing to mark a given LED to blink on a kernel panic. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: NMatthias Brugger <mbrugger@suse.com> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 14 3月, 2016 2 次提交
-
-
由 Geert Uytterhoeven 提交于
Use the GPIO flag definition instead of a numeric literal, so the casual reader grepping for GPIOF_ will find the GPIO flags used. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Wei Yongjun 提交于
In case of error, the function gpio_to_desc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 04 1月, 2016 1 次提交
-
-
由 Jacek Anaszewski 提交于
Now the core implements the work queue, remove it from the drivers, and switch to using brightness_set_blocking op. Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com> Cc: Raphael Assenat <raph@8d.com>
-
- 03 11月, 2015 1 次提交
-
-
由 Heiko Schocher 提交于
add a shutdown function for setting the gpio-leds into off state when shuting down. Signed-off-by: NHeiko Schocher <hs@denx.de> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 25 6月, 2015 1 次提交
-
-
由 Alexander Sverdlin 提交于
Commit 8a0662d9 introduced of_node and acpi_node symbols in global namespace but there were already ~63 of_node local variables or function parameters (no single acpi_node though, but anyway). After debugging undefined but used of_node local varible (which turned out to reference static function of_node() instead) it became clear that the names for the functions are too short and too generic for global scope. Signed-off-by: NAlexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 26 5月, 2015 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
- 05 5月, 2015 2 次提交
-
-
由 Jacek Anaszewski 提交于
Make sure that already registered LEDs will be torn down properly if the name of the next LED to create is unavailable. Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
由 Sebastian Hesselbarth 提交于
In gpio_leds_create(), when devm_get_gpiod_from_child() fails with -EPROBE_DEFER on the second gpio led to be created, the first already registered led is not torn down properly. This causes create_gpio_led() to fail for the first led on re-probe(). Fix this misbehaviour by incrementing num_leds only if all potentially failing calls completed successfully. Signed-off-by: NSebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
- 04 3月, 2015 1 次提交
-
-
由 Olliver Schinagl 提交于
The gpio binding document says that new code should always use named gpios. Patch 40b73183 added support to parse a list of gpios from child nodes, but does not make it possible to use named gpios. This patch adds the con_id property and implements it is done in gpiolib.c, where the old-style of using unnamed gpios still works. Signed-off-by: NOlliver Schinagl <oliver@schinagl.nl> Acked-by: NBryan Wu <cooloney@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 03 2月, 2015 1 次提交
-
-
由 Soren Brinkmann 提交于
Instead of overriding error codes, pass them on unmodified. This way a EPROBE_DEFER is correctly passed to the driver core. This results in the LED driver correctly requesting probe deferral in cases the GPIO controller is not yet available. Signed-off-by: NSoren Brinkmann <soren.brinkmann@xilinx.com> Reported-and-tested-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
- 10 12月, 2014 1 次提交
-
-
由 Fabio Estevam 提交于
Commit a43f2cbb ("leds: leds-gpio: Make use of device property API") caused a regression by reading the incorrect string for the "default-state" property. Fix the property string check to restore the original behaviour. Fixes: a43f2cbb (leds: leds-gpio: Make use of device property API) Reported-by: NJean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NBryan Wu <cooloney@gmail.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 04 12月, 2014 1 次提交
-
-
由 Fabio Estevam 提交于
Since commit a43f2cbb ("leds: leds-gpio: Make use of device property API") it is no longer possible to register multiple gpio leds without passing the 'label' property. According to Documentation/devicetree/bindings/leds/common.txt: "Optional properties for child nodes: - label : The label for this LED. If omitted, the label is taken from the node name (excluding the unit address)." So retrieve the node name when the 'label' property is absent to keep the old behaviour and fix this regression. Fixes: a43f2cbb (leds: leds-gpio: Make use of device property API) Reported-by: NJean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NGrant Likely <grant.likely@linaro.org> Acked-by: NBryan Wu <cooloney@gmail.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 07 11月, 2014 1 次提交
-
-
由 Geert Uytterhoeven 提交于
In the legacy case, led_dat->gpiod is initialized correctly, but overwritten later by template->gpiod, which is NULL, causing leds-gpio to fail with: gpiod_direction_output: invalid GPIO leds-gpio: probe of leds-gpio failed with error -22 Move the initialization of led_dat->gpiod from template->gpiod up, and always use led_dat->gpiod later, to fix this. Fixes: 5c51277a (leds: leds-gpio: Add support for GPIO descriptors) Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 05 11月, 2014 3 次提交
-
-
由 Mika Westerberg 提交于
Commit 21f2aae91e902aad ("leds: leds-gpio: Add support for GPIO descriptors") already converted most of the driver to use GPIO descriptors. What is still missing is the platform specific hook gpio_blink_set() and board files which pass legacy GPIO numbers to this driver in platform data. In this patch we handle the former and convert gpio_blink_set() to take GPIO descriptor instead. In order to do this we convert the existing four users to accept GPIO descriptor and translate it to legacy GPIO number in the platform code. This effectively "pushes" legacy GPIO number usage from the driver to platforms. Also add comment to the remaining block describing that it is legacy code path and we are getting rid of it eventually. Suggested-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NAndrew Lunn <andrew@lunn.ch> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Rafael J. Wysocki 提交于
Make use of device property API in this driver so that both OF and ACPI based system can use the same driver. This change contains material from Max Eliaser and Mika Westerberg. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NBryan Wu <cooloney@gmail.com> Acked-by: NGrant Likely <grant.likely@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Mika Westerberg 提交于
GPIO descriptors are the preferred way over legacy GPIO numbers nowadays. Convert the driver to use GPIO descriptors internally but still allow passing legacy GPIO numbers from platform data to support existing platforms. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Acked-by: NBryan Wu <cooloney@gmail.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NGrant Likely <grant.likely@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 30 9月, 2014 2 次提交
-
-
由 Xiubo Li 提交于
Remove stray blank line and space. Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
由 Xiubo Li 提交于
If the inlcude headers aren't sorted alphabetically, then the logical choice is to append new ones, however that creates a lot of potential for conflicts or duplicates because every change will then add new includes in the same location. Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
- 07 3月, 2014 1 次提交
-
-
由 Paolo Pisati 提交于
Enable autoloading of leds-gpio module when a corresponing DT entry is present. Signed-off-by: NPaolo Pisati <paolo.pisati@canonical.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
- 28 2月, 2014 2 次提交
-
-
由 Paul Gortmaker 提交于
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: linux-leds@vger.kernel.org Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
由 Robin Gong 提交于
Some gpio-leds need retain the state even in suspend, such as charger led. But this property missed in devicetree, add it. (cooloney@gmail.com: fold DT binding updates into this patch) Signed-off-by: NRobin Gong <b38343@freescale.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-
- 26 10月, 2013 1 次提交
-
-
由 Josh Wu 提交于
now the leds-gpio driver will create every child led node without checking the status is disabled or not. for example, if we have a led node like d3, and its status is disabled: leds { d3 { label = "d3"; gpios = <&pioE 24 0>; status = "disabled"; }; }; we except the d3 should not be created. And the gpios should not be request as well. But current driver will create d3 and request its gpio. This patch fix this by using for_each_available_child_of_node() and of_get_available_child_count() to enumerate all child nodes. So the disabled node will be inavailable. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NBryan Wu <cooloney@gmail.com>
-