2 * arch/ubicom32/include/asm/ubicom32bl.h
3 * Ubicom32 architecture backlight driver platform data definitions.
5 * (C) Copyright 2009, Ubicom, Inc.
7 * This file is part of the Ubicom32 Linux Kernel Port.
9 * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10 * it and/or modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation, either version 2 of the
12 * License, or (at your option) any later version.
14 * The Ubicom32 Linux Kernel Port is distributed in the hope that it
15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
16 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
17 * the GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with the Ubicom32 Linux Kernel Port. If not,
21 * see <http://www.gnu.org/licenses/>.
23 * Ubicom32 implementation derived from (with many thanks):
28 #ifndef _ASM_UBICOM32_UBICOM32_BL_H
29 #define _ASM_UBICOM32_UBICOM32_BL_H
32 * Different backlight control mechanisms
34 enum ubicom32bl_pwm_types
{
36 * PWM controlled backlight
41 * HRT based PWM backlight
43 UBICOM32BL_TYPE_PWM_HRT
,
46 * No dimming, just on or off
48 UBICOM32BL_TYPE_BINARY
,
51 struct ubicom32bl_platform_data
{
53 * Default intensity of the backlight 0-255
55 u8_t default_intensity
;
58 * TRUE if the backlight sense is active low. (inverted)
59 * FALSE if the backlight sense is active high.
64 * Type of the backlight
66 enum ubicom32bl_pwm_types type
;
69 * GPIO of the backlight if UBICOM32BL_TYPE_PWM_HRT, UBICOM32BL_TYPE_BINARY
74 * PWM channel and parameters of the backlight if UBICOM32BL_TYPE_PWM
75 * pre_scaler: sets the rate at which the PWM timer is clocked. (clk_core / 2^pre_scaler)
76 * period: sets the period of the timer in timer cycles
77 * The duty cycle will be directly proportional to the brightness setting.
84 #endif /* _ASM_UBICOM32_UBICOM32_BL_H */