summaryrefslogtreecommitdiffstats
path: root/drivers/leds
Commit message (Collapse)AuthorAgeFilesLines
* leds:lp55xx: Correct Kconfig dependency for f/w user helperTakashi Iwai2015-09-171-1/+1
| | | | | | | | | | | | | | | | | | The commit [b67893206fc0: leds:lp55xx: fix firmware loading error] tries to address the firmware file handling with user helper, but it sets a wrong Kconfig CONFIG_FW_LOADER_USER_HELPER_FALLBACK. Since the wrong option was enabled, the system got a regression -- it suffers from the unexpected long delays for non-present firmware files. This patch corrects the Kconfig dependency to the right one, CONFIG_FW_LOADER_USER_HELPER. This doesn't change the fallback behavior but only enables UMH when needed. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=944661 Fixes: b67893206fc0 ('leds:lp55xx: fix firmware loading error') Cc: <stable@vger.kernel.org> # v4.2+ Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* leds: leds-ipaq-micro: Add LEDS_CLASS dependencyJacek Anaszewski2015-09-171-0/+1
| | | | | | | Fix missing Kconfig LEDS_CLASS dependency. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* leds: aat1290: add 'static' modifier to init_mm_current_scaleJacek Anaszewski2015-09-171-1/+1
| | | | | | Function init_mm_current_scale is used only locally. Make it static then. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* leds: leds-ns2: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-171-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* leds: max77693: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-171-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* leds: ktd2692: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-171-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* leds: bcm6358: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-171-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* leds: bcm6328: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-171-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* leds: aat1290: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-171-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* Merge tag 'backlight-for-linus-4.3' of ↵Linus Torvalds2015-09-043-444/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: - Stop using LP855X Platform Data to control regulators - Move PWM8941 WLED driver into Backlight - Remove invalid use of IS_ERR_VALUE() macro - Remove duplicate check for NULL data before unregistering - Export I2C Device ID structure * tag 'backlight-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: tosa: Export I2C module alias information backlight: lp8788_bl: Delete a check before backlight_device_unregister() backlight: sky81452: Remove unneeded use of IS_ERR_VALUE() macro backlight: pm8941-wled: Move PM8941 WLED driver to backlight backlight: lp855x: Use private data for regulator control
| * backlight: pm8941-wled: Move PM8941 WLED driver to backlightBjorn Andersson2015-08-253-444/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | The Qualcomm PM8941 WLED block is used for backlight and should therefor be in the backlight framework and not in the LED framework. This moves the driver and adapts to the backlight api instead. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Tested-by: Rob Clark <robdclark@gmail.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Jingoo Han <jingoohan1@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | Merge tag 'powerpc-4.3-1' of ↵Linus Torvalds2015-09-043-0/+357
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask from Benjamin Herrenschmidt - EEH fixes for SRIOV from Gavin - introduce rtas_get_sensor_fast() for IRQ handlers from Thomas Huth - use hardware RNG for arch_get_random_seed_* not arch_get_random_* from Paul Mackerras - seccomp filter support from Michael Ellerman - opal_cec_reboot2() handling for HMIs & machine checks from Mahesh Salgaonkar - add powerpc timebase as a trace clock source from Naveen N. Rao - misc cleanups in the xmon, signal & SLB code from Anshuman Khandual - add an inline function to update POWER8 HID0 from Gautham R. Shenoy - fix pte_pagesize_index() crash on 4K w/64K hash from Michael Ellerman - drop support for 64K local store on 4K kernels from Michael Ellerman - move dma_get_required_mask() from pnv_phb to pci_controller_ops from Andrew Donnellan - initialize distance lookup table from drconf path from Nikunj A Dadhania - enable RTC class support from Vaibhav Jain - disable automatically blocked PCI config from Gavin Shan - add LEDs driver for PowerNV platform from Vasant Hegde - fix endianness issues in the HVSI driver from Laurent Dufour - kexec endian fixes from Samuel Mendoza-Jonas - fix corrupted pdn list from Gavin Shan - fix fenced PHB caused by eeh_slot_error_detail() from Gavin Shan - Freescale updates from Scott: Highlights include 32-bit memcpy/memset optimizations, checksum optimizations, 85xx config fragments and updates, device tree updates, e6500 fixes for non-SMP, and misc cleanup and minor fixes. - a ton of cxl updates & fixes: - add explicit precision specifiers from Rasmus Villemoes - use more common format specifier from Rasmus Villemoes - destroy cxl_adapter_idr on module_exit from Johannes Thumshirn - destroy afu->contexts_idr on release of an afu from Johannes Thumshirn - compile with -Werror from Daniel Axtens - EEH support from Daniel Axtens - plug irq_bitmap getting leaked in cxl_context from Vaibhav Jain - add alternate MMIO error handling from Ian Munsie - allow release of contexts which have been OPENED but not STARTED from Andrew Donnellan - remove use of macro DEFINE_PCI_DEVICE_TABLE from Vaishali Thakkar - release irqs if memory allocation fails from Vaibhav Jain - remove racy attempt to force EEH invocation in reset from Daniel Axtens - fix + cleanup error paths in cxl_dev_context_init from Ian Munsie - fix force unmapping mmaps of contexts allocated through the kernel api from Ian Munsie - set up and enable PSL Timebase from Philippe Bergheaud * tag 'powerpc-4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (140 commits) cxl: Set up and enable PSL Timebase cxl: Fix force unmapping mmaps of contexts allocated through the kernel api cxl: Fix + cleanup error paths in cxl_dev_context_init powerpc/eeh: Fix fenced PHB caused by eeh_slot_error_detail() powerpc/pseries: Cleanup on pci_dn_reconfig_notifier() powerpc/pseries: Fix corrupted pdn list powerpc/powernv: Enable LEDS support powerpc/iommu: Set default DMA offset in dma_dev_setup cxl: Remove racy attempt to force EEH invocation in reset cxl: Release irqs if memory allocation fails cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE powerpc/powernv: Fix mis-merge of OPAL support for LEDS driver powerpc/powernv: Reset HILE before kexec_sequence() powerpc/kexec: Reset secondary cpu endianness before kexec powerpc/hvsi: Fix endianness issues in the HVSI driver leds/powernv: Add driver for PowerNV platform powerpc/powernv: Create LED platform device powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states powerpc/powernv: Fix the log message when disabling VF cxl: Allow release of contexts which have been OPENED but not STARTED ...
| * | powerpc/powernv: Fix mis-merge of OPAL support for LEDS driverMichael Ellerman2015-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I merged the OPAL support for the powernv LEDS driver I missed a hunk. This is slightly modified from the original patch, as the original added code to opal-api.h which is not in the skiboot version, which is discouraged. Instead those values are moved into the driver, which is the only place they are used. Fixes: 8a8d91817aec ("powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states") Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
| * | leds/powernv: Add driver for PowerNV platformVasant Hegde2015-08-203-0/+357
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements LED driver for PowerNV platform using the existing generic LED class framework. PowerNV platform has below type of LEDs: - System attention Indicates there is a problem with the system that needs attention. - Identify Helps the user locate/identify a particular FRU or resource in the system. - Fault Indicates there is a problem with the FRU or resource at the location with which the indicator is associated. We register classdev structures for all individual LEDs detected on the system through LED specific device tree nodes. Device tree nodes specify what all kind of LEDs present on the same location code. It registers LED classdev structure for each of them. All the system LEDs can be found in the same regular path /sys/class/leds/. We don't use LED colors. We use LED node and led-types property to form LED classdev. Our LEDs have names in this format. <location_code>:<attention|identify|fault> Any positive brightness value would turn on the LED and a zero value would turn off the LED. The driver will return LED_FULL (255) for any turned on LED and LED_OFF (0) for any turned off LED. The platform level implementation of LED get and set state has been achieved through OPAL calls. These calls are made available for the driver by exporting from architecture specific codes. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com> Tested-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* | Merge tag 'leds_for_4.3' of ↵Linus Torvalds2015-09-0120-165/+165
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "In this merge window we'd like to announce a change on the list of LED subsystem maintainers - Bryan Wu decided to step back and handed over the maintainership to me (Jacek Anaszewski), which entailed an update of LED subsystem git tree URL. Besides the changes in MAINTAINERS we have: - optimizations and improvements to existing LED class drivers - improvements to the common LEDs DT documentation - modifications of kirkwood-* dts files, to be in sync with patches for leds-ns2 driver, that move LEDs mode mapping outside of the driver" * tag 'leds_for_4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: Export OF module alias information in missing drivers leds:lp55xx: use the private data instead of updating I2C device platform data leds: syscon: Correct check for syscon_node_to_regmap() errors leds: leds-fsg: Use devm_led_classdev_register MAINTAINERS: Change LED subsystem git tree URL leds/led-class: Add missing put_device() ARM: Kirkwood: add modes-map property to ns2-leds nodes leds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check leds: leds-ns2: depends on MACH_ARMADA_370 leds: leds-ns2: handle can_sleep GPIOs leds: leds-ns2: move LED modes mapping outside of the driver leds: lp8860: Constify reg_default tables leds: Drop owner assignment from i2c_driver leds: Allow compile test of LEDS_AAT1290 and LEDS_KTD2692 if !GPIOLIB leds: Allow compile test of GPIO consumers if !GPIOLIB DT: leds: Improve description of flash LEDs related properties
| * | leds: Export OF module alias information in missing driversJavier Martinez Canillas2015-08-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I2C core always reports the MODALIAS uevent as "i2c:<modalias>" regardless of the mechanism that was used to register the device (i.e: OF or board code) and the table that is used later to match the driver with the device (i.e: I2C id table or OF match table). So drivers needs to export the I2C id table and this be built into the module or udev won't have the necessary information to autoload the needed driver module when the device is added. But this means that OF-only drivers needs to have both OF and I2C id tables that have to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. Which can lead to issues if two vendors use the same I2C device name for example. To avoid the above, the I2C core behavior may be changed in the future to not require an SPI device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table even when is unused now to prevent breaking module loading when the core changes. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds:lp55xx: use the private data instead of updating I2C device platform dataMilo Kim2015-08-286-33/+28Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, lp55xx_of_populate_pdata() allocates lp55xx_platform_data if it's null. And it parses the DT and copies values into the 'client->dev.platform_data'. This may have architectural issue. Platform data is configurable through the DT or I2C board info inside the platform area. However, lp55xx common driver changes this configuration when it is loaded. So 'client->dev.platform_data' is not null anymore. Eventually, the driver initialization is not identical when it's unloaded and loaded again. The lp55xx common driver should use the private data, 'lp55xx_chip->pdata' instead of changing the original platform data. So, lp55xx_of_populate_pdata() is modified as follows. * Do not update 'dev->platform_data'. Return the pointer of new allocated lp55xx_platform_data. Then the driver points it to private data, 'lp55xx_chip->pdata'. * Each lp55xx driver checks the pointer and handles an error case. Then, original platform data configuration will be kept regardless of loading or unloading the driver. The driver allocates the memory and copies them from the DT if it's NULL. After the driver is loaded again, 'client->dev.platform_data' is same as initial load, so the driver is initialized identically. Cc: Toshi Kikuchi <toshik@chromium.org> Cc: linux-leds@vger.kernel.org Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: syscon: Correct check for syscon_node_to_regmap() errorsBjorn Andersson2015-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | syscon_node_to_regmap() returns a regmap or an ERR_PTR(). Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: leds-fsg: Use devm_led_classdev_registerVaishali Thakkar2015-08-281-40/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use resource-managed function devm_led_classdev_register instead of led_classdev_register to make the error-path simpler. To be compatible with the change, various gotos are replaced with direct returns and unneeded labels are dropped. Also, remove fsg_led_remove as it is now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds/led-class: Add missing put_device()Ricardo Ribalda Delgado2015-08-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devices found by class_find_device must be freed with put_device(). Otherwise the reference count will not work properly. Fixes: a96aa64cb572 ("leds/led-class: Handle LEDs with the same name") Reported-by: Alan Tull <delicious.quinoa@gmail.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality checkAxel Lin2015-08-281-4/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | This checking is done by regmap_get_i2c_bus() which is called in devm_regmap_init_i2c(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: leds-ns2: depends on MACH_ARMADA_370Simon Guinot2015-08-281-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The leds-ns2 driver is also used by the n090401 board (Seagate NAS 4-Bay), which is based on the Marvell Armada-370 SoC. Then this patch allows to select the leds-ns2 driver if MACH_ARMADA_370 is enabled. Additionally, this also updates the Kconfig help message. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: leds-ns2: handle can_sleep GPIOsSimon Guinot2015-08-281-24/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the board n090401 (Seagate NAS 4-Bay), some of the LEDs are handled by the leds-ns2 driver. This LEDs are connected to an I2C GPIO expander (PCA95554PW) which means that GPIO access may sleep. This patch makes leds-ns2 compatible with such GPIOs by using the *_cansleep() variant of the GPIO functions. As a drawback this functions can't be used safely in a timer context (with the timer LED trigger for example). To fix this issue, a workqueue mechanism (copied from the leds-gpio driver) is used. Note that this patch also updates slightly the ns2_led_sata_store function. The LED state is now retrieved from cached values instead of reading the GPIOs previously. This prevents ns2_led_sata_store from working with a stale LED state (which may happen when a delayed work is pending). Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: leds-ns2: move LED modes mapping outside of the driverVincent Donnefort2015-08-281-48/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the board n090401 (Seagate NAS 4-Bay), the LED mode mapping (GPIO values to LED mode) is different from the one used on other boards supported by the leds-ns2 driver. With this patch the hardcoded mapping is removed from leds-ns2. Now, it must be defined either in the platform data (if an old-fashion board setup file is used) or in the DT node. In order to allow the later, this patch also introduces a modes-map property for the leds-ns2 DT binding. Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: lp8860: Constify reg_default tablesAxel Lin2015-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | These reg_default tables are not modified after initialized, so make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-08-286-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: Allow compile test of LEDS_AAT1290 and LEDS_KTD2692 if !GPIOLIBGeert Uytterhoeven2015-08-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. If COMPILE_TEST is enabled, relax the dependency on GPIOLIB for the recently introduced symbols LEDS_AAT1290 and LEDS_KTD2692. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
| * | leds: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven2015-08-282-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: linux-leds@vger.kernel.org Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
* / drivers: max77693: Move state container to common headerKrzysztof Kozlowski2015-07-161-0/+1
|/ | | | | | | | | | | | | | | | | This prepares for merging some of the drivers between max77693 and max77843 so the child MFD driver can be attached to any parent MFD main driver. Move the state container to common header file. Additionally add consistent 'i2c' prefixes to its members (of 'struct i2c_client' type). Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: Sebastian Reichel <sre@kernel.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'for-next' of ↵Linus Torvalds2015-07-0215-46/+3300
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds Pull LED subsystem updates from Bryan Wu: "In this cycle, we finished to merge patches for LED Flash class driver. Other than that we have some bug fixes and new drivers for LED controllers" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits) leds:lp55xx: fix firmware loading error leds: fix max77693-led build errors leds: fix aat1290 build errors leds: aat1290: pass flags parameter to devm_gpiod_get leds: ktd2692: pass flags parameter to devm_gpiod_get drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c leds: aat1290: add support for V4L2 Flash sub-device DT: aat1290: Document handling external strobe sources leds: max77693: add support for V4L2 Flash sub-device media: Add registration helpers for V4L2 flash sub-devices v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it Documentation: leds: Add description of v4l2-flash sub-device leds: add BCM6358 LED driver leds: add DT binding for BCM6358 LED controller leds: fix brightness changing when software blinking is active Documentation: leds-lp5523: describe master fader attributes leds: lp5523: add master_fader support leds: leds-gpio: Allow compile test if !GPIOLIB leds: leds-gpio: Add missing #include <linux/of.h> gpiolib: Add missing dummies for the unified device properties interface ...
| * leds:lp55xx: fix firmware loading errorMilo Kim2015-06-292-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LP55xx driver uses not firmware file but raw data to load program through the firmware interface.(Documents/leds/leds-lp55xx.txt) For example, here is how to run blinking green channel pattern. (The second engine is seleted and MUX is mapped to 'RGB' mode) echo 2 > /sys/bus/i2c/devices/xxxx/select_engine echo "RGB" > /sys/bus/i2c/devices/xxxx/engine_mux echo 1 > /sys/class/firmware/lp5562/loading echo "4000600040FF6000" > /sys/class/firmware/lp5562/data echo 0 > /sys/class/firmware/lp5562/loading echo 1 > /sys/bus/i2c/devices/xxxx/run_engine However, '/sys/class/firmware/<device name>' is not created after the firmware loader user helper was introduced. This feature is used in the case below. As soon as the firmware download is requested by the driver, firmware class subsystem tries to find the binary file. If it gets failed, then it just falls back to user helper to load raw data manually. Here, you can see the device file under /sys/class/firmware/. To make it happen, LP55xx driver requires two configurations. 1. Enable CONFIG_FW_LOADER_USER_HELPER_FALLBACK in Kconfig 2. Set option, 'FW_OPT_USERHELPER' on requesting the firmware data. It means the second option should be 'false' in request_firmware_nowait(). This option enables to load firmware data manually by calling fw_load_from_user_helper(). Cc: linux-leds@vger.kernel.org Signed-off-by: Milo Kim <milo.kim@ti.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: fix max77693-led build errorsJacek Anaszewski2015-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build errors when LEDS_MAX77693=y and V4L2_FLASH_LED_CLASS=m by restricting LEDS_MAX77693 to =m if V4L2_FLASH_LED_CLASS=m. drivers/leds/leds-max77693.c:1062: undefined reference to `v4l2_flash_release' drivers/leds/leds-max77693.c:1068: undefined reference to `v4l2_flash_release' drivers/built-in.o: In function `max77693_register_led': drivers/leds/leds-max77693.c:968: undefined reference to `v4l2_flash_init' drivers/built-in.o: In function `max77693_led_probe': drivers/leds/leds-max77693.c:1048: undefined reference to `v4l2_flash_release' Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: fix aat1290 build errorsRandy Dunlap2015-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build errors when LEDS_AAT1290=y and V4L2_FLASH_LED_CLASS=m by restricting LEDS_AAT1290 to =m if V4L2_FLASH_LED_CLASS=m. drivers/built-in.o: In function `aat1290_led_remove': leds-aat1290.c:(.text+0xe5d77): undefined reference to `v4l2_flash_release' drivers/built-in.o: In function `aat1290_led_probe': leds-aat1290.c:(.text+0xe6494): undefined reference to `v4l2_flash_init' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Richard Purdie <rpurdie@rpsys.net> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: aat1290: pass flags parameter to devm_gpiod_getUwe Kleine-König2015-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. In this case the driver cannot easily be simplified but as the flags parameter will become mandatory soon this change is necessary beforehand. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: ktd2692: pass flags parameter to devm_gpiod_getUwe Kleine-König2015-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. In this case the driver cannot easily be simplified but as the flags parameter will become mandatory soon this change is necessary beforehand. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * drivers/leds: don't use module_init in non-modular leds-cobalt-raq.cPaul Gortmaker2015-06-221-14/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file is built for a bool Kconfig variable, and hence this code is either present or absent. It currently can never be modular, so using module_init as an alias for __initcall can be somewhat misleading. Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing. Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering. And since it can't be modular, we remove all the __exitcall stuff related to module_exit() -- it is dead code that won't ever be executed. Cc: Richard Purdie <rpurdie@rpsys.net> Cc: linux-leds@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: aat1290: add support for V4L2 Flash sub-deviceJacek Anaszewski2015-06-222-6/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for V4L2 Flash sub-device to the aat1290 LED Flash class driver. The support allows for V4L2 Flash sub-device to take the control of the LED Flash class device. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: max77693: add support for V4L2 Flash sub-deviceJacek Anaszewski2015-06-221-6/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for V4L2 Flash sub-device to the max77693 LED Flash class driver. The support allows for V4L2 Flash sub-device to take the control of the LED Flash class device. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: add BCM6358 LED driverÁlvaro Fernández Rojas2015-05-253-0/+252
| | | | | | | | | | | | | | | | This adds support for the LED controller on Broadcom's BCM6358. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: fix brightness changing when software blinking is activeStas Sergeev2015-05-252-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following sequence: echo timer >/sys/class/leds/<name>/trigger echo 1 >/sys/class/leds/<name>/brightness should change the ON brightness for blinking. The function led_set_brightness() was mistakenly initiating the delayed blink stop procedure, which resulted in no blinking with the timer trigger still active. This patch fixes the problem by changing led_set_brightness() to not initiate the delayed blink stop when brightness is not 0. CC: Richard Purdie <rpurdie@rpsys.net> CC: Kyungmin Park <kyungmin.park@samsung.com> CC: linux-leds@vger.kernel.org CC: linux-kernel@vger.kernel.org Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: lp5523: add master_fader supportToshi Kikuchi2015-05-251-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces 4 new attributes: master_fader_leds master_fader1 master_fader2 master_fader3 Fo example, to map channel 0,6 to master_fader1, map channel 1,7 to master_fader2, map channel 2,8 to master_fader3, and map channel 3,4,5 to none echo "123000123" > master_fader_leds A different factor can be set to each master_fader: echo 255 > master_fader1 echo 100 > master_fader2 echo 0 > master_fader3 Signed-off-by: Toshi Kikuchi <toshik@chromium.org> Acked-by: Milo Kim <milo.kim@ti.com> Tested-by: Milo Kim <milo.kim@ti.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: leds-gpio: Allow compile test if !GPIOLIBGeert Uytterhoeven2015-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency of LEDS_GPIO on GPIOLIB if COMPILE_TEST is enabled. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: leds-gpio: Add missing #include <linux/of.h>Geert Uytterhoeven2015-05-251-0/+1
| | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: Add ktd2692 flash LED driverIngi Kim2015-05-253-0/+453
| | | | | | | | | | | | | | | | | | | | | | This patch adds a driver to support the ktd2692 flash LEDs. ktd2692 can control flash current by ExpressWire interface. Signed-off-by: Ingi Kim <ingi2.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Varka Bhadram <varkabhadram@gmail.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: add BCM6328 LED driverÁlvaro Fernández Rojas2015-05-043-0/+422
| | | | | | | | | | | | | | | | | | This adds support for the LED controller on Broadcom's BCM6328. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jonas Gorski <jogo@openwrt.org> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: Add driver for AAT1290 flash LED controllerJacek Anaszewski2015-05-043-0/+460
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds a driver for the 1.5A Step-Up Current Regulator for Flash LEDs. The device is programmed through a Skyworks proprietary AS2Cwire serial digital interface. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: Add support for max77693 mfd flash cellJacek Anaszewski2015-05-043-0/+991
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds led-flash support to Maxim max77693 chipset. A device can be exposed to user space through LED subsystem sysfs interface. Device supports up to two leds which can work in flash and torch mode. The leds can be triggered externally or by software. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: unify the location of led-trigger APIJacek Anaszewski2015-05-041-24/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Part of led-trigger API was in the private drivers/leds/leds.h header. Move it to the include/linux/leds.h header to unify the API location and announce it as public. It has been already exported from led-triggers.c with EXPORT_SYMBOL_GPL macro. The no-op definitions are changed from macros to inline to match the style of the surrounding code. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: gpio: Fix error handling for led name null pointer caseJacek Anaszewski2015-05-041-2/+4
| | | | | | | | | | | | | | | | | | 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: Jacek Anaszewski <j.anaszewski@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
| * leds: gpio: Fix device teardown on probe deferralSebastian Hesselbarth2015-05-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>