[PATCH 1/5] lp8788-buck: fix a parent deivce in _probe()

2013-01-02 Thread Kim, Milo
The lp8788-buck is a platform driver of lp8788-mfd. The platform device is allocated when mfd_add_devices() is called in lp8788-mfd. On the other hand, 'lp->dev' is the i2c client device. Therefore, this 'platform_device' is a proper parent device in case of resource managed mem alloc,

[PATCH 1/2] lp8788-charger: fix a parent device in _probe()

2013-01-02 Thread Kim, Milo
The lp8788-charger is a platform driver of lp8788-mfd. The platform device is allocated when mfd_add_devices() is called in lp8788-mfd. On the other hand, 'lp->dev' is the i2c client device. Therefore, this 'platform_device' is a proper parent device in case of resource managed mem alloc

[PATCH 2/2] lp8788-charger: fix a parent device in kernel messages

2013-01-02 Thread Kim, Milo
Use 'platform_device' in kernel messages rather than i2c client device node. lp8788_update_charger_params() needs additional argument, 'pdev'. Then, remove unnecessary lp8788 private data in lp8788_irq_register(). Signed-off-by: Milo(Woogyom) Kim --- drivers/power/lp8788-charger.c | 12

[PATCH 2/2] iio: lp8788_adc: fix parent device in kernel message

2013-01-02 Thread Kim, Milo
Use 'dev' of iio device in a kernel message rather than i2c client device node. Signed-off-by: Milo(Woogyom) Kim --- drivers/iio/adc/lp8788_adc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/lp8788_adc.c b/drivers/iio/adc/lp8788_adc.c index

[PATCH 1/2] iio: lp8788_adc: fix a parent device in _probe()

2013-01-02 Thread Kim, Milo
The lp8788-adc is a platform driver of lp8788-mfd. The platform device is allocated when mfd_add_devices() is called in lp8788-mfd. On the other hand, 'lp->dev' is the i2c client device. Therefore, this 'platform_device' is a proper parent device of iio device and device kernel message.

[PATCH] leds-lp8788: fix a parent device in _probe()

2013-01-02 Thread Kim, Milo
The lp8788-keyled is a platform driver of lp8788-mfd. The platform device is allocated when mfd_add_devices() is called in lp8788-mfd. On the other hand, 'lp->dev' is the i2c client device. Therefore, this 'platform_device' is a proper parent device in case of resource managed mem alloc,

[PATCH] leds-lp8788: fix a parent device in _probe()

2013-01-02 Thread Kim, Milo
, registering led device and device kernel messages. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp8788.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-lp8788.c b/drivers/leds/leds-lp8788.c index 4353942..7c2cb38 100644

[PATCH 1/2] iio: lp8788_adc: fix a parent device in _probe()

2013-01-02 Thread Kim, Milo
. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/iio/adc/lp8788_adc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/lp8788_adc.c b/drivers/iio/adc/lp8788_adc.c index 72955e4..4c9b0f7 100644 --- a/drivers/iio/adc/lp8788_adc.c +++ b/drivers/iio

[PATCH 2/2] iio: lp8788_adc: fix parent device in kernel message

2013-01-02 Thread Kim, Milo
Use 'dev' of iio device in a kernel message rather than i2c client device node. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/iio/adc/lp8788_adc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/lp8788_adc.c b/drivers/iio/adc/lp8788_adc.c

[PATCH 2/2] lp8788-charger: fix a parent device in kernel messages

2013-01-02 Thread Kim, Milo
Use 'platform_device' in kernel messages rather than i2c client device node. lp8788_update_charger_params() needs additional argument, 'pdev'. Then, remove unnecessary lp8788 private data in lp8788_irq_register(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/power/lp8788

[PATCH 1/2] lp8788-charger: fix a parent device in _probe()

2013-01-02 Thread Kim, Milo
and device kernel message. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/power/lp8788-charger.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/power/lp8788-charger.c b/drivers/power/lp8788-charger.c index 22b6407..126a83a 100644 --- a/drivers/power

[PATCH 1/5] lp8788-buck: fix a parent deivce in _probe()

2013-01-02 Thread Kim, Milo
, registering a regulator and device kernel message. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/regulator/lp8788-buck.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index aef3f2b..4916a55

[PATCH 2/5] lp8788-buck: fix a parent device on devm_gpio_request()

2013-01-02 Thread Kim, Milo
Use 'platform_device' rather than i2c client device node. Arguments are added in lp8788_init_dvs() and lp8788_dvs_gpio_request(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/regulator/lp8788-buck.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff

[PATCH 3/5] lp8788-buck: fix a for-loop coding style

2013-01-02 Thread Kim, Milo
Remove space before semicolon in for-loop. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/regulator/lp8788-buck.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index 98770e8..1161949 100644

[PATCH 4/5] lp8788-ldo: fix a parent device in _probe()

2013-01-02 Thread Kim, Milo
, registering regulators and device kernel messages. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/regulator/lp8788-ldo.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c index 3792741..40403e9

[PATCH 5/5] lp8788-ldo: fix a parent device on devm_gpio_request()

2013-01-02 Thread Kim, Milo
Use 'platform_device' rather than i2c client device node. Argument is added in lp8788_config_ldo_enable_mode(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/regulator/lp8788-ldo.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH v4] rtc: add new lp8788 rtc driver

2013-01-01 Thread Kim, Milo
TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight driver and current sinks. This patch enables LP8788 rtc module. Patch v4. when alarm IRQ number is not specified, RTC_AIE_ON ioctl returns as -EIO remove unnecessary platform data check routine fix wrong parent device

[PATCH v4] rtc: add new lp8788 rtc driver

2013-01-01 Thread Kim, Milo
() with module_platform_driver() clean up code for _probe() and _remove() Patch v1. initial patch Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/rtc/Kconfig |6 + drivers/rtc/Makefile |1 + drivers/rtc/rtc-lp8788.c | 344 ++ 3 files changed, 351

RE: [PATCH v3 1/2] rtc: add new lp8788 rtc driver

2012-12-21 Thread Kim, Milo
Hi Devendra, > > +static int lp8788_alarm_irq_enable(struct device *dev, unsigned int > enable) > > +{ > > + struct lp8788_rtc *rtc = dev_get_drvdata(dev); > > + struct lp8788 *lp = rtc->lp; > > + u8 mask, shift; > > + > > + mask = mask_alarm_en[rtc->alarm]; > > +

RE: [PATCH v3 1/2] rtc: add new lp8788 rtc driver

2012-12-21 Thread Kim, Milo
Hi Devendra, +static int lp8788_alarm_irq_enable(struct device *dev, unsigned int enable) +{ + struct lp8788_rtc *rtc = dev_get_drvdata(dev); + struct lp8788 *lp = rtc-lp; + u8 mask, shift; + + mask = mask_alarm_en[rtc-alarm]; + shift =

[PATCH v3 1/2] rtc: add new lp8788 rtc driver

2012-12-20 Thread Kim, Milo
TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight driver and current sinks. This patch enables LP8788 RTC module. Patch v3. remove __devinit and __devexit. add weekday definition and comments. Patch v2. use IRQ domain for handling alarm IRQ. replace module_init() and

[PATCH v2 2/2] backlight: add new lp8788 backlight driver

2012-12-20 Thread Kim, Milo
TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight driver and current sinks. This patch enables LP8788 backlight module. (Brightness mode) The brightness is controlled by PWM input or I2C register. All modes are supported in the driver. (Platform data) Configurable data can

RE: [PATCH 00/33] leds: cleanup LP5521/5523 LED driver

2012-12-20 Thread Kim, Milo
> Hi Kim > > This patchset looks good, but I need some time to review it more > carefully especially during this merge window + holiday time. OK, thanks for the reply. Please let me know if any problem in the git tree. Happy holidays! Best Regards, Milo -- To unsubscribe from this list: send

RE: [PATCH 00/33] leds: cleanup LP5521/5523 LED driver

2012-12-20 Thread Kim, Milo
Hi Kim This patchset looks good, but I need some time to review it more carefully especially during this merge window + holiday time. OK, thanks for the reply. Please let me know if any problem in the git tree. Happy holidays! Best Regards, Milo -- To unsubscribe from this list: send the

[PATCH v2 2/2] backlight: add new lp8788 backlight driver

2012-12-20 Thread Kim, Milo
Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/video/backlight/Kconfig |6 + drivers/video/backlight/Makefile|1 + drivers/video/backlight/lp8788_bl.c | 350 +++ include/linux/mfd/lp8788.h | 16 +- 4 files changed, 360

[PATCH v3 1/2] rtc: add new lp8788 rtc driver

2012-12-20 Thread Kim, Milo
() and module_exit() with module_platform_driver(). clean up code for _probe() and _remove(). Patch v1. initial patch Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/rtc/Kconfig |6 + drivers/rtc/Makefile |1 + drivers/rtc/rtc-lp8788.c | 345

[PATCH] mfd: lp8788: fix config dependency problem on IRQ

2012-12-14 Thread Kim, Milo
LP8788 uses IRQ APIs which depend on GENERIC_HARDIRQS. So this dependency should be added in Kconfig. This error occurs in case of doing 'make ARCH=s390 allyesconfig'. This patch enables building lp8788 mfd driver only when GENERIC_HARDIRQS are configured. All error/warnings:

[PATCH] mfd: lp8788: fix config dependency problem on IRQ

2012-12-14 Thread Kim, Milo
] drivers/mfd/lp8788-irq.c:171:15: warning: assignment makes pointer from integer without a cast [enabled by default] cc1: some warnings being treated as errors Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/mfd/Kconfig |2 +- 1

[PATCH 11/33] leds-lp55xx: use lp55xx common deinit function

2012-12-12 Thread Kim, Milo
Two separate de-init functions are merged into one common function. And it is used in err_post_init of lp55xx_init_device(). Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c| 16 drivers/leds/leds-lp5523.c| 16

[PATCH 17/33] leds-lp55xx: fix error condition in lp55xx_register_leds()

2012-12-12 Thread Kim, Milo
Use lp55xx_unregister_leds() rather than duplicate code. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp55xx-common.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index

[PATCH 19/33] leds-lp55xx: support firmware interface

2012-12-12 Thread Kim, Milo
This patch provides additional device attributes which enable loading the firmware. ('select_engine' and 'run_engine') To run a LED pattern, two parts of driver should be enabled. Common features : lp55xx-common === Firmware interface for loading LED patterns

[PATCH 15/33] leds-lp55xx: provide common LED current setting

2012-12-12 Thread Kim, Milo
LED current is configurable via the sysfs. Max current is a read-only attribute. These attributes code can be shared in lp55xx common driver. show_max_current() => lp55xx_show_max_current() show_current() => lp55xx_show_current() store_current() => lp55xx_store_current() Current

[PATCH 30/33] leds-lp5521/5523: use new lp55xx common header

2012-12-12 Thread Kim, Milo
The LP55xx common driver provides a new header, leds-lp55xx.h. This driver enables removing duplicate code for both drivers and making coherent driver structure. LP5521 and LP5523/55231 platform data were merged into one common file. Therefore, the LP5521/5523 platform code need to be fixed.

[PATCH 31/33] leds-lp5521/5523: add author and copyright description

2012-12-12 Thread Kim, Milo
Now LP5521 and LP5523 drivers are based on new lp55xx structure. So the author and copyrights are updated. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c |3 +++ drivers/leds/leds-lp5523.c |3 +++ 2 files changed, 6 insertions(+) diff --git

[PATCH 21/33] leds-lp55xx: support device specific attibutes

2012-12-12 Thread Kim, Milo
To support device specific attributes, new common driver function is added. Eventually those are created on registering the sysfs with common dev attrs. Furthermore, this patch makes adding device attributes simple in each driver. Signed-off-by: Milo(Woogyom) Kim ---

[PATCH 28/33] leds-lp55xx: clean up headers

2012-12-12 Thread Kim, Milo
Remove unused headers and sort them alphabetically Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 19 ++- drivers/leds/leds-lp5523.c | 19 ++- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/drivers/leds/leds-lp5521.c

[PATCH 23/33] leds-lp55xx: code refactoring on selftest function

2012-12-12 Thread Kim, Milo
LP5521 and LP5523 have a selftest function which is run via the sysfs. Use lp55xx driver data and r/w functions rather than lp5521/5523 private data and functions. Additionally, if-statements are changed for code simplicity. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c |

[PATCH 29/33] leds-lp5521: recovers previous driver patch for return value

2012-12-12 Thread Kim, Milo
During the cleanup, Dan Carpenter's patch was removed. This patch recovers his patch based on the latest lp5521 driver. [PATCH] leds: leds-lp5521: return an error code on error in probe() If "buf" wasn't equal to LP5521_REG_R_CURR_DEFAULT the probe fails but we still return zero. I've

[PATCH 33/33] Documentation: leds: update LP55xx family devices

2012-12-12 Thread Kim, Milo
Update changed platform data information. Add leds-lp55xx.txt which includes the firmware interface description. Signed-off-by: Milo(Woogyom) Kim --- Documentation/leds/00-INDEX|2 + Documentation/leds/leds-lp5521.txt | 63 +++- Documentation/leds/leds-lp5523.txt

[PATCH 27/33] leds-lp55xx: clean up definitions

2012-12-12 Thread Kim, Milo
Remove unused definitions and change hex values to capital letters Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 26 +++- drivers/leds/leds-lp5523.c | 56 +++- 2 files changed, 12 insertions(+), 70 deletions(-)

[PATCH 32/33] leds-lp55xx: fix problem on removing LED attributes

2012-12-12 Thread Kim, Milo
LP55XX common device attributes, 'led_current' and 'max_current' are created while loading the driver. Those are LED device attributes which are removed automatically on releasing led class devices - led_classdev_unregister(). Therefore, this duplicate code should be removed. Signed-off-by:

[PATCH 24/33] leds-lp55xx: add unregister dev attr function

2012-12-12 Thread Kim, Milo
lp55xx_unregister_sysfs() is used for removing lp55xx device attributes. Chip specific and engine attributes are removed on unloading the driver. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp55xx-common.c | 12 drivers/leds/leds-lp55xx-common.h |1 + 2 files

[PATCH 25/33] leds-lp55xx: clean up _remove()

2012-12-12 Thread Kim, Milo
Replaced lp5521_unregister_sysfs() and lp5523_unregister_sysfs() with lp55xx_unregister_sysfs(). On unloading the driver, running LED pattern should be stopped. Use explicit driver functions rather than old functions and direct access code. Signed-off-by: Milo(Woogyom) Kim ---

[PATCH 26/33] leds-lp55xx: clean up unused data and functions

2012-12-12 Thread Kim, Milo
Old data structures and I2C functions are not used any more. Each driver uses the lp55xx common data and functions. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 110 drivers/leds/leds-lp5523.c | 35 -- 2 files

[PATCH 20/33] leds-lp55xx: use generic firmware interface

2012-12-12 Thread Kim, Milo
LP55xx common driver provides generic firmware interface for running a LED pattern. LP5521 and LP5523 have many device attributes for running patterns. This patch cleans up those complex code. Removed device attributes for LP5521 engine1_mode engine2_mode engine3_mode engine1_load

[PATCH 22/33] leds-lp55xx: use common driver function for adding attributes

2012-12-12 Thread Kim, Milo
Use lp55xx_register_sysfs() rather than lp5521_register_sysfs() and lp5523_register_sysfs(). Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 17 +++-- drivers/leds/leds-lp5523.c | 23 +++ 2 files changed, 14 insertions(+), 26 deletions(-)

[PATCH 14/33] leds-lp55xx: use lp55xx_set_brightness() for brightness control

2012-12-12 Thread Kim, Milo
lp5521_set_brightness() and lp5523_set_brightness() are replaced with common lp55xx_set_brightness(). This common function is invoked when the brightness of each LED channel is updated. LP5521 and LP5523 have different register address for the brightness control, so this work is done by chip

[PATCH 16/33] leds-lp55xx: use lp55xx_unregister_leds()

2012-12-12 Thread Kim, Milo
To unregister led class devices and sysfs attributes, LP5521 and LP5523 have each driver function. This patch makes both drivers simple using common driver function, lp55xx_unregister_leds(). And some unused variables are removed. Signed-off-by: Milo(Woogyom) Kim ---

[PATCH 18/33] leds-lp55xx: add new lp55xx_register_sysfs() for FW interface

2012-12-12 Thread Kim, Milo
LP55xx family chips have internal program memory which run various patterns. Using this memory, LEDs continue on blinking/dimming without continuous I2C commands. That means the I2C HOST can be entered into sleep once the memory is updated. An application can get hex data from a file and

[PATCH 13/33] leds-lp55xx: use lp55xx_init_led() common function

2012-12-12 Thread Kim, Milo
lp5521_init_led() and lp5523_init_led() are replaced with one common function, lp55xx_init_led(). Max channels is configurable, so it's used in lp55xx_init_led(). 'LP5523_LEDS' are changed to 'LP5523_MAX_LEDS'. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c| 50

[PATCH 12/33] leds-lp55xx: use lp55xx common led registration function

2012-12-12 Thread Kim, Milo
LED class devices are registered in lp5521_register_leds() and lp5523_register_leds(). Two separate functions are merged into consolidated lp55xx function, lp55xx_register_leds(). Error handling fix: When LED registration failure occurs, device should be de-initialized rather than

[PATCH 09/33] leds-lp55xx: use common lp55xx data structure in _probe()

2012-12-12 Thread Kim, Milo
LP5521 and LP5523 data structures have common features. Use common lp55xx data structures rather than chip specific data. lp55xx_chip : Common data between lp5521_chip and lp5523_chip lp55xx_led : Common LED structure bettwen lp5521_led and lp5523_led lp55xx_platform_data

[PATCH 10/33] leds-lp55xx: use lp55xx common init function in _probe()

2012-12-12 Thread Kim, Milo
LP5521 and LP5523 driver have separate device init function, but they can be merged into one common init function. Driver specific functions are replaced with consolidated functions. lp5521/lp5523_init_device() => lp55xx_init_device() lp5521/lp5523_reset_device() =>

[PATCH 07/33] leds-lp55xx: add new common driver for lp5521/5523

2012-12-12 Thread Kim, Milo
This patch supports basic common driver code for LP5521, LP5523/55231 devices. ( Driver Structure Data ) lp55xx_led and lp55xx_chip In lp55xx common driver, two different data structure is used. o lp55xx_led control multi output LED channels such as led current, channel index. o

[PATCH 08/33] leds-lp55xx: replace name of data structure

2012-12-12 Thread Kim, Milo
Change name of chip data structure and platform data. This patch is a preceding step for cleaning up lp5521/5523 probe and remove. These data will be replaced with new lp55xx common data structures in next patch. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 36

[PATCH 05/33] leds-lp55xx: add device reset function in lp5521/5523

2012-12-12 Thread Kim, Milo
Use explicit each driver function rather than raw command. These function will be merged into the lp55xx common driver. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 10 +- drivers/leds/leds-lp5523.c | 10 +- 2 files changed, 18 insertions(+), 2

[PATCH 06/33] leds-lp55xx: do chip specific configuration on device init

2012-12-12 Thread Kim, Milo
Chip specific function is configured during the device initialization. So _configure() is moved to each device init function. If chip configuration gets failed, the device is de-initialized in each _init_device(), not probe(). Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c

[PATCH 02/33] leds-lp55xx: cleanup deinit_device() in lp5521/5523

2012-12-12 Thread Kim, Milo
Device de-initialization code is moved to _deinit_device() at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 20 drivers/leds/leds-lp5523.c | 20

[PATCH 04/33] leds-lp55xx: cleanup deinit leds in lp5521/5523

2012-12-12 Thread Kim, Milo
To make LED unregistration code simple, new function, _unregister_leds() is added at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 23 +-- drivers/leds/leds-lp5523.c |

[PATCH 03/33] leds-lp55xx: cleanup init leds in lp5521/5523

2012-12-12 Thread Kim, Milo
To make LED initialization code simple, new function, _register_leds() is added at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 69 +

[PATCH 01/33] leds-lp55xx: cleanup init_device() in lp5521/5523

2012-12-12 Thread Kim, Milo
To make _probe() simple, device initialization code is moved to _init_device() at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim --- drivers/leds/leds-lp5521.c | 102

[PATCH 00/33] leds: cleanup LP5521/5523 LED driver

2012-12-12 Thread Kim, Milo
LP5521, LP5523 and L55231 have common features as below. Register access via the I2C. Device initialization/de-initialization. Create LED class devices for multiple output channels. Device attributes for user-space interface. Therefore, this patch-set removes duplicate code for LP5521/5523

[PATCH 00/33] leds: cleanup LP5521/5523 LED driver

2012-12-12 Thread Kim, Milo
LP5521, LP5523 and L55231 have common features as below. Register access via the I2C. Device initialization/de-initialization. Create LED class devices for multiple output channels. Device attributes for user-space interface. Therefore, this patch-set removes duplicate code for LP5521/5523

[PATCH 01/33] leds-lp55xx: cleanup init_device() in lp5521/5523

2012-12-12 Thread Kim, Milo
To make _probe() simple, device initialization code is moved to _init_device() at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 102

[PATCH 02/33] leds-lp55xx: cleanup deinit_device() in lp5521/5523

2012-12-12 Thread Kim, Milo
Device de-initialization code is moved to _deinit_device() at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 20 drivers/leds/leds-lp5523.c | 20

[PATCH 04/33] leds-lp55xx: cleanup deinit leds in lp5521/5523

2012-12-12 Thread Kim, Milo
To make LED unregistration code simple, new function, _unregister_leds() is added at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 23 +-- drivers/leds

[PATCH 05/33] leds-lp55xx: add device reset function in lp5521/5523

2012-12-12 Thread Kim, Milo
Use explicit each driver function rather than raw command. These function will be merged into the lp55xx common driver. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 10 +- drivers/leds/leds-lp5523.c | 10 +- 2 files changed, 18

[PATCH 06/33] leds-lp55xx: do chip specific configuration on device init

2012-12-12 Thread Kim, Milo
Chip specific function is configured during the device initialization. So _configure() is moved to each device init function. If chip configuration gets failed, the device is de-initialized in each _init_device(), not probe(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers

[PATCH 03/33] leds-lp55xx: cleanup init leds in lp5521/5523

2012-12-12 Thread Kim, Milo
To make LED initialization code simple, new function, _register_leds() is added at each driver. This patch is a preceding step for lp55xx common driver architecture. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 69

[PATCH 07/33] leds-lp55xx: add new common driver for lp5521/5523

2012-12-12 Thread Kim, Milo
platform data structure. The lp55xx platform data is declared in the header. This structure is derived from leds-lp5521.h and leds-lp5523.h Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/Kconfig | 14 - drivers/leds/Makefile |1

[PATCH 08/33] leds-lp55xx: replace name of data structure

2012-12-12 Thread Kim, Milo
Change name of chip data structure and platform data. This patch is a preceding step for cleaning up lp5521/5523 probe and remove. These data will be replaced with new lp55xx common data structures in next patch. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c

[PATCH 09/33] leds-lp55xx: use common lp55xx data structure in _probe()

2012-12-12 Thread Kim, Milo
: Common platform data between lp5521_platform_data and lp5523_platform_data Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 34 +- drivers/leds/leds-lp5523.c | 34 +- 2

[PATCH 13/33] leds-lp55xx: use lp55xx_init_led() common function

2012-12-12 Thread Kim, Milo
lp5521_init_led() and lp5523_init_led() are replaced with one common function, lp55xx_init_led(). Max channels is configurable, so it's used in lp55xx_init_led(). 'LP5523_LEDS' are changed to 'LP5523_MAX_LEDS'. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c

[PATCH 10/33] leds-lp55xx: use lp55xx common init function in _probe()

2012-12-12 Thread Kim, Milo
-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c| 175 - drivers/leds/leds-lp5523.c| 159 + drivers/leds/leds-lp55xx-common.c | 107 +++ drivers/leds/leds-lp55xx-common.h

[PATCH 12/33] leds-lp55xx: use lp55xx common led registration function

2012-12-12 Thread Kim, Milo
unregistering LEDs. This patch is not complete one because LED registration needs additional patches. Please refer next patches. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c| 44 +++-- drivers/leds/leds-lp5523.c| 46

[PATCH 14/33] leds-lp55xx: use lp55xx_set_brightness() for brightness control

2012-12-12 Thread Kim, Milo
specific brightness_work_fn(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c| 19 --- drivers/leds/leds-lp5523.c| 23 --- drivers/leds/leds-lp55xx-common.c |9 + drivers/leds/leds-lp55xx-common.h

[PATCH 16/33] leds-lp55xx: use lp55xx_unregister_leds()

2012-12-12 Thread Kim, Milo
To unregister led class devices and sysfs attributes, LP5521 and LP5523 have each driver function. This patch makes both drivers simple using common driver function, lp55xx_unregister_leds(). And some unused variables are removed. Signed-off-by: Milo(Woogyom) Kim milo@ti.com

[PATCH 20/33] leds-lp55xx: use generic firmware interface

2012-12-12 Thread Kim, Milo
, 'firmware_cb' and 'run_engine'. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 414 ++-- drivers/leds/leds-lp5523.c | 505 +--- 2 files changed, 315 insertions(+), 604 deletions(-) diff --git

[PATCH 22/33] leds-lp55xx: use common driver function for adding attributes

2012-12-12 Thread Kim, Milo
Use lp55xx_register_sysfs() rather than lp5521_register_sysfs() and lp5523_register_sysfs(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 17 +++-- drivers/leds/leds-lp5523.c | 23 +++ 2 files changed, 14 insertions

[PATCH 24/33] leds-lp55xx: add unregister dev attr function

2012-12-12 Thread Kim, Milo
lp55xx_unregister_sysfs() is used for removing lp55xx device attributes. Chip specific and engine attributes are removed on unloading the driver. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp55xx-common.c | 12 drivers/leds/leds-lp55xx-common.h |1

[PATCH 25/33] leds-lp55xx: clean up _remove()

2012-12-12 Thread Kim, Milo
Replaced lp5521_unregister_sysfs() and lp5523_unregister_sysfs() with lp55xx_unregister_sysfs(). On unloading the driver, running LED pattern should be stopped. Use explicit driver functions rather than old functions and direct access code. Signed-off-by: Milo(Woogyom) Kim milo@ti.com

[PATCH 26/33] leds-lp55xx: clean up unused data and functions

2012-12-12 Thread Kim, Milo
Old data structures and I2C functions are not used any more. Each driver uses the lp55xx common data and functions. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 110 drivers/leds/leds-lp5523.c | 35

[PATCH 27/33] leds-lp55xx: clean up definitions

2012-12-12 Thread Kim, Milo
Remove unused definitions and change hex values to capital letters Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 26 +++- drivers/leds/leds-lp5523.c | 56 +++- 2 files changed, 12 insertions(+), 70

[PATCH 18/33] leds-lp55xx: add new lp55xx_register_sysfs() for FW interface

2012-12-12 Thread Kim, Milo
and write them into the program memory through the I2C. This is general firwmare interface. This patch is the initial step for adding the firmware interface. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp55xx-common.c | 16 drivers/leds/leds-lp55xx

[PATCH 33/33] Documentation: leds: update LP55xx family devices

2012-12-12 Thread Kim, Milo
Update changed platform data information. Add leds-lp55xx.txt which includes the firmware interface description. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- Documentation/leds/00-INDEX|2 + Documentation/leds/leds-lp5521.txt | 63 +++- Documentation/leds

[PATCH 32/33] leds-lp55xx: fix problem on removing LED attributes

2012-12-12 Thread Kim, Milo
-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp55xx-common.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index c0c66ec..850303e 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds

[PATCH 23/33] leds-lp55xx: code refactoring on selftest function

2012-12-12 Thread Kim, Milo
LP5521 and LP5523 have a selftest function which is run via the sysfs. Use lp55xx driver data and r/w functions rather than lp5521/5523 private data and functions. Additionally, if-statements are changed for code simplicity. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds

[PATCH 29/33] leds-lp5521: recovers previous driver patch for return value

2012-12-12 Thread Kim, Milo
changed it to print an error message and return -EINVAL. Cc: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds

[PATCH 28/33] leds-lp55xx: clean up headers

2012-12-12 Thread Kim, Milo
Remove unused headers and sort them alphabetically Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c | 19 ++- drivers/leds/leds-lp5523.c | 19 ++- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/drivers/leds

[PATCH 30/33] leds-lp5521/5523: use new lp55xx common header

2012-12-12 Thread Kim, Milo
. This patch has been already acked. For ux500 Acked-by: Linus Walleij linus.wall...@linaro.org For omap Acked-by: Tony Lindgren t...@atomide.com Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- arch/arm/mach-omap2/board-rx51-peripherals.c |8 +-- arch/arm/mach-ux500/board-mop500.c

[PATCH 31/33] leds-lp5521/5523: add author and copyright description

2012-12-12 Thread Kim, Milo
Now LP5521 and LP5523 drivers are based on new lp55xx structure. So the author and copyrights are updated. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c |3 +++ drivers/leds/leds-lp5523.c |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers

[PATCH 21/33] leds-lp55xx: support device specific attibutes

2012-12-12 Thread Kim, Milo
To support device specific attributes, new common driver function is added. Eventually those are created on registering the sysfs with common dev attrs. Furthermore, this patch makes adding device attributes simple in each driver. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers

[PATCH 15/33] leds-lp55xx: provide common LED current setting

2012-12-12 Thread Kim, Milo
registers are device specific, so configurable function is added in each driver. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c| 77 - drivers/leds/leds-lp5523.c| 72 -- drivers

[PATCH 19/33] leds-lp55xx: support firmware interface

2012-12-12 Thread Kim, Milo
== o Firmware callback load selected engine and update program memory o Run engine change the engine mode o 'engine_idx' and firmware data, 'fw' Those are used in the driver internally with callback functions Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/Kconfig

[PATCH 17/33] leds-lp55xx: fix error condition in lp55xx_register_leds()

2012-12-12 Thread Kim, Milo
Use lp55xx_unregister_leds() rather than duplicate code. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp55xx-common.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c

[PATCH 11/33] leds-lp55xx: use lp55xx common deinit function

2012-12-12 Thread Kim, Milo
Two separate de-init functions are merged into one common function. And it is used in err_post_init of lp55xx_init_device(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/leds/leds-lp5521.c| 16 drivers/leds/leds-lp5523.c| 16

[PATCH 4/4] MAINTAINERS: add LP8788 MFD driver entry

2012-12-09 Thread Kim, Milo
Cc: Anton Vorontsov Cc: Bryan Wu Cc: Jonathan Cameron Cc: Mark Brown Cc: Samuel Ortiz Signed-off-by: Milo(Woogyom) Kim --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ee7e9ee..9339a4b 100644 --- a/MAINTAINERS +++

[PATCH 2/4] MAINTAINERS: add LP8727 charger driver entry

2012-12-09 Thread Kim, Milo
Cc: Anton Vorontsov Cc: David Woodhouse Signed-off-by: Milo(Woogyom) Kim --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 92fa7e5..a5aedda 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7558,6 +7558,12 @@ F:

[PATCH 3/4] MAINTAINERS: add LP872x regulator driver entry

2012-12-09 Thread Kim, Milo
Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Milo(Woogyom) Kim --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a5aedda..ee7e9ee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7564,6 +7564,12 @@ S: Maintained F:

[PATCH 1/4] MAINTAINERS: add LP855x backlight driver entry

2012-12-09 Thread Kim, Milo
Cc: Andrew Morton Cc: Richard Purdie Signed-off-by: Milo(Woogyom) Kim --- MAINTAINERS |7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8110ccd..92fa7e5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7551,6 +7551,13 @@ S: Maintained F:

<    1   2   3   4   5   6   7   8   >