aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/s6e63m0.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-10-28spi: Drop owner assignment from spi_driversAndrew F. Davis1-1/+0
An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29backlight: s6e63m0: Remove 'else' after a returnJingoo Han1-6/+6
Fixed the following checkpatch warning. WARNING: else is not generally useful after a break or return Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-06-23backlight: Remove trivial get_brightness implementationsAndrzej Hajda1-6/+0
Since backlight core returns props.brightness in case get_brightness is not implemented trivial implementations are not needed anymore. Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-05-07video/backlight: s6e63m0: Fix string type mismatchMasanari Iida1-1/+1
Fix string type mismatch in s6e63m0_sysfs_show_gamma_table(). gamma_table_count is defined as unsigned int. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-11-13backlight: s6e63m0: use devm_{backlight,lcd}_device_register()Jingoo Han1-13/+7
Use devm_backlight_device_register() and devm_lcd_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>
2013-11-13backlight: use dev_get_platdata()Jingoo Han1-1/+1
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>
2013-04-29backlight: s6e63m0: convert s6e63m0 to dev_pm_opsJingoo Han1-11/+9
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>
2013-02-21drivers/video/backlight/s6e63m0.c: report ->gamma_table_count correctlyDan Carpenter1-1/+1
gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to int. The current code sets ->gamma_table_count to 6 on 64bit arches and to 3 on 32 bit arches. It should be 3 on everything. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21backlight: s6e63m0: use spi_get_drvdata and spi_set_drvdataJingoo Han1-5/+5
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device 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>
2013-02-21backlight: s6e63m0: reorder inclusions of <linux/xxx.h>Jingoo Han1-14/+5
Reorder inclusions of <linux/xxx.h> for redability, according to alphabetical ordering. Also, unnecessary header comments are removed. 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>
2013-02-21backlight: s6e63m0: remove redundant variable 'before_power'Jingoo Han1-21/+3
'before_power' was used to check the previous status when resume() is called. However, FB_BLANK_POWERDOWN was used in suspend() all the time, so there is no need to check the previous status. Also, redundant return variables are removed to reduce the code. 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>
2013-02-21backlight: s6e63m0: replace EFAULT with EINVALJingoo Han1-3/+3
Replace EFAULT with EINVAL, because EFAULT tends to be for the invalid memory addresses. 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>
2013-02-21backlight: s6e63m0: remove unnecessary NULL deference checkJingoo Han1-27/+14
Remove unnecessary NULL deference check, because it was already checked in s6e63m0_probe(). Also, POWER_IS_ON is replaced with s6e63m0_power_is_on(). 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>
2013-02-21backlight: s6e63m0: use sleep instead of delayJingoo Han1-5/+6
Replace mdelay with msleep to remove the busy loop waiting. 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>
2013-02-21backlight: s6e63m0: use lowercase names of structsJingoo Han1-20/+20
Lowercase names of structs should be used, because they are not preprocessor macros. 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>
2012-12-17drivers/video/backlight/s6e63m0.c: remove unnecessary cast of void pointerJingoo Han1-1/+1
Remove unnecessary cast of void pointer for platform data in probe function. Signed-off-by: Jingoo Han <jg1.han@samsung.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>
2012-11-28backlight: 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: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28backlight: remove use of __devinitBill Pemberton1-1/+1
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>
2012-11-28backlight: 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: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29backlight: s6e63m0: use devm_ functionsJingoo Han1-10/+5
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> Cc: InKi Dae <inki.dae@samsung.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>
2012-05-29blacklight: remove redundant spi driver bus initializationLars-Peter Clausen1-1/+0
In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register() so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> 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-03-23backlight: convert backlight spi drivers to module_spi_driverAxel Lin1-12/+1
Factor out some boilerplate code for spi driver registration into module_spi_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Cc: Eric Miao <eric.y.miao@gmail.com> Acked-by: Alberto Panizzo <alberto@amarulasolutions.com> Cc: Donghwa Lee <dh09.lee@samsung.com> Acked-by: Marek Vasut <marek.vasut@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Dmitry Baryshkov <dbaryshkov@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> 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-03-15drivers/video/backlight/s6e63m0.c: fix corruption storing gamma modeDan Carpenter1-1/+1
strict_strtoul() writes a long but ->gamma_mode only has space to store an int, so on 64 bit systems we end up scribbling over ->gamma_table_count as well. I've changed it to use kstrtouint() instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-31video: Add module.h to drivers/video files who really use it.Paul Gortmaker1-0/+1
They were getting this implicitly by an include of module.h from device.h -- but we are going to clean that up and break that include chain, so include module.h explicitly now. [ with contributions from Axel Lin <axel.lin@gmail.com> ] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-07-25backlight: set backlight type and max_brightness before backlights are registeredAxel Lin1-3/+6
Since commit a19a6ee "backlight: Allow properties to be passed at registration" and commit bb7ca74 "backlight: add backlight type", we can set backlight type and max_brightness before backlights are registered. Some newly added drivers did not set it properly, let's fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: Donghwa Lee <dh09.lee@samsung.com> Cc: InKi Dae <inki.dae@samsung.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>
2011-07-25backlight: add ams369fg06 amoled driverJingoo Han1-1/+1
Add the ams369fg06 amoled panel driver. The ams369fg06 amoled panel (480 x 800) driver uses 3-wired SPI inteface. The brightness can be controlled by gamma setting of amoled panel. [sfr@canb.auug.org.au: fix build error] [axel.lin@gmail.com: unregister backlight device when unloading the module] [axel.lin@gmail.com: staticize ams369fg06_shutdown] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Inki Dae <inki.dae@samsung.com> Cc: anish singh <anish198519851985@gmail.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22backlight: add backlight typeMatthew Garrett1-0/+1
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>
2010-11-12drivers/video/backlight/s6e63m0.c: fix section mismatchAxel Lin1-1/+1
Eliminate section mismatch warning by marking s6e63m0_probe() as __devinit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Cc: InKi Dae <inki.dae@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12drivers/video/backlight/s6e63m0.c: unregister backlight device and remove sysfs attribute file in s6e63m0_removeAxel Lin1-0/+3
s6e63m0_probe() registered backlight device and create sysfs attribute files, thus s6e63m0_remove() should unregister backlight device and remove sysfs attribute files. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Cc: InKi Dae <inki.dae@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12drivers/video/backlight/s6e63m0.c: set permissions on gamma_table file to 0444Axel Lin1-1/+1
gamma_table is not writable, so set permissions to 0444. Signed-off-by: Axel Lin <axel.lin@gmail.com> 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>
2010-05-26backlight: add S6E63M0 AMOLED LCD Panel driverInKi Dae1-0/+920
This is S6E63M0 AMOLED LCD Panel(480x800) driver using 3-wired SPI interface also almost features for lcd panel driver has been implemented in here. and I added new structure common for all the lcd panel drivers to include/linux/lcd.h file. LCD Panel driver needs interfaces for controlling device power such as power on/off and reset. these interfaces are device specific so it should be implemented to machine code at this time, we should create new structure for registering these functions as callbacks and also a header file for that structure and finally registered callback functions would be called by lcd panel driver. such header file(including new structure for lcd panel) would be added for all the lcd panel drivers. If anyone provides common structure for registering such callback functions then we could reduce unnecessary header files for lcd panel. I thought that suitable anyone could be include/linux/lcd.h so a new lcd_platform_data structure was added there. [akpm@linux-foundation.org: coding-style fixes] [randy.dunlap@oracle.com: fix s6e63m0 kconfig] [randy.dunlap@oracle.com: fix device attribute functions return types] Signed-off-by: InKi Dae <inki.dae@samsung.com> Reviewed-by: KyungMin Park <kyungmin.park.samsung.com> 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>