- 20 9月, 2016 2 次提交
-
-
由 Jacek Anaszewski 提交于
Log error message if kobject_uevent_env() fails in led_trigger_set(). Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jacek Anaszewski 提交于
If led_trigger_set() is called with "trig" argument set to NULL, and there is no trigger to remove then the function should return immediately so as to avoid doing unnecessary allocation and sending uevent. Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com> Reported-by: NDaniel Romell <daro@hms.se> Acked-by Daniel Romell <daro@hms.se>
-
- 15 9月, 2016 8 次提交
-
-
由 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>
-
由 Vadim Pasternak 提交于
This makes it possible to create a set of LEDs for Mellanox systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100". Driver obtains LED devices according to system configuration, provided through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and creates devices in form: "devicename:colour:function". LED setting is controlled through on board CPLD Lattice device. For setting particular LED off, solid, blink: echo 0 > /sys/class/leds/mlxcpld\:status\:green/brightness echo 1 > /sys/class/leds/mlxcpld\:status\:green/brightness echo timer > /sys/class/leds/mlxcpld\:status\:green/trigger On module probing all LEDs are set green, on removing - off. Last setting overwrites previous, f.e. sequence for changing LED from green - red - green: echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness echo 1 > /sys/class/leds/mlxcpld\:psu\:red/brightness echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness Note: LEDs cannot be turned on/off simultaneously. The Kconfig currently controlling compilation of this code is: drivers/leds/Kconfig:config LEDS_MLXCPLD Signed-off-by: NVadim Pasternak <vadimp@mellanox.com> Reviewed-by: NJiri Pirko <jiri@mellanox.com> Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 17 8月, 2016 3 次提交
-
-
由 Linus Walleij 提交于
This adds a driver for the six PM8058 LEDs, three ordinary LEDs, two "flash" LEDs and one "keypad" LED. The "keypad" and "flash" LEDs are not really hard-wired to these usecases: for example on the APQ8060 Dragonboard, the "keypad" LED is instead used to drive an IR LED used for the proximity sensor. The "flash" LEDs are just ordinary high-current LED drivers. Cc: linux-arm-msm@vger.kernel.org Cc: Andy Gross <andy.gross@linaro.org> Cc: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Nathan Sullivan 提交于
Per the documentation, use scnprintf instead of sprintf to ensure there is never more than PAGE_SIZE bytes of trigger names put into the buffer. Signed-off-by: NNathan Sullivan <nathan.sullivan@ni.com> Signed-off-by: NZach Brown <zach.brown@ni.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Paul Gortmaker 提交于
The Kconfig currently controlling compilation of this code is: drivers/leds/trigger/Kconfig:menuconfig LEDS_TRIGGERS drivers/leds/trigger/Kconfig: bool "LED Trigger support" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We don't replace module.h with init.h since the file doesn't need that. However it does use EXPORT_SYMBOL, so we add the export.h header. Cc: Richard Purdie <rpurdie@rpsys.net> Cc: linux-leds@vger.kernel.org Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 15 8月, 2016 1 次提交
-
-
由 H. Nikolaus Schaller 提交于
This is a driver for the Integrated Silicon Solution Inc. LED driver chips series IS31FL319x. They can drive 1, 3, 6 or up to 9 LEDs. Each LED is individually controllable in brightness (through pwm) in 256 steps so that RGB LEDs can show any of ca. 16 Mio colors. The maximum current of the LEDs can be programmed and limited to 5 .. 40mA through a device tree property. The chip is connected through I2C and can have one of 4 addresses in the range 0x64 .. 0x67 depending on how the AD pin is connected. The address is defined by the reg property as usual. The chip also has a shutdown input which could be connected to a GPIO, but this driver uses software shutdown if all LEDs are inactivated. The chip also has breathing and audio features which are not fully supported by this driver. Tested-on: OMAP5 based Pyra handheld prototype. Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: NAndrey Utkin <andrey_utkin@fastmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 23 7月, 2016 1 次提交
-
-
There is no need the ledtriger to be called *that* early in the hotplug process (+ with disabled interrupts). As explained by Jacek Anaszewski [0] there is no need for it. Therefore this patch moves it to the ONLINE/PREPARE_DOWN level using the dynamic registration for the id. [0] https://lkml.kernel.org/r/578C92BC.2070603@samsung.comSigned-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: rt@linutronix.de Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-leds@vger.kernel.org Link: http://lkml.kernel.org/r/1469028295-14702-1-git-send-email-bigeasy@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 19 7月, 2016 2 次提交
-
-
由 H. Nikolaus Schaller 提交于
Otherwise the driver module will not be automatically probed. Fixes: 9d7cffaf ("leds: Add driver for the ISSI IS31FL32xx family of LED controllers") Fixes: e0442d7d ("leds: Add SN3218 and SN3216 support to the IS31FL32XX driver") Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com> Tested-by: NDavid Rivshin <drivshin@allworx.com> Acked-by: NDavid Rivshin <drivshin@allworx.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 H. Nikolaus Schaller 提交于
Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com> Tested-by: NDavid Rivshin <drivshin@allworx.com> Acked-by: NDavid Rivshin <drivshin@allworx.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 18 7月, 2016 1 次提交
-
-
由 Tony Makkiel 提交于
The chip can drive 2 sets of RGB leds. Controller can be controlled via PWM, I2C and audio synchronisation. This driver uses I2C to communicate with the chip. Datasheet: http://www.ti.com/lit/gpn/lp3952Signed-off-by: NTony Makkiel <tony.makkiel@daqri.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 15 7月, 2016 1 次提交
-
-
由 Richard Cochran 提交于
This is a straightforward conversion. We place this callback last in the list so that the LED illuminates only after a successful bring up sequence. ( NOTE: The patch adds a FIXME question about the callback used, this question should probably be revisited later on.) Signed-off-by: NRichard Cochran <rcochran@linutronix.de> Signed-off-by: NAnna-Maria Gleixner <anna-maria@linutronix.de> Reviewed-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-leds@vger.kernel.org Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160713153336.465496902@linutronix.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
-
- 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>
-
- 04 7月, 2016 1 次提交
-
-
由 Heiner Kallweit 提交于
If an invalid trigger name is provided via sysfs currently no error is returned. Therefore it's not possible to determine whether the trigger was set successfully. Fix this by returning -EINVAL if no trigger is matched. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 29 6月, 2016 1 次提交
-
-
由 Suraj Jitindar Singh 提交于
An opal_msg of type OPAL_MSG_ASYNC_COMP contains the return code in the params[1] struct member. However this isn't intuitive or obvious when reading the code and requires that a user look at the skiboot documentation or opal-api.h to verify this. Add an inline function to get the return code from an opal_msg and update call sites accordingly. Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com> Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 20 6月, 2016 2 次提交
-
-
由 Stephan Linz 提交于
This patch converts the IDE specific LED trigger to a generic disk activity LED trigger. The libata core is now a trigger source just like before the IDE disk driver. It's merely a replacement of the string ide by disk. The patch is taken from http://dev.gentoo.org/~josejx/ata.patch and is widely used by any ibook/powerbook owners with great satisfaction. Likewise, it is very often used successfully on different ARM platforms. Unlike the original patch, the existing 'ide-disk' trigger is still available for backward compatibility. That reduce the amount of patches in affected device trees out of the mainline kernel. For further development, the new name 'disk-activity' should be used. Cc: Joseph Jezak <josejx@gentoo.org> Cc: Jörg Sommer <joerg@alea.gnuu.de> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: NStephan Linz <linz@li-pro.net> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Phil Reid 提交于
This patch adds basic device tree support for the pca9532 LEDs. Signed-off-by: NPhil Reid <preid@electromag.com.au> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 08 6月, 2016 2 次提交
-
-
由 Linus Walleij 提交于
The following phenomena was observed: when suspending the system, sometimes the heartbeat LED was left on, glowing and wasting power while the rest of the system is asleep, also disturbing power dissapation measures on the odd suspend cycle when it's left on. Clearly this is not how we want the heartbeat trigger to work: it should turn off and leave the LED off during system suspend. This removes the heartbeat trigger when preparing suspend and restores it during resume. The trigger code will make sure all LEDs are left in OFF state after removing the trigger, and will re-enable the trigger on all LEDs after resuming. Cc: linux-pm@vger.kernel.org Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Tony Makkiel 提交于
Commit 76931edd ("leds: fix brightness changing when software blinking is active") changed the semantics of led_set_brightness() which according to the documentation should disable blinking upon any brightness setting. Moreover it made it different for soft blink case, where it was possible to change blink brightness, and for hardware blink case, where setting any brightness greater than 0 was ignored. While the change itself is against the documentation claims, it was driven also by the fact that timer trigger remained active after turning blinking off. Fixing that would have required major refactoring in the led-core, led-class, and led-triggers because of cyclic dependencies. Finally, it has been decided that allowing for brightness change during blinking is beneficial as it can be accomplished without disturbing blink rhythm. The change in brightness setting semantics will not affect existing LED class drivers that implement blink_set op thanks to the LED_BLINK_SW flag introduced by this patch. The flag state will be from now on checked in led_set_brightness() which will allow to distinguish between software and hardware blink mode. In the latter case the control will be passed directly to the drivers which apply their semantics on brightness set, which is disable the blinking in case of most such drivers. New drivers will apply new semantics and just change the brightness while hardware blinking is on, if possible. The issue was smuggled by subsequent LED core improvements, which modified the code that originally introduced the problem. Fixes: f1e80c07 ("leds: core: Add two new LED_BLINK_ flags") Signed-off-by: NTony Makkiel <tony.makkiel@daqri.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 17 5月, 2016 1 次提交
-
-
由 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> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 06 5月, 2016 2 次提交
-
-
由 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>
-
由 Ezequiel Garcia 提交于
This commit adds a new led_cdev flag LED_PANIC_INDICATOR, which allows to mark a specific LED to be switched to the "panic" trigger, on a kernel panic. This is useful to allow the user to assign a regular trigger to a given LED, and still blink that LED 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>
-
- 19 4月, 2016 3 次提交
-
-
由 Martin Dummer 提交于
The Intel NAS SS4200 was also sold by Fujitsu Siemens (FSC) under the name "SCALEO Home Server". The hardware is equivalent. This patch adds the DMI data of this rebranded device. Signed-off-by: NMartin Dummer <martin.dummer@gmx.net> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Martin Dummer 提交于
There is only one x86 hardware where the driver leds-ss4200 applies to. Add kconfig dependency to x86 architecture, fix help text whitespace. Signed-off-by: NMartin Dummer <martin.dummer@gmx.net> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Jacek Anaszewski 提交于
Parameters delay_on and delay_off of led_trigger_blink_oneshot() are pointers, to enable blink interval adjustment by LED class drivers of the controllers that implement hardware blinking. Move ide_blink_delay variable to ledtrig_ide_activity() in order to prevent the situation when adjustment committed by one LED class driver influences blink interval of the software fallback blink feature, that is applied to the drivers that don't implement blink_set op. Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 14 4月, 2016 1 次提交
-
-
由 Dan Carpenter 提交于
If choose_times() returns -EINVAL that means "c1" and "c2" haven't been initialized. I've added a check for that. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 13 4月, 2016 1 次提交
-
-
由 Ezequiel Garcia 提交于
This commit introduces a MTD trigger for flash (NAND/NOR) device activity. The implementation is copied from IDE disk. This trigger deprecates the "nand-disk" LED trigger, but for backwards compatibility, we still keep the "nand-disk" trigger around. The motivation for deprecating the "nand-disk" LED trigger is that it only works for NAND drivers, whereas the "mtd" LED trigger is more generic (in fact, "nand-disk" currently only works for certain NAND drivers). Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 30 3月, 2016 1 次提交
-
-
由 Ezequiel Garcia 提交于
This commit introduces a new LED trigger which allows to configure a LED to blink on a kernel panic (through panic_blink). Notice that currently the Openmoko FreeRunner (GTA02) mach code sets panic_blink to blink a hard-coded LED. The new trigger is meant to introduce a generic mechanism to achieve this. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 24 3月, 2016 2 次提交
-
-
由 Michał Kępień 提交于
Instead of using the WMI wrapper, dell-led can take advantage of dell_smbios_send_request() for performing the SMBIOS calls required to change the state of the microphone LED. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
由 Michał Kępień 提交于
With the advent of dell_smbios_find_token(), dell-led does not need to perform any DMI walking on its own, but it can rather ask dell-smbios to look up the DMI tokens it needs for changing the state of the microphone LED. Signed-off-by: NMichał Kępień <kernel@kempniu.pl> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
-
- 14 3月, 2016 3 次提交
-
-
由 Heiner Kallweit 提交于
led_trigger_store can be significantly simplified by using sysfs_streq(). Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Amitoj Kaur Chawla 提交于
Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, max8997_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: //<smpl> @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } //</smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Amitoj Kaur Chawla 提交于
Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, da903x_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: //<smpl> @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } //</smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-