04 Jan, 2016
1 commit
-
Now the core implements the work queue, remove it from the drivers,
and switch to using brightness_set_blocking op.Signed-off-by: Jacek Anaszewski
Tested-by: Simon Guinot
17 Sep, 2015
1 commit
-
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
Signed-off-by: Jacek Anaszewski
28 Aug, 2015
2 commits
-
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
Signed-off-by: Vincent Donnefort
Signed-off-by: Jacek Anaszewski -
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
Signed-off-by: Jacek Anaszewski
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
26 Jun, 2014
1 commit
-
Use the attribute groups of the led-class to create the sata attribute
during probe in order to avoid racing with userspace.Signed-off-by: Johan Hovold
Signed-off-by: Bryan Wu
28 Feb, 2014
1 commit
-
None of these files are actually using any __init type directives
and hence don't need to include . 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
Cc: Richard Purdie
Cc: linux-leds@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Bryan Wu
23 Oct, 2013
1 commit
-
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat
Signed-off-by: Bryan Wu
27 Aug, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Bryan Wu
21 Jun, 2013
1 commit
-
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by: Jingoo Han
Signed-off-by: Bryan Wu
02 Apr, 2013
2 commits
-
This patch fixes a regression introduced by commit 72052fcc10
("leds: leds-ns2: add device tree binding").When the driver is initialized with device tree data, platform_data
pointer is NULL. This causes a kernel oops at removal.To fix this bug, num_leds is moved into driver_data and platform_data
is not longer used from ns2_led_remove().Signed-off-by: Simon Guinot
Signed-off-by: Bryan Wu -
The devm_gpio_request_one() flags parameter was set to:
GPIOF_DIR_OUT | gpio_get_value(template->cmd)
GPIOF_DIR_OUT and GPIOF_DIR_IN are defined as below:
GPIOF_DIR_OUT (0 << 0)
GPIOF_DIR_IN (1 << 0)So, when 'gpio_get_value(template->cmd)' is 1, the gpio pin can
be set as input, instead of output.To prevent this problem, GPIOF_OUT_INIT flags should be used when
using devm_gpio_request_one().Same goes for 'gpio_get_value(template->slow)' case.
Signed-off-by: Jingoo Han
Signed-off-by: Bryan Wu
16 Dec, 2012
1 commit
-
Pull LED subsystem update from Bryan Wu.
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (47 commits)
leds: leds-lp5521: return an error code on error in probe()
leds: leds-clevo-mail: Use pr_* instead of printks
leds: leds-rb532: Fix checkpatch errors
leds: led-triggers: Fix checkpatch warnings
leds: ledtrig-backlight: Fix checkpatch error
leds: leds-wrap: Use instead of
leds: leds-wm8350: Use dev_err instead of printk
leds: leds-pwm: Fix checkpatch warning
leds: leds-pca955x: Use dev_info instead of printk
leds: leds-net48xx: Use linux/io.h instead of asm/io.h
leds: leds-lt3593: Fix checkpatch warnings
leds: leds-gpio: Use dev_info instead of printk
leds: leds-da903x: Fix checkpatch error and warnings
leds: leds-bd2802: Fix checkpatch warnings
leds: leds-adp5520: Fix checkpatch warnings
leds: led-class: Fix checkpatch warning
leds: leds-ns2: use devm_gpio_request_one
leds: leds-lt3593: use devm_gpio_request_one
leds: leds-gpio: use devm_gpio_request_one
leds: lp3944: Fix return value
...
13 Dec, 2012
1 commit
-
Pull ARM SoC board updates from Olof Johansson:
"This branch contains a set of various board updates for ARM platforms.A few shmobile platforms that are stale have been removed, some
defconfig updates for various boards selecting new features such as
pinctrl subsystem support, and various updates enabling peripherals,
etc."Fix up conflicts mostly as per Olof.
* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (58 commits)
ARM: S3C64XX: Add dummy supplies for Glenfarclas LDOs
ARM: S3C64XX: Add registration of WM2200 Bells device on Cragganmore
ARM: kirkwood: Add Plat'Home OpenBlocks A6 support
ARM: Dove: update defconfig
ARM: Kirkwood: update defconfig for new boards
arm: orion5x: add DT related options in defconfig
arm: orion5x: convert 'LaCie Ethernet Disk mini v2' to Device Tree
arm: orion5x: basic Device Tree support
arm: orion5x: mechanical defconfig update
ARM: kirkwood: Add support for the MPL CEC4
arm: kirkwood: add support for ZyXEL NSA310
ARM: Kirkwood: new board USI Topkick
ARM: kirkwood: use gpio-fan DT binding on lsxl
ARM: Kirkwood: add Netspace boards to defconfig
ARM: kirkwood: DT board setup for Network Space Mini v2
ARM: kirkwood: DT board setup for Network Space Lite v2
ARM: kirkwood: DT board setup for Network Space v2 and parents
leds: leds-ns2: add device tree binding
ARM: Kirkwood: Enable the second I2C bus
ARM: mmp: select pinctrl driver
...
29 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman
28 Nov, 2012
1 commit
-
devm_gpio_request_one is device managed and makes error handling
and cleanup simpler.Cc: Simon Guinot
Signed-off-by: Sachin Kamat
Signed-off-by: Bryan Wu
27 Nov, 2012
2 commits
-
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.Signed-off-by: Jingoo Han
Signed-off-by: Bryan Wu -
Using gpio_request_one can make the code simpler because it can
set the direction and initial value in one shot.Signed-off-by: Jingoo Han
Signed-off-by: Bryan Wu
22 Nov, 2012
1 commit
-
Signed-off-by: Simon Guinot
Reviewed-by: Andrew Lunn
Signed-off-by: Jason Cooper
19 Sep, 2012
1 commit
-
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.This moves such data out of the orion include directories
Signed-off-by: Arnd Bergmann
Acked-by: Mark Brown
Acked-by: Greg Kroah-Hartman
Acked-by: Nicolas Pitre
Acked-by: Mauro Carvalho Chehab
Cc: Jason Cooper
Cc: Andrew Lunn
Cc: Vinod Koul
Cc: Dan Williams
Cc: Bryan Wu
Cc: Richard Purdie
Cc: Chris Ball
Cc: David Woodhouse
Cc: Alan Stern
Cc: Liam Girdwood
Cc: Jaroslav Kysela
Cc: Takashi Iwai
24 Jul, 2012
1 commit
-
Cc: Simon Guinot
Signed-off-by: Bryan Wu
11 May, 2012
1 commit
-
__devexit functions are discarded without CONFIG_HOTPLUG, so they need
to be referenced carefully. A __devexit function may also not be called
from a __devinit function.Signed-off-by: Arnd Bergmann
Signed-off-by: Mathieu Poirier
Cc: Bryan Wu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jan, 2012
1 commit
-
Factor out some boilerplate code for platform driver registration into
module_platform_driver.Signed-off-by: Axel Lin
Acked-by: Haojian Zhuang [led-88pm860x.c]
Acked-by: Mark Brown
Cc: Richard Purdie
Cc: Michael Hennerich
Cc: Mike Rapoport
Cc: Guennadi Liakhovetski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Nov, 2011
1 commit
-
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore. Make sure the modular drivers in the leds
dir are actually calling out for explicitly in advance.Signed-off-by: Paul Gortmaker
08 Oct, 2010
1 commit
-
dev_set_drvdata() can't be used to set the driver private data pointer.
This would overwrite the led classdev object previously registered by
led_classdev_register().Note that despite this mistake, the driver work fine because led_dat and
led_dat->cdev are at the same memory address.Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre
20 Sep, 2010
1 commit
-
This patch replace all the lock functions with the irq safe variant.
The ns2_led_{set,get}_mode() functions must be safe in all context.For example, the trigger timer call led_set_brightness() in a softirq
context.Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre
17 Jul, 2010
1 commit
-
This patch add a LED class driver for the dual-GPIO LEDs found on the
Network Space v2 board (and parents). This include Internet Space v2,
Network Space (Max) v2 and d2 Network v2 boards.This dual-GPIO LED is wired to a CPLD and can blink in relation with the
SATA activity. The driver expose this capability through a "sata" sysfs
attribute.Signed-off-by: Simon Guinot
Signed-off-by: Nicolas Pitre