aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/l4f00242t03.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-04-03backlight: l4f00242t03: remove unnecessary OOM messagesJingoo Han1-4/+1
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-01-23backlight: l4f00242t03: use devm_lcd_device_register()Jingoo Han1-4/+2
Use devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-14Merge tag 'fbdev-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linuxLinus Torvalds1-1/+0
Pull fbdev changes from Tomi Valkeinen: "Nothing particularly stands out in this pull request. The biggest part of the changes are cleanups. Maybe one fix to mention is the "fb: reorder the lock sequence to fix potential dead lock" which hopefully fixes the fb locking issues reported by multiple persons. There are also a few commits that have changes to arch/arm/mach-at91 and arch/avr32, which have been acked by the maintainers" * tag 'fbdev-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (143 commits) fb: reorder the lock sequence to fix potential dead lock fbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare omapdss: Add new panel driver for Topolly td028ttec1 LCD. video: exynos_mipi_dsi: Unlock the mutex before returning video: da8xx-fb: remove unwanted define video: Remove unnecessary semicolons simplefb: use write-combined remapping simplefb: fix unmapping fb during destruction OMAPDSS: connector-dvi: fix releasing i2c_adapter OMAPDSS: DSI: fix perf measuring ifdefs framebuffer: Use fb_<level> framebuffer: Add fb_<level> convenience logging macros efifb: prevent null-deref when iterating dmi_list fbdev: fix error return code in metronomefb_probe() video: xilinxfb: Fix for "Use standard variable name convention" OMAPDSS: Fix de_level in videomode_to_omap_video_timings() video: xilinxfb: Simplify error path video: xilinxfb: Use devm_kzalloc instead of kzalloc video: xilinxfb: Use standard variable name convention ...
2013-11-13backlight: use dev_get_platdata()Jingoo Han1-3/+3
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-09-26backlight: l4f00242t03: Remove redundant spi_set_drvdataSachin Kamat1-1/+0
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-29drivers/video/backlight/l4f00242t03.c: check return value of regulator_enable()Jingoo Han1-4/+23
regulator_enable() is marked as as __must_check. Therefore the return value of regulator_enable() should be checked. Also, this patch checks return value of regulator_set_voltage(). 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/l4f00242t03.c: convert to devm_regulator_get()Axel Lin1-19/+5
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Cc: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21backlight: l4f00242t03: use spi_get_drvdata and spi_set_drvdataJingoo Han1-6/+6
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>
2012-12-17backlight: l4f00242t03: fix checkpatch warningJingoo Han1-2/+1
This patch fixes the checkpatch warning as below: WARNING: please, no space before tabs Also, unnecessary line is removed. 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-07-30backlight: l4f00242t03: export and use devm_gpio_request_one()Jingoo Han1-19/+10
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_gpio_request_one() for these functions. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Alberto Panizzo <alberto@amarulasolutions.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-29backlight: l4f00242t03: use devm_ functionsJingoo Han1-14/+11
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: Alberto Panizzo <alberto@amarulasolutions.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-29drivers/video/backlight/l4f00242t03.c: use pr_fmtJingoo Han1-0/+2
This driver uses pr_debug(), so provide it with the appropriate prefixing. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Alberto Panizzo <alberto@amarulasolutions.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Joe Perches <joe@perches.com> 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-01-23drivers/video/backlight/l4f00242t03.c: return proper error in l4f00242t03_probe if regulator_get() failsAxel Lin1-0/+2
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Alberto Panizzo <alberto@amarulasolutions.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-11-06Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linuxLinus Torvalds1-0/+1
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-10-31drivers/video/backlight/l4f00242t03.c: use gpio_request_one() to simplify error handlingFabio Estevam1-11/+4
Using gpio_request_one can make the error handling simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.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-10-31backlight: fix broken regulator API usage in l4f00242t03Mark Brown1-37/+20
The regulator support in the l4f00242t03 is very non-idiomatic. Rather than requesting the regulators based on the device name and the supply names used by the device the driver requires boards to pass system specific supply names around through platform data. The driver also conditionally requests the regulators based on this platform data, adding unneeded conditional code to the driver. Fix this by removing the platform data and converting to the standard idiom, also updating all in tree users of the driver. As no datasheet appears to be available for the LCD I'm guessing the names for the supplies based on the existing users and I've no ability to do anything more than compile test. The use of regulator_set_voltage() in the driver is also problematic, since fixed voltages are required the expectation would be that the voltages would be fixed in the constraints set by the machines rather than manually configured by the driver, but is less problematic. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Fabio Estevam <fabio.estevam@freescale.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-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-01-13drivers/video/backlight/l4f00242t03.c: fix reset sequenceAlberto Panizzo1-1/+2
The reset command is part of the init sequence and it take effect only if the lcd is powered. The effect of the bug was that the sequence: set lcd power_state to FB_BLANK_POWERDOWN set lcd power_state to FB_BLANK_UNBLANK Did not produced a complete reboot of the LCD which was showing fuzzy colours. This was not experienced before implementing correctly all the LCD power states with the patch [1]. Since before the patch [1] the regulators were not touched and the LCD shutdown was reached with a register write. After the patch [1] a complete boot sequence with an initial reset is needed for the display every time the LCD is powered up. drivers-video-backlight-l4f00242t03c-full-implement-fb-power-states-for-this-lcd.patch Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: 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-01-13drivers/video/backlight/l4f00242t03.c: prevent unbalanced calls to regulator enable/disableAlberto Panizzo1-4/+6
Otherwise a double call to: $ echo 4 > /sys/class/lcd/l4f00242t03/lcd_power Will, the first power down the lcd and regulators correctly and the second produce an unbalanced call to regulator disable. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: 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-01-13drivers/video/backlight/l4f00242t03.c: full implement fb power states for this lcdAlberto Panizzo1-22/+75
Complete the support of fb power states managing correctly the regulators bound to this driver. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: 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-01-13drivers/video/backlight/l4f00242t03.c: make 1-bit signed field unsignedMariusz Kozlowski1-1/+1
Fixes sparse warning: drivers/video/backlight/l4f00242t03.c:28:21: error: dubious one-bit signed bitfield Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl> 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-11-12backlight: fix blanking for L4F00242T03 LCDMarek Vasut1-1/+1
The LCD was turned on if the variable power was > 0, but that was incorrect. The LCD has to be turned on in NORMAL and UNBLANK case. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-26backlight: l4f00242t03: fix error handling in l4f00242t03_probeAxel Lin1-4/+3
Error handling fixes: 1. In the case of kzalloc failure, simple return -ENOMEM instead of goto err. ( priv is NULL in this case ) 2. In the case of gpio_request fail for reset_gpio and data_enable_gpio, properly release resources by goto err and err2 respectively. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26backlight: l4f00242t03: Fix regulators handling code in remove functionAlberto Panizzo1-2/+2
Simple swap of regulator free Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-16backlight: l4f00242t03: Fix module licence absence.Alberto Panizzo1-0/+1
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-16backlight: Add Epson L4F00242T03 LCD driverAlberto Panizzo1-0/+256
The Epson LCD L4F00242T03 is mounted on the Freescale i.MX31 PDK board. Based upon Marek Vasut work in l4f00242t03.c, this driver provides basic init and power on/off functionality for this device through the sysfs lcd interface. Unfortunately Datasheet for this device are not available and all the control sequences sent to the display were copied from the freescale driver that in the i.MX31 Linux BSP. As in the i.MX31PDK board the core and io suppliers are voltage regulators, that functionality is embedded here, but not strict. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>