History log of /drivers/video/backlight/adp8860_bl.c
Revision Date Author Comments
5e548f0f55a9f8165a3f36226ac5d3f42a05cf47 27-Aug-2014 Jingoo Han <jg1.han@samsung.com> backlight: adp8860: Add blank line after declarations

Fixed the following checkpatch warning.

WARNING: Missing a blank line after declarations

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
ba464d0c88af59ccd35929eff010747de0fb0dec 03-Apr-2014 Jingoo Han <jg1.han@samsung.com> backlight: adp8860: remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they duplicate
the MM subsystem generic OOM message.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
91fa4ee8f4c77e7ab87a42d795d6589ef3478094 13-Nov-2013 Jingoo Han <jg1.han@samsung.com> backlight: adp8860: use devm_backlight_device_register()

Use devm_backlight_device_register() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
c512794cada491e008eeca822af7e4ad5db72a56 13-Nov-2013 Jingoo Han <jg1.han@samsung.com> backlight: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change to
make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
84eba9ed709198cda09c14a16c499a45d88a63ea 30-Apr-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn> drivers/video/backlight/adp8860_bl.c: fix error return code in adp8860_led_probe()

Fix to return a negative error code from the error handling case instead
of zero, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
cf108b5c98e1e7d88ba54667356c4d7a077a75e2 30-Apr-2013 Jingoo Han <jg1.han@samsung.com> backlight: adp8860: convert adp8860 to dev_pm_ops

Instead of using legacy suspend/resume methods, using newer dev_pm_ops
structure allows better control over power management.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5eb02c01bd1f3ef195989ab05e835e2b0711b5a9 22-Feb-2013 Lars-Peter Clausen <lars@metafoo.de> drivers/video/backlight/adp88?0_bl.c: fix resume

Clearing the NSTBY bit in the control register also automatically clears
the BLEN bit. So we need to make sure to set it again during resume,
otherwise the backlight will stay off.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7e4b9d0bb2a6464e541d51a1e59ba73470c7c453 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> backlight: remove use of __devexit

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: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1b9e450de105c1429a15f4e2566695f4f425672a 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> backlight: remove use of __devinit

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: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d1723fa266aff677571cad0bac7203ed2e424823 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> backlight: remove use of __devexit_p

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: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
58875ea925763e99b8862dc07bcdebde774d830b 30-May-2012 Jingoo Han <jg1.han@samsung.com> backlight: adp8860: use devm_ functions

The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_kzalloc of these functions.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8dd9d7f2df9f3a29e438e5c50100dad08b9b4215 30-May-2012 Jingoo Han <jg1.han@samsung.com> drivers/video/backlight/adp8860_bl.c: use kstrtoul()

The usage of strict_strtoul() is not preferred. Thus, kstrtoul should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
81ce6864444facc95ba7fe25575153425106c985 23-Mar-2012 Axel Lin <axel.lin@gmail.com> backlight: convert backlight i2c drivers to module_i2c_driver

Factor out some boilerplate code for i2c driver registration into
module_i2c_driver.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
36c3e75907c8cb515fad260190ca1beb7e53df96 20-Jan-2012 Axel Lin <axel.lin@gmail.com> drivers/video/backlight/adp88x0_bl.c: fix bit testing logic

We need to write new value if the bit mask fields of new value is not
equal to old value. It does not make sense to write new value only when
all the bit_mask bits are zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6b19bad8b2d4cf7150b58ce6619b30364bdab1db 26-Jul-2011 Axel Lin <axel.lin@gmail.com> drivers/video/backlight/adp8860_bl.c: remove a redundant assignment for max_brightness

We have set props.max_brightness before registering backlight device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dd37739f47ea278a57d66b2afe20243f0a6294a0 24-Jun-2011 Jesper Juhl <jj@chaosbits.net> Remove unneeded version.h includes from drivers/video/

It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/video/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
bb7ca747f8d6243b3943c5b133048652020f4a50 23-Mar-2011 Matthew Garrett <mjg@redhat.com> backlight: add backlight type

There may be multiple ways of controlling the backlight on a given
machine. Allow drivers to expose the type of interface they are
providing, making it possible for userspace to make appropriate policy
decisions.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4f1aa846316d789ae2df6d22d6bca6e4a373e23d 11-Nov-2010 Michael Hennerich <michael.hennerich@analog.com> drivers/video/backlight/adp8860_bl.c: check strict_strtoul() return value

Handle return value, strict_strtoul is declared with attribute
warn_unused_result.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
c7ce2500e3140b728d8a98a1acb1c2690af51eae 11-Nov-2010 Michael Hennerich <michael.hennerich@analog.com> drivers/video/backlight/adp8860_bl.c: fix ambient light zone overwrite handling

This affects the get/set of the current Ambient Light Zone. Reading
should return an integer between 1..3 (1 = Daylight, 2 = office, 3 =
dark). Writing a value between 1..3 forces the backlight controller to
enter the corresponding Ambient Light Zone. Writing 0 returns to normal
operation.

Fix valid range checking so we don't write invalid values to the
controller, and make sure we subtract 1, since this is what the register
definition (CFGR:BLV) requires. Otherwise the values written don't work
correctly.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fbae3fb1546e199ab0cd185348f8124411a1ca9d 03-Jun-2010 Wolfram Sang <w.sang@pengutronix.de> i2c: Remove all i2c_set_clientdata(client, NULL) in drivers

I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.

As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
c7c06d8a95fd6b83d9f71a0cfecd3f91945d17e5 26-May-2010 Michael Hennerich <michael.hennerich@analog.com> backlight: adp8860: add support for ADP8861 & ADP8863

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
3f43f8b2ad9035c5440d65681079f4d80542d21f 12-May-2010 Randy Dunlap <randy.dunlap@oracle.com> backlight: fix adp8860_bl build errors

Add slab.h to fix part of build.
Add a parameter in backlight_device_register() call to fix part of build.

drivers/video/backlight/adp8860_bl.c:215: error: implicit declaration of function 'kzalloc'
drivers/video/backlight/adp8860_bl.c:215: warning: assignment makes pointer from integer without a cast
drivers/video/backlight/adp8860_bl.c:285: error: implicit declaration of function 'kfree'
drivers/video/backlight/adp8860_bl.c:673: warning: assignment makes pointer from integer without a cast
drivers/video/backlight/adp8860_bl.c:689: error: too few arguments to function 'backlight_device_register'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
82fd53b7f70af9855eda613450a7e4701ffdae20 30-Apr-2010 Michael Hennerich <michael.hennerich@analog.com> backlight: new driver for the ADP8860 backlight parts

The ADP8860 combines a programmable backlight LED charge pump driver with
automatic phototransistor control.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>