xref: /linux/include/linux/mfd/pcf50633/backlight.h (revision 2ddfd12f3584840f5190897214423061d8a0602f)
1*2ddfd12fSLars-Peter Clausen /*
2*2ddfd12fSLars-Peter Clausen  *  Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
3*2ddfd12fSLars-Peter Clausen  *      PCF50633 backlight device driver
4*2ddfd12fSLars-Peter Clausen  *
5*2ddfd12fSLars-Peter Clausen  *  This program is free software; you can redistribute	 it and/or modify it
6*2ddfd12fSLars-Peter Clausen  *  under  the terms of	 the GNU General  Public License as published by the
7*2ddfd12fSLars-Peter Clausen  *  Free Software Foundation;  either version 2 of the	License, or (at your
8*2ddfd12fSLars-Peter Clausen  *  option) any later version.
9*2ddfd12fSLars-Peter Clausen  *
10*2ddfd12fSLars-Peter Clausen  *  You should have received a copy of the  GNU General Public License along
11*2ddfd12fSLars-Peter Clausen  *  with this program; if not, write  to the Free Software Foundation, Inc.,
12*2ddfd12fSLars-Peter Clausen  *  675 Mass Ave, Cambridge, MA 02139, USA.
13*2ddfd12fSLars-Peter Clausen  *
14*2ddfd12fSLars-Peter Clausen  */
15*2ddfd12fSLars-Peter Clausen 
16*2ddfd12fSLars-Peter Clausen #ifndef __LINUX_MFD_PCF50633_BACKLIGHT
17*2ddfd12fSLars-Peter Clausen #define __LINUX_MFD_PCF50633_BACKLIGHT
18*2ddfd12fSLars-Peter Clausen 
19*2ddfd12fSLars-Peter Clausen /*
20*2ddfd12fSLars-Peter Clausen * @default_brightness: Backlight brightness is initialized to this value
21*2ddfd12fSLars-Peter Clausen *
22*2ddfd12fSLars-Peter Clausen * Brightness to be used after the driver has been probed.
23*2ddfd12fSLars-Peter Clausen * Valid range 0-63.
24*2ddfd12fSLars-Peter Clausen *
25*2ddfd12fSLars-Peter Clausen * @default_brightness_limit: The actual brightness is limited by this value
26*2ddfd12fSLars-Peter Clausen *
27*2ddfd12fSLars-Peter Clausen * Brightness limit to be used after the driver has been probed. This is useful
28*2ddfd12fSLars-Peter Clausen * when it is not known how much power is available for the backlight during
29*2ddfd12fSLars-Peter Clausen * probe.
30*2ddfd12fSLars-Peter Clausen * Valid range 0-63. Can be changed later with pcf50633_bl_set_brightness_limit.
31*2ddfd12fSLars-Peter Clausen *
32*2ddfd12fSLars-Peter Clausen * @ramp_time: Display ramp time when changing brightness
33*2ddfd12fSLars-Peter Clausen *
34*2ddfd12fSLars-Peter Clausen * When changing the backlights brightness the change is not instant, instead
35*2ddfd12fSLars-Peter Clausen * it fades smooth from one state to another. This value specifies how long
36*2ddfd12fSLars-Peter Clausen * the fade should take. The lower the value the higher the fade time.
37*2ddfd12fSLars-Peter Clausen * Valid range 0-255
38*2ddfd12fSLars-Peter Clausen */
39*2ddfd12fSLars-Peter Clausen struct pcf50633_bl_platform_data {
40*2ddfd12fSLars-Peter Clausen 	unsigned int	default_brightness;
41*2ddfd12fSLars-Peter Clausen 	unsigned int	default_brightness_limit;
42*2ddfd12fSLars-Peter Clausen 	uint8_t		ramp_time;
43*2ddfd12fSLars-Peter Clausen };
44*2ddfd12fSLars-Peter Clausen 
45*2ddfd12fSLars-Peter Clausen 
46*2ddfd12fSLars-Peter Clausen struct pcf50633;
47*2ddfd12fSLars-Peter Clausen 
48*2ddfd12fSLars-Peter Clausen int pcf50633_bl_set_brightness_limit(struct pcf50633 *pcf, unsigned int limit);
49*2ddfd12fSLars-Peter Clausen 
50*2ddfd12fSLars-Peter Clausen #endif
51*2ddfd12fSLars-Peter Clausen 
52