summaryrefslogtreecommitdiff
path: root/drivers/leds
AgeCommit message (Collapse)Author
2014-05-08leds: leds-pwm: implement PWM inversionRussell King
Some PWM outputs are wired such that the LED they're controlling is connected to supply rather than ground. These PWMs may not support output inversion, or when they do, disabling the PWM may set the PWM output low, causing a "brightness" value of zero to turn the LED fully on. The platform data for this driver already indicates that this was thought about, and we have the "active_low" property there already. However, the implementation for this is missing. Add the trivial implementation for this feature. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-05-08leds: leds-pwm: convert OF parsing code to use led_pwm_add()Russell King
Convert the OF parsing code to use the common PWM LED registration code, which means we have a consistent method, and single point where the registration happens for both paths. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-05-08leds: leds-pwm: provide a common function to setup a single led-pwm deviceRussell King
Provide a common function to setup a single led-pwm device, replacing the platform data initialisation path with this function. This allows us to have a common method of creating these devices in a consistent manner, which then allows us to place the probe failure cleanup in one place. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-05-08leds: pca9685: Remove leds-pca9685 driverAxel Lin
This driver is replaced by pwm-pca9685 driver and there is no user uses this driver in current tree. So remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Acked-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-05-08dell-led: add mic mute led interfaceAlex Hung
This patch provides similar led functional of 420f973 thinkpad-acpi: Add mute and mic-mute LED functionality Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-04-10Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds Pull LED updates from Bryan Wu: "This cycle we got: - new driver for leds-mc13783 - bug fixes - code cleanup" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: make sure we unregister a trigger only once leds: leds-pwm: properly clean up after probe failure leds: clevo-mail: Make probe function __init leds-ot200: Fix dependencies leds-gpio: of: introduce MODULE_DEVICE_TABLE for module autoloading leds: clevo-mail: remove __initdata marker leds: leds-ss4200: remove __initdata marker leds: blinkm: remove unnecessary spaces leds: lp5562: remove unnecessary parentheses leds: leds-ss4200: remove DEFINE_PCI_DEVICE_TABLE macro leds: leds-s3c24xx: Trivial cleanup in header file drivers/leds: delete non-required instances of include <linux/init.h> leds: leds-gpio: add retain-state-suspended property leds: leds-mc13783: Add devicetree support leds: leds-mc13783: Remove unnecessary cleaning of registers on exit leds: leds-mc13783: Use proper "max_brightness" value fo LEDs leds: leds-mc13783: Use LED core PM functions leds: leds-mc13783: Add MC34708 LED support leds: Turn off led if blinking is disabled ledtrig-cpu: Handle CPU hot(un)plugging
2014-04-07leds: make sure we unregister a trigger only onceSasha Levin
Currently, we may attempt to unregister a trigger more than once, for example when we receive two consecutive reboot notifications, or when we do a regular unregistration plus reboot notification. This leads to the following error since we try to delete the list node twice: [ 2780.254922] WARNING: CPU: 0 PID: 13764 at lib/list_debug.c:53 __list_del_entry+0x3e/0xe0() [ 2780.265559] list_del corruption, ffffffffa5eb6470->next is LIST_POISON1 (dead000000100100) [ 2780.271710] Modules linked in: [ 2780.274156] CPU: 0 PID: 13764 Comm: kworker/0:2 Tainted: G W 3.14.0-next-20140403-sasha-00012-gef5fa7d-dirty #373 [ 2780.283063] Workqueue: events do_poweroff [ 2780.285644] 0000000000000009 ffff8800330dbb38 ffffffffa34bfa33 0000000000002fe0 [ 2780.291571] ffff8800330dbb88 ffff8800330dbb78 ffffffffa015a37c ffff8800330dbb68 [ 2780.296670] ffffffffa5eb6470 0000000000000000 ffffffffa5eb6400 ffffffffa5ad7430 [ 2780.299756] Call Trace: [ 2780.301530] dump_stack (lib/dump_stack.c:52) [ 2780.303802] warn_slowpath_common (kernel/panic.c:418) [ 2780.306151] warn_slowpath_fmt (kernel/panic.c:433) [ 2780.308156] __list_del_entry (lib/list_debug.c:51 (discriminator 1)) [ 2780.310800] list_del (lib/list_debug.c:78) [ 2780.313175] led_trigger_unregister (drivers/leds/led-triggers.c:225) [ 2780.315599] heartbeat_reboot_notifier (drivers/leds/trigger/ledtrig-heartbeat.c:119) [ 2780.317247] notifier_call_chain (kernel/notifier.c:95) [ 2780.320014] __blocking_notifier_call_chain (kernel/notifier.c:316) [ 2780.323263] blocking_notifier_call_chain (kernel/notifier.c:326) [ 2780.326096] kernel_power_off (include/linux/kmod.h:95 kernel/reboot.c:153 kernel/reboot.c:179) [ 2780.327883] do_poweroff (kernel/power/poweroff.c:23) [ 2780.330748] process_one_work (kernel/workqueue.c:2221 include/linux/jump_label.h:105 include/trace/events/workqueue.h:111 kernel/workqueue.c:2226) [ 2780.333027] ? process_one_work (include/linux/workqueue.h:186 kernel/workqueue.c:611 kernel/workqueue.c:638 kernel/workqueue.c:2214) [ 2780.335487] process_scheduled_works (include/linux/list.h:188 kernel/workqueue.c:2277) [ 2780.337101] worker_thread (kernel/workqueue.c:2352) [ 2780.338712] ? rescuer_thread (kernel/workqueue.c:2297) [ 2780.341326] kthread (kernel/kthread.c:219) [ 2780.343446] ? kthread_create_on_node (kernel/kthread.c:185) [ 2780.345733] ret_from_fork (arch/x86/kernel/entry_64.S:555) [ 2780.347168] ? kthread_create_on_node (kernel/kthread.c:185) Prevent it by making sure we don't attempt to unregister a trigger that is not in the triggers list. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-04-07leds: leds-pwm: properly clean up after probe failureRussell King
When probing with DT, we add each LED one at a time. If we find a LED without a PWM device (because it is not available yet) we fail the initialisation, unregister previous LEDs, and then by way of managed resources, we free the structure. The problem with this is we may have a scheduled and active work_struct in this structure, and this results in a nasty kernel oops. We need to cancel this work_struct properly upon cleanup - and the cleanup we require is the same cleanup as we do when the LED platform device is removed. Rather than writing this same code three times, move it into a separate function and use it in all three places. Fixes: c971ff185f64 ("leds: leds-pwm: Defer led_pwm_set() if PWM can sleep") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-03-13leds: clevo-mail: Make probe function __initJean Delvare
One of the benefits of platform_driver_probe() is that you can make the probe function __init. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-03-11leds-ot200: Fix dependenciesJean Delvare
The Bachmann OT200 is a Geode-based device, so OT200-specific drivers are only useful on X86_32, except for build testing. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-03-06leds-gpio: of: introduce MODULE_DEVICE_TABLE for module autoloadingPaolo Pisati
Enable autoloading of leds-gpio module when a corresponing DT entry is present. Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-28leds: clevo-mail: remove __initdata markerJingoo Han
Remove __initdata marker, because it is not right for a module parameter. It will make the kernel oops problem. (cooloney@gmail.com: update commit message since it's really a wrong notation) Signed-off-by: Jingoo Han <jg1.han@samsung.com> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-28leds: leds-ss4200: remove __initdata markerJingoo Han
Remove __initdata marker, because it is not right for a module parameter. It will make the kernel oops problem. (cooloney@gmail.com: update commit message since it's really a wrong notation) Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: blinkm: remove unnecessary spacesJingoo Han
Remove unnecessary space in order to fix the following checkpatch issues. WARNING: space prohibited before semicolon Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jan-Simon Möller <dl9pf@gmx.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: lp5562: remove unnecessary parenthesesJingoo Han
Remove unnecessary parentheses in order to fix the following checkpatch error. ERROR: return is not a function, parentheses are not required Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: leds-ss4200: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is deprecated. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27drivers/leds: delete non-required instances of include <linux/init.h>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: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: leds-gpio: add retain-state-suspended propertyRobin 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: Robin Gong <b38343@freescale.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: leds-mc13783: Add devicetree supportAlexander Shiyan
This patch adds devicetree support for the MC13XXX LED driver. (cooloney@gmail.com: remove unneeded semicolon) Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: leds-mc13783: Remove unnecessary cleaning of registers on exitAlexander Shiyan
LED core switches each LED to OFF-state on exit, so there is no need for resetting registers. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: leds-mc13783: Use proper "max_brightness" value fo LEDsAlexander Shiyan
Instead of using maximum value of 255 and shift it to appropriate LED duty cycle, this patch introduce a helper to use proper maximum value for each LED. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: leds-mc13783: Use LED core PM functionsAlexander Shiyan
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: leds-mc13783: Add MC34708 LED supportAlexander Shiyan
This patch adds support for two LEDs on MC34708 PMIC. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27leds: Turn off led if blinking is disabledStefan Sørensen
When using the timer trigger and setting delay_on to 0, the led will stay in whatever state is was in, while intuitively one would expect it to turn off. This patch changes the behaviour to turn it off. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27ledtrig-cpu: Handle CPU hot(un)pluggingPawel Moll
When CPU is hot(un)plugged, no syscore notification is being generated, nor is cpuidle involved. This leaves the CPU LED turned on, because the dying thread is doing some work (LED on) and than it is... well, dying (LED still on :-) Added notifier block for hot(un)plugging operations, generating existing trigger events. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-24drivers: Enable building of Kirkwood drivers for mach-mvebuAndrew Lunn
With the move of kirkwood into mach-mvebu, drivers Kconfig need tweeking to allow the kirkwood specific drivers to be built. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Tested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Bryan Wu <cooloney@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-01-28Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds Pull LED subsystem update from Bryan Wu: "Basically this cycle is mostly cleanup for LED subsystem" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: s3c24xx: Remove hardware.h inclusion leds: replace list_for_each with list_for_each_entry leds: kirkwood: Cleanup in header files leds: pwm: Remove a warning on non-DT platforms leds: leds-pwm: fix duty time overflow. leds: leds-mc13783: Remove unneeded mc13xxx_{un}lock leds: leds-mc13783: Remove duplicate field in platform data drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base' leds: lp5523: Support LED MUX configuration on running a pattern leds: lp5521/5523: Fix multiple engine usage bug LEDS: tca6507 - fix up some comments. LEDS: tca6507: add device-tree support for GPIO configuration. LEDS: tca6507 - fix bugs in parsing of device-tree configuration.
2014-01-27leds: s3c24xx: Remove hardware.h inclusionSachin Kamat
The contents of this header file is not referenced in the led driver. Remove its inclusion. While at it, re-arrange the headers as per the category. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27leds: replace list_for_each with list_for_each_entryZHAO Gang
Use the more convenient macro. Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27leds: pwm: Remove a warning on non-DT platformsOlof Johansson
This removes a warning on non-DT-enabled platforms: drivers/leds/leds-pwm.c: In function 'led_pwm_create_of': drivers/leds/leds-pwm.c:88:22: warning: unused variable 'node' Really caused by the local variable that is assigned to and then never used. Just do away with the local var, it's not needed. Technically this code path can never be entered without DT enabled, since there's an earlier check about number of children in the calling function, but the compiler can't see that. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27leds: leds-pwm: fix duty time overflow.Xiubo Li
Overflow maybe occurs when calculates the duty time. For instance, the period time is 990000000ns, and the max_brightness is 127, when setting the brightness to 12, the duty value will be 25906026ns, but it should be 93543307ns. Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27leds: leds-mc13783: Remove unneeded mc13xxx_{un}lockAlexander Shiyan
LED registers are used only in this driver, so no additional locking is needed. Read-Modify-Write cycle in workqueue is already protected by regmap. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27leds: leds-mc13783: Remove duplicate field in platform dataAlexander Shiyan
LED platform data are overwhelmed by excessive field "max_cur" which just replicates few bits of "led_control" field. This patch removes this field and adds a definition for the current settings in the header. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for ↵Chen Gang
'gpio_base' Need check CONFIG_GPIOLIB whether defined, just like another area has done within this file. Or can not pass compiling when CONFIG_GPIOLIB disabled. The related error (with allmodconfig for metag): CC [M] drivers/leds/leds-tca6507.o drivers/leds/leds-tca6507.c: In function 'tca6507_led_dt_init': drivers/leds/leds-tca6507.c:731: error: 'struct tca6507_platform_data' has no member named 'gpio_base' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27leds: lp5523: Support LED MUX configuration on running a patternMilo Kim
There are two ways to run a pattern in LP5523. One is using legacy sysfs files such as 'enginex_mode','enginex_load' and 'enginex_leds'. ('x' is from 1 to 3). Among them, 'enginex_leds' are used for selecting specific LED channel MUX. (MUX means which LEDs are used for running a pattern from LED 1 to 9.) The other way is using the firmware interface. In this mode, the default LED MUX strings are used. In other words, LED MUX is not configurable on the fly. This patch enables dynamic LED MUX configuration when the firmware is loaded. By accessing the sysfs file 'enginex_leds', the LED channels can be configured. To synchronize the operation mode, each engine mode should be set to 'LOAD'. The documentation is updated as well. Cc: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27leds: lp5521/5523: Fix multiple engine usage bugMilo Kim
Whenever the engine is loaded by the user-application, the operation mode is reset first. But it has a problem in case of multiple engine used because previous engine settings are cleared. The driver should update not whole 8bits but each engine bit by masking. On the other hands, whole engines should be reset when the driver is unloaded and on initializing the LP5523 driver. So, new functions are used for this handling - lp5521/5523_stop_all_engines(). Cc: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27LEDS: tca6507 - fix up some comments.NeilBrown
In particular fix the capitalisation of GPIO and LED and correct TCA6507_MAKE_CPIO, but also rewrite the comment about platform-data to include reference to devicetree. Also re-wrap comments to fit 80 columns. Reported-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27LEDS: tca6507: add device-tree support for GPIO configuration.NeilBrown
The 7 lines driven by the TCA6507 can either drive LEDs or act as output-only GPIOs. To make this distinction in devicetree we use the "compatible" property. If the device attached to a line is "compatible" with "gpio", we treat it like a GPIO. If it is "compatible" with "led" (or if no "compatible" value is set) we treat it like an LED. (cooloney@gmail.com: fix typo in the subject) Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-27LEDS: tca6507 - fix bugs in parsing of device-tree configuration.NeilBrown
1/ The led_info array must be allocated to allow the full number of LEDs even if not all are present. The array maybe be sparsely filled but it is indexed by device address so we must at least allocate as many slots as the highest address used. It is easiest just to allocate all 7. 2/ range check the 'reg' value properly. 3/ led.flags must be initialised to zero, else all leds could be treated as GPIOs (depending on what happens to be on the stack). Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-01-22Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual rocket science stuff from trivial.git" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) neighbour.h: fix comment sched: Fix warning on make htmldocs caused by wait.h slab: struct kmem_cache is protected by slab_mutex doc: Fix typo in USB Gadget Documentation of/Kconfig: Spelling s/one/once/ mkregtable: Fix sscanf handling lp5523, lp8501: comment improvements thermal: rcar: comment spelling treewide: fix comments and printk msgs IXP4xx: remove '1 &&' from a condition check in ixp4xx_restart() Documentation: update /proc/uptime field description Documentation: Fix size parameter for snprintf arm: fix comment header and macro name asm-generic: uaccess: Spelling s/a ny/any/ mtd: onenand: fix comment header doc: driver-model/platform.txt: fix a typo drivers: fix typo in DEVTMPFS_MOUNT Kconfig help text doc: Fix typo (acces_process_vm -> access_process_vm) treewide: Fix typos in printk drivers/gpu/drm/qxl/Kconfig: reformat the help text ...
2014-01-21Merge tag 'gpio-v3.14-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO tree bulk changes from Linus Walleij: "A big set this merge window, as we have much going on in this subsystem. The changes to other subsystems (notably a slew of ARM machines as I am doing away with their custom APIs) have all been ACKed to the extent possible. Major changes this time: - Some core improvements and cleanups to the new GPIO descriptor API. This seems to be working now so we can start the exodus to this API, moving gradually away from the global GPIO numberspace. - Incremental improvements to the ACPI GPIO core, and move the few GPIO ACPI clients we have to the GPIO descriptor API right *now* before we go any further. We actually managed to contain this *before* we started to litter the kernel with yet another hackish global numberspace for the ACPI GPIOs, which is a big win. - The RFkill GPIO driver and all platforms using it have been migrated to use the GPIO descriptors rather than fixed number assignments. Tegra machine has been migrated as part of this. - New drivers for MOXA ART, Xtensa GPIO32 and SMSC SCH311x. Those should be really good examples of how I expect a nice GPIO driver to look these days. - Do away with custom GPIO implementations on a major part of the ARM machines: ks8695, lpc32xx, mv78xx0. Make a first step towards the same in the horribly convoluted Samsung S3C include forest. We expect to continue to clean this up as we move forward. - Flag GPIO lines used for IRQ on adnp, bcm-kona, em, intel-mid and lynxpoint. This makes the GPIOlib core aware that a certain GPIO line is used for IRQs and can then enforce some semantics such as disallowing a GPIO line marked as in use for IRQ to be switched to output mode. - Drop all use of irq_set_chip_and_handler_name(). The name provided in these cases were just unhelpful tags like "mux" or "demux". - Extend the MCP23s08 driver to handle interrupts. - Minor incremental improvements for rcar, lynxpoint, em 74x164 and msm drivers. - Some non-urgent bug fixes here and there, duplicate #includes and that usual kind of cleanups" Fix up broken Kconfig file manually to make this all compile. * tag 'gpio-v3.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (71 commits) gpio: mcp23s08: fix casting caused build warning gpio: mcp23s08: depend on OF_GPIO gpio: mcp23s08: Add irq functionality for i2c chips ARM: S5P[v210|c100|64x0]: Fix build error gpio: pxa: clamp gpio get value to [0,1] ARM: s3c24xx: explicit dependency on <plat/gpio-cfg.h> ARM: S3C[24|64]xx: move includes back under <mach/> scope Documentation / ACPI: update to GPIO descriptor API gpio / ACPI: get rid of acpi_gpio.h gpio / ACPI: register to ACPI events automatically mmc: sdhci-acpi: convert to use GPIO descriptor API ARM: s3c24xx: fix build error gpio: f7188x: set can_sleep attribute gpio: samsung: Update documentation gpio: samsung: Remove hardware.h inclusion gpio: xtensa: depend on HAVE_XTENSA_GPIO32 gpio: clps711x: Enable driver compilation with COMPILE_TEST gpio: clps711x: Use of_match_ptr() net: rfkill: gpio: convert to descriptor-based GPIO interface leds: s3c24xx: Fix build failure ...
2014-01-10leds: lp5521/5523: Remove duplicate mutexMilo Kim
It can be a problem when a pattern is loaded via the firmware interface. LP55xx common driver has already locked the mutex in 'lp55xx_firmware_loaded()'. So it should be deleted. On the other hand, locks are required in store_engine_load() on updating program memory. Reported-by: Pali Rohár <pali.rohar@gmail.com> Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com> Cc: <stable@vger.kernel.org>
2014-01-10lp5523, lp8501: comment improvementsPavel Machek
Add some comments that are not obvious from first look at the driver to lp5523, fix typo in lp8501. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-01-07leds: s3c24xx: Fix build failureTushar Behera
Commit c67d0f29262b ("ARM: s3c24xx: get rid of custom <mach/gpio.h>") removed the usage of mach/gpio.h file, but we need to include> plat/gpio-cfg.h to avoid following build error. Fixes following build error. drivers/leds/leds-s3c24xx.c: In function ‘s3c24xx_led_probe’: drivers/leds/leds-s3c24xx.c:100:2: error: implicit declaration of function ‘s3c_gpio_setpull’ [-Werror=implicit-function-declaration] Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-12-02leds: pwm: Fix for deferred probe in DT booted modePeter Ujfalusi
We need to make sure that the error code from devm_of_pwm_get() is the one the module returns in case of failure. Restructure the code to make this possible for DT booted case. With this patch the driver can ask for deferred probing when the board is booted with DT. Fixes for example omap4-sdp board's keyboard backlight led. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-25leds: lp55xx: handle enable pin in driverSebastian Reichel
This patch moves the handling of the chip's enable pin from the board code into the driver. It also updates all board-code files using the driver to incorporate this change. This is needed for device tree support of the enable pin. Signed-off-by: Sebastian Reichel <sre@debian.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-25leds-gpio: of: led should not be created if its status is disabledJosh 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: Josh Wu <josh.wu@atmel.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-22leds: Added driver for the NXP PCA9685 I2C chipMaximilian Güntner
The NXP PCA9685 supports 16 channels/leds using a 12-bit PWM (4095 levels of brightness) This driver supports configuration using platform_data. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-22leds: pwm: Remove redundant of_match_ptrSachin Kamat
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-22leds: Include linux/of.h headerSachin Kamat
'of_match_ptr' is defined in linux/of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>