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
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: c971ff185f ("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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
...
A big set this merge window, as we have much going on in
this subsystem. 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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJS3i/MAAoJEEEQszewGV1zVB8P/Rjzgx8To0gQPn49M4u/A1Mk
mAzpUoKa05ILTKBm/bpWPYZPpg9PDqUxOYPsIDEAkc70BKMPTXxrYiE+LSfIzwaJ
a8IRwOzNL7Iwc+zPNS/GrmRJyxymb4lmMD/fypk/YaumZ6j4Hbo+9R8Zct9gbZ5Q
ZbKtz6kLhbkbNCc71bVMgk6yacSBx1ak8Xpd12HlW85NgOCoBj7/DI1Lb61x1ImY
NYpSpmtfGGTkQLtBl5dTLefZOvL1dKSct9TMOsA2jzNqf3zA1YA6XOxPGHK/qtjq
3s9cN1sIVF/g7sm1+qoKXe0OTQrXHT7SX8BH9/tb3MiKO8ItactlQUJlYNR3WFSN
zm1PNe5zWr+GWzV0iUrqoMN4XX8nThiFDOxZpOwBTZcUD6qtDFIZp41M3qxwFTbJ
hCtSQ8gUO1Ce+xtOQYYOwEkRS7FZa1Z+p/lendTFuGDh6DcXy97SrKkTktM4Q98B
LhqrwUzCdES0ecNDi2+P5y4Fc7M0cMMn9SnFvbSBObLB89TF9uzMIn8jUBCZMvrM
eAeZlRBYk8F+6F12higaWqZyiBKIEubXo/Z8T0L2KEDm/z/ddJvhQgBKvWlf3rqi
RToD446rda+RhFBnxLZ3mTui5nZ2WyKTOqhVqeBuriJhE/cTUaQHUBUrbOwx20kE
Xb9mQ2n3GRk2157n1CLY
=lW2i
-----END PGP SIGNATURE-----
Merge tag 'gpio-v3.14-1' of 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
...
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>
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>
Commit c67d0f2926 ("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💯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>
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>
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>
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>
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>
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>
'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>
This enables setting a default trigger on an LP55xx channel,
either from platform data or device tree. This mechanism is
identical to the mechanism for GPIO LEDs and references the
common LEDs device tree bindings.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Milo Kim <milo.kim@ti.com>
Acked-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Pull led updates from Bryan Wu:
"Sorry for the late pull request, since I'm just back from vacation.
LED subsystem updates for 3.12:
- pca9633 driver DT supporting and pca9634 chip supporting
- restore legacy device attributes for lp5521
- other fixing and updates"
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (28 commits)
leds: wm831x-status: Request a REG resource
leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback
leds-pca963x: Fix device tree parsing
leds-pca9633: Rename to leds-pca963x
leds-pca9633: Add mutex to the ledout register
leds-pca9633: Unique naming of the LEDs
leds-pca9633: Add support for PCA9634
leds: lp5562: use LP55xx common macros for device attributes
Documentation: leds-lp5521,lp5523: update device attribute information
leds: lp5523: remove unnecessary writing commands
leds: lp5523: restore legacy device attributes
leds: lp5523: LED MUX configuration on initializing
leds: lp5523: make separate API for loading engine
leds: lp5521: remove unnecessary writing commands
leds: lp5521: restore legacy device attributes
leds: lp55xx: add common macros for device attributes
leds: lp55xx: add common data structure for program
Documentation: leds: Fix a typo
leds: ss4200: Fix incorrect placement of __initdata
leds: clevo-mail: Fix incorrect placement of __initdata
...
Board updates for 3.12. Again, a bit of domain overlap with SoC and DT branches,
but most of this is around legacy code and board support. We've found that
platform maintainers have a hard time separating all of these out and might
move towards fewer branches for next release.
- Removal of a number of Marvell Kirkwood board files, since contents
is now common and mostly configured via DT.
- Device-tree updates for Marvell Dove, including irqchip and clocksource
setup.
- Defconfig updates. Gotta go somewhere. One new one for Renesas Lager.
- New backlight drivers for backlights used on Renesas shmobile platforms.
- Removal of Renesas leds driver.
- Shuffling of some of the new Broadcom platforms to give room for others in
the same mach directory. More in 2.13.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJSKhrfAAoJEIwa5zzehBx3OOAQAJCWhoYaHvWmyAf+xCOQNpX2
YgAngENW04VpHFOyn6BtoGv6+5JypdB2TmK3GHHlVJd1Im5mD1wgm8hAfgyV8lQ4
UeJULdA2HZAstKeTirO65BIyUb5QIrWakF24ccfIfg2xeScM8FV0m8cmzeo3fYAf
DmmeoSCmvTdu/cDWBNlsQZ/as8qCQwyF+5kZg+SMl1btA1Publu2I5lDE02TH46d
sc5mN+ihw0JG62EJV7pov6uVyeFLExoTbrNfQZ4rixmKkMDS/jq5ZbBS5c0i8ULF
s1UMSZtYTcUO9rAPv3+MOIc7fq7nKo9lLuwMrA1HHUEDJ2BEi8DIp99F+ZYm/MSL
WpVxYNwOobPcMJBYGR2fy4GgpIyWB285GgrBUxcq7t0Xi4uBbptwjLhDE4d7LREV
8guW251R+OEVPYcwFctsubnox0MViyC3CQ1FaAAdtTjpSKomlhk/yaxaQ9nGrxls
QCZgXHWm4Ir3QYv8XfOn0X9vdP81EnX11SiwtrRSJ71QMs814nB8NdPDqU4VHsw8
exKmqjq/Lt+F9Kpxn/FevNNuYOdefZNQi00yl3ERchdIGdvRwE/0yA0D69mpwIVr
E41UwvH3g43vazCo2PMdWPWuFlpGMR3iZ4pXnDLH/w33ppfJWfokYwKSRQ/mu/MN
LMjkwoZn1X+fZzNSh9/G
=EGua
-----END PGP SIGNATURE-----
Merge tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board updates from Olof Johansson:
"Board updates for 3.12. Again, a bit of domain overlap with SoC and
DT branches, but most of this is around legacy code and board support.
We've found that platform maintainers have a hard time separating all
of these out and might move towards fewer branches for next release.
- Removal of a number of Marvell Kirkwood board files, since contents
is now common and mostly configured via DT.
- Device-tree updates for Marvell Dove, including irqchip and
clocksource setup.
- Defconfig updates. Gotta go somewhere. One new one for Renesas
Lager.
- New backlight drivers for backlights used on Renesas shmobile
platforms.
- Removal of Renesas leds driver.
- Shuffling of some of the new Broadcom platforms to give room for
others in the same mach directory. More in 3.13"
* tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (67 commits)
mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event
mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion
ARM: bcm: Make secure API call optional
ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers)
ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona
ARM: bcm: Rename board_bcm
mmc: sdhci-bcm-kona: make linker-section warning go away
ARM: tegra: defconfig updates
ARM: dove: add initial DT file for Globalscale D2Plug
ARM: dove: add GPIO IR receiver node to SolidRun CuBox
ARM: dove: add common pinmux functions to DT
ARM: dove: add cpu device tree node
ARM: dove: update dove_defconfig with SI5351, PCI, and xHCI
arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument
ARM: kirkwood: fix DT building and update defconfig
ARM: kirkwood: Remove all remaining trace of DNS-320/325 platform code
ARM: configs: disable DEBUG_LL in bcm_defconfig
ARM: bcm281xx: Board specific reboot code
ARM bcm281xx: Turn on socket & network support.
ARM: bcm281xx: Turn on L2 cache.
...