1a912e80bSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 22ddfd12fSLars-Peter Clausen /* 32ddfd12fSLars-Peter Clausen * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> 42ddfd12fSLars-Peter Clausen * PCF50633 backlight device driver 52ddfd12fSLars-Peter Clausen */ 62ddfd12fSLars-Peter Clausen 72ddfd12fSLars-Peter Clausen #ifndef __LINUX_MFD_PCF50633_BACKLIGHT 82ddfd12fSLars-Peter Clausen #define __LINUX_MFD_PCF50633_BACKLIGHT 92ddfd12fSLars-Peter Clausen 102ddfd12fSLars-Peter Clausen /* 112ddfd12fSLars-Peter Clausen * @default_brightness: Backlight brightness is initialized to this value 122ddfd12fSLars-Peter Clausen * 132ddfd12fSLars-Peter Clausen * Brightness to be used after the driver has been probed. 142ddfd12fSLars-Peter Clausen * Valid range 0-63. 152ddfd12fSLars-Peter Clausen * 162ddfd12fSLars-Peter Clausen * @default_brightness_limit: The actual brightness is limited by this value 172ddfd12fSLars-Peter Clausen * 182ddfd12fSLars-Peter Clausen * Brightness limit to be used after the driver has been probed. This is useful 192ddfd12fSLars-Peter Clausen * when it is not known how much power is available for the backlight during 202ddfd12fSLars-Peter Clausen * probe. 212ddfd12fSLars-Peter Clausen * Valid range 0-63. Can be changed later with pcf50633_bl_set_brightness_limit. 222ddfd12fSLars-Peter Clausen * 232ddfd12fSLars-Peter Clausen * @ramp_time: Display ramp time when changing brightness 242ddfd12fSLars-Peter Clausen * 252ddfd12fSLars-Peter Clausen * When changing the backlights brightness the change is not instant, instead 262ddfd12fSLars-Peter Clausen * it fades smooth from one state to another. This value specifies how long 272ddfd12fSLars-Peter Clausen * the fade should take. The lower the value the higher the fade time. 282ddfd12fSLars-Peter Clausen * Valid range 0-255 292ddfd12fSLars-Peter Clausen */ 302ddfd12fSLars-Peter Clausen struct pcf50633_bl_platform_data { 312ddfd12fSLars-Peter Clausen unsigned int default_brightness; 322ddfd12fSLars-Peter Clausen unsigned int default_brightness_limit; 332ddfd12fSLars-Peter Clausen uint8_t ramp_time; 342ddfd12fSLars-Peter Clausen }; 352ddfd12fSLars-Peter Clausen 362ddfd12fSLars-Peter Clausen 372ddfd12fSLars-Peter Clausen struct pcf50633; 382ddfd12fSLars-Peter Clausen 392ddfd12fSLars-Peter Clausen int pcf50633_bl_set_brightness_limit(struct pcf50633 *pcf, unsigned int limit); 402ddfd12fSLars-Peter Clausen 412ddfd12fSLars-Peter Clausen #endif 422ddfd12fSLars-Peter Clausen 43