aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-mc13783.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-07-02leds: mc13783: Fix "uninitialized variable" warningAlexander Shiyan1-1/+1
drivers/leds/leds-mc13783.c: In function 'mc13xxx_led_probe': drivers/leds/leds-mc13783.c:195:2: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-06-20leds: leds-mc13783: Add MC13892 LED supportAlexander Shiyan1-1/+59
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Tested-by: Philippe Retornaz <philippe.retornaz@epfl.ch> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-06-20leds: leds-mc13783: Prepare driver to support MC13892 LEDsAlexander Shiyan1-250/+156
This patch rewrite driver code to be ready to add support for MC13892 LEDs and probe from devicetree. (cooloney@gmail.com: fix one coding style issue when apply this patch) Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Tested-by: Philippe Retornaz <philippe.retornaz@epfl.ch> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-06-20leds: leds-mc13783: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
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 <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2012-11-28leds: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28leds: remove use of __devinitBill Pemberton1-3/+3
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28leds: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-24leds: convert Freescale MC13783 LED driver to devm_kzalloc() and cleanup error exit pathBryan Wu1-5/+3
Cc: Philippe Retornaz <philippe.retornaz@epfl.ch> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-07-24leds-mc13783: set platform data to NULL at mc13783_led_removeDevendra Naga1-0/+1
the platform_set_drvdata (pdev, NULL) to be set at the remove of the driver, as we have set the platform data to led at probe. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-05-29leds: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer1-1/+1
The advantage of kcalloc is that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Cc: Bryan Wu <bryan.wu@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10drivers/leds/leds-mc13783.c: fix off-by-one for checking num_ledsAxel Lin1-1/+1
The LED id begins from 0. Thus the maximum number of leds should be MC13783_LED_MAX + 1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Philippe Retornaz <philippe.retornaz@epfl.ch> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10leds: convert led platform drivers to module_platform_driverAxel Lin1-11/+1
Factor out some boilerplate code for platform driver registration into module_platform_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Haojian Zhuang <hzhuang1@marvell.com> [led-88pm860x.c] Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Cc: Mike Rapoport <mike@compulab.co.il> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-24leds: Finish mc13783 conversion to the mc13xxx APISamuel Ortiz1-4/+4
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-10-24leds: Convert mc13783 driver to mc13xxx MFDDavid Jander1-26/+26
mc13xxx is the more general API and most of the mc13783_... functions are going to die. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26mfd: Use mfd cell platform_data for mc13xxx cells platform bitsSamuel Ortiz1-4/+3
With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-04-26Merge branch 'master' into for-nextJiri Kosina1-3/+4
Fast-forwarded to current state of Linus' tree as there are patches to be applied for files that didn't exist on the old branch.
2011-04-10treewide: remove extra semicolonsJustin P. Mattock1-1/+1
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-23mfd: mfd_cell is now implicitly available to mc13xxx driversAndres Salomon1-3/+4
The cell's platform_data is now accessed with a helper function; change clients to use that, and remove the now-unused data_size. Note that mfd-core no longer makes a copy of platform_data, but the mc13xxx-core driver creates the pdata structures on the stack. In order to get around that, the various ARM mach types that set the pdata have been changed to hold the variable in static (global) memory. Also note that __initdata references in aforementioned pdata structs have been dropped. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-26leds: Add mc13783 LED supportPhilippe Rétornaz1-0/+403
This add basic led support for Freescale MC13783 PMIC. Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>