aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/hp680_bl.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-07-20backlight: Use backlight_get_brightness() throughoutSam Ravnborg1-5/+1
Introduce the backlight_get_brightness() helper in all video/backlight/* drivers. This simplifies the code and align the implementation of the update_status() operation across the different backlight drivers. Some of the drivers gains a little extra functionality by the change as they now respect the fb_blank() ioctl. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-23backlight: hp680_bl: use devm_backlight_device_register()Jingoo Han1-4/+2
Use devm_backlight_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-04-29backlight: hp680_bl: convert hp680bl to dev_pm_opsJingoo Han1-10/+8
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>
2012-12-17backlight: hp680_bl: fix checkpatch error and warningJingoo Han1-2/+2
This patch fixes the checkpatch error and warning as below: WARNING: please, no space before tabs WARNING: please, no spaces at the start of a line ERROR: do not initialise statics to 0 or NULL ERROR: code indent should use tabs where possible 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 __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>
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-03-16backlight: Allow properties to be passed at registrationMatthew Garrett1-3/+5
Values such as max_brightness should be set before backlights are registered, but the current API doesn't allow that. Add a parameter to backlight_device_register and update drivers to ensure that they set this correctly. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-16backlight: Constify struct backlight_opsEmese Revfy1-1/+1
Signed-off-by: Emese Revfy <re.emese@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-07backlight: move hp680-bl's probe function to .devinit.textUwe Kleine-König1-1/+1
A pointer to hp680bl_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-08backlight: hp680_bl - Use platform_device_register_simple()Akinobu Mita1-12/+8
Use platform_device_register_simple() and also fix error handling when platform_device_alloc() fails (hp680_bl_driver is left registered). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2008-10-20sh: Migrate common board headers to mach-common/.Paul Mundt1-1/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-30video: Fix up hp6xx driver build regressions.Paul Mundt1-1/+1
This is some more fallout from the header reorganization, fix up the paths accordingly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21backlight: Fix up hp680_bl build.Kristoffer Ericson1-2/+2
Trivial build fixes. Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-20backlight: Separate backlight properties from backlight ops pointersRichard Purdie1-7/+7
Per device data such as brightness belongs to the indivdual device and should therefore be separate from the the backlight operation function pointers. This patch splits the two types of data and allows simplifcation of some code. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20backlight: Minor code cleanups for hp680_bl.cRichard Purdie1-15/+24
Since people use this code as an example, clean it up to to use platform_*_drvdata instead of a global variable. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20backlight: Remove unneeded owner fieldRichard Purdie1-1/+0
Remove uneeded owner field from backlight_properties structure. Nothing uses it and it is unlikely that it will ever be used. The backlight class uses other means to ensure that nothing references unloaded code. Based on a patch from Dmitry Torokhov <dtor@insightbb.com> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-01-02backlight: fix backlight_device_register compile failuresRichard Purdie1-1/+1
Fix breakage from commit 519ab5f2be65b72cf12ae99c89752bbe79b44df6 which didn't update all references to backlight_device_register causing compile failures. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-08[PATCH] backlight: do not power off backlight when unregisteringHenrique de Moraes Holschuh1-0/+4
ACPI drivers like ibm-acpi are moving to the backlight sysfs infrastructure. During ibm-acpi testing, I have noticed that backlight_device_unregister() sets the display brightness and power to zero. This causes the display to be dimmed on ibm-acpi module removal. It will affect all other ACPI drivers that are being converted to use the backlight class, as well. It also affects a number of framebuffer devices that are used on desktops and laptops which might also not want such behaviour. Since working around this behaviour requires undesireable hacks, Richard Purdie decided that we would be better off reverting the changes in the sysfs class, and adding the code to dim and power off the backlight device to the drivers that want it. This patch is my attempt to do so. Patch against latest linux-2.6.git. Changes untested, as I lack the required hardware. Still, they are trivial enough that, apart from typos, there is little chance of getting them wrong. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-31video: Fix include in hp680_bl.Kristoffer Ericson1-1/+1
The hp6xx.h header moved location, causing the build to fail, fix it up. Signed-off-by: Kristoffer Ericson <kristoffer_e1@hotmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-09-27video: Update header location in hp680_bl.Andriy Skulysh1-2/+2
Trivial build fix. Signed-off-by: Andriy Skulysh <askulysh@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-06-27[PATCH] spin/rwlock init cleanupsIngo Molnar1-1/+1
locking init cleanups: - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK() - convert rwlocks in a similar manner this patch was generated automatically. Motivation: - cleanliness - lockdep needs control of lock initialization, which the open-coded variants do not give - it's also useful for -rt and for lock debugging in general Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-31[PATCH] backlight: HP Jornada 680 Backlight driver updates/fixesRichard Purdie1-80/+59
Updates to the HP Jornada 680 Backlight driver: - Correct the suspend/resume functions so the driver compiles (SUSPEND_POWER_DOWN/RESUME_POWER_ON no longer exist). - Convert the driver to match the recent platform device changes. - Replace the unsafe static struct platform_device with dynamic allocation. - Convert the driver to the new backlight code. This has not been tested on a device due to lack of hardware but wouldn't compile beforehand. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01[PATCH] video: hp680 backlight driverAndriy Skulysh1-0/+189
This adds support for the hp680 backlight, as found in the hp6xx series of sh devices. Signed-off-by: Andriy Skulysh <askulysh@image.kiev.ua> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>