- 25 2月, 2017 1 次提交
-
-
由 Hans de Goede 提交于
Some LEDs may have their brightness level changed autonomously (outside of kernel control) by hardware / firmware. This commit adds support for an optional brightness_hw_changed attribute to signal such changes to userspace (if a driver can detect them): What: /sys/class/leds/<led>/brightness_hw_changed Date: January 2017 KernelVersion: 4.11 Description: Last hardware set brightness level for this LED. Some LEDs may be changed autonomously by hardware/firmware. Only LEDs where this happens and the driver can detect this, will have this file. This file supports poll() to detect when the hardware changes the brightness. Reading this file will return the last brightness level set by the hardware, this may be different from the current brightness. Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to their flags field and call led_classdev_notify_brightness_hw_changed() with the hardware set brightness when they detect a hardware / firmware triggered brightness change. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
-
- 25 12月, 2016 1 次提交
-
-
由 Thomas Gleixner 提交于
When the state names got added a script was used to add the extra argument to the calls. The script basically converted the state constant to a string, but the cleanup to convert these strings into meaningful ones did not happen. Replace all the useless strings with 'subsys/xxx/yyy:state' strings which are used in all the other places already. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Siewior <bigeasy@linutronix.de> Link: http://lkml.kernel.org/r/20161221192112.085444152@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 02 12月, 2016 1 次提交
-
-
由 Tin Huynh 提交于
This patch enables ACPI support for leds-pca955x driver. Signed-off-by: NTin Huynh <tnhuynh@apm.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 30 11月, 2016 2 次提交
-
-
由 Javier Martinez Canillas 提交于
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/leds//leds-netxbig.ko | grep alias alias: platform:leds-netxbig After this patch: $ modinfo drivers/leds//leds-netxbig.ko | grep alias alias: platform:leds-netxbig alias: of:N*T*Clacie,netxbig-ledsC* alias: of:N*T*Clacie,netxbig-leds Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Tin Huynh 提交于
This patch enables ACPI support for leds-pca963x driver. Signed-off-by: NTin Huynh <tnhuynh@apm.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 23 11月, 2016 1 次提交
-
-
由 Geliang Tang 提交于
Use builtin_platform_driver() helper to simplify the code. Signed-off-by: NGeliang Tang <geliangtang@gmail.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 22 11月, 2016 12 次提交
-
-
由 Hans de Goede 提交于
All 3 of led_timer_func, led_set_brightness and led_set_software_blink set blink_brightness. If led_timer_func or led_set_software_blink race with led_set_brightness they may end up overwriting the new blink_brightness. The new atomic work_flags does not protect against this as it just protects the flags and not blink_brightness. This commit introduces a new new_blink_brightness value which gets set by led_set_brightness and read by led_timer_func on LED on, fixing this. Dealing with the new brightness at LED on time, makes the new brightness apply sooner, which also fixes a led_set_brightness which happens while a oneshot blink which ends in LED on is running not getting applied. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Hans de Goede 提交于
All the LED_BLINK* flags are accessed read-modify-write from e.g. led_set_brightness and led_blink_set_oneshot while both set_brightness_work and the blink_timer may be running. If these race then the modify step done by one of them may be lost, switch the LED_BLINK* flags to a new atomic work_flags bit-field to avoid this race. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Hui Chun Ong 提交于
Add the driver to support User LEDs on PXI Embedded Controller. Signed-off-by: NHui Chun Ong <hui.chun.ong@ni.com> Signed-off-by: NBrad Mouring <brad.mouring@ni.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Vadim Pasternak 提交于
Verify that vendor is Mellanox as the first step of initialization. If it is not - return ENODEV. Change module license from "GPL v2" to "Dual BSD/GPL". Signed-off-by: NVadim Pasternak <vadimp@mellanox.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Matt Ranostay 提交于
Allow chip to enter low power state when no LEDs are being lit or in blink mode. Cc: Peter Meerwald <p.meerwald@bct-electronic.com>, Cc: Ricardo Ribalda <ricardo.ribalda@gmail.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: NMatt Ranostay <matt@ranostay.consulting> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Felix Brack 提交于
The value for a led's default_trigger should come from platform data instead of data (which is always 0). Signed-off-by: NFelix Brack <fb@ltec.ch> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Matt Ranostay 提交于
PCA9632TK part seems to incorrectly blink at ~1.3x of the programmed rate. This patchset add a nxp,period-scale devicetree property to adjust for this misconfiguration. Signed-off-by: NMatt Ranostay <matt@ranostay.consulting> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Javier Martinez Canillas 提交于
If the driver is built as a module, I2C module alias information is not filled so the module won't be autoloaded if the device isn't registered over ACPI. Export the I2C device table alias with MODULE_DEVICE_TABLE() macro so the information is exported in the module. Before this patch: $ modinfo drivers/leds/leds-lp3952.ko | grep alias alias: acpi*:TXNW3952:* After this patch: $ modinfo drivers/leds/leds-lp3952.ko | grep alias alias: i2c:lp3952 alias: acpi*:TXNW3952:* Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Alexander Kurz 提交于
Fix the register access shift argument calculation introduced with commit a59ce658 ("leds: leds-mc13783: Add MC34708 LED support") and re-enable access to the "keypad" led for MC13892 MFC devices. Signed-off-by: NAlexander Kurz <akurz@blala.de> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 Pavel Machek 提交于
Fix english spelling. Signed-off-by: NPavel Machek <pavel@ucw.cz> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 David Lechner 提交于
Use a macro instead of hard-coding the max device node name size. The uleds driver introduced a macro for this value, so using it. Signed-off-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
由 David Lechner 提交于
This driver creates a userspace leds driver similar to uinput. New LEDs are created by opening /dev/uleds and writing a uleds_user_dev struct. A new LED class device is registered with the name given in the struct. Reading will return a single byte that is the current brightness. The poll() syscall is also supported. It will be triggered whenever the brightness changes. Closing the file handle to /dev/uleds will remove the leds class device. Signed-off-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
-
- 21 11月, 2016 1 次提交
-
-
由 Linus Walleij 提交于
The Kconfig and file naming for the PM8xxx driver is totally confusing: - Kconfig options MFD_PM8XXX and MFD_PM8921_CORE, some in-kernel users depending on or selecting either at random. - A driver file named pm8921-core.c even if it is indeed used by the whole PM8xxx family of chips. - An irqchip named pm8xxx since it was (I guess) realized that the driver was generic for all pm8xxx PMICs. As I may want to add support for PM8901 this is starting to get really messy. Fix this situation by: - Remove the MFD_PM8921_CORE symbol and rely solely on MFD_PM8XXX and convert all users, including LEDs Kconfig and ARM defconfigs for qcom and multi_v7 to use that single symbol. - Renaming the driver to qcom-pm8xxx.c to fit along the two other qcom* prefixed drivers. - Rename functions withing the driver from 8921 to 8xxx to indicate it is generic. - Just drop the =m config from the pxa_defconfig, I have no clue why it is even there, it is not a Qualcomm platform. (Possibly older Kconfig noise from saveconfig.) Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 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>
-