2 * arch/ubicom32/include/asm/ubicom32hid.h
3 * Ubicom32 architecture HID 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_HID_H
29 #define _ASM_UBICOM32_UBICOM32_HID_H
31 enum ubicom32hid_bl_types {
33 * On or off, using command SET_BL_EN, PB4
35 UBICOM32HID_BL_TYPE_BINARY,
38 * Dimmable, using command SET_PWM, PB3
40 UBICOM32HID_BL_TYPE_PWM,
44 * IR code mapping to event code.
45 * If there are no button mappings and no ir mappings
46 * then no input driver will be registered.
48 struct ubicom32hid_ir {
50 * Input event code (KEY_*, SW_*, etc)
55 * Input event type (EV_KEY, EV_SW, etc)
60 * The IR code of this button.
66 * Button mapping to event code.
67 * If there are no button mappings and no ir mappings
68 * then no input driver will be registered.
70 struct ubicom32hid_button {
72 * Input event code (KEY_*, SW_*, etc)
77 * Input event type (EV_KEY, EV_SW, etc)
82 * Bit number of this button.
87 struct ubicom32hid_platform_data {
89 * Default intensity of the backlight 0-255
91 u8_t default_intensity;
94 * GPIO number of the reset line and its polarity.
97 int gpio_reset_polarity;
100 * TRUE if the backlight sense is active low. (inverted)
101 * FALSE if the backlight sense is active high.
106 * Type of the backlight we are controlling
108 enum ubicom32hid_bl_types type;
111 * Optional polling rate for input, in ms, defaults to 100ms
116 * Optional name to register as input device
118 const char *input_name;
121 * Button mapping array
123 const struct ubicom32hid_button *buttons;
129 const struct ubicom32hid_ir *ircodes;
133 #endif /* _ASM_UBICOM32_UBICOM32_HID_H */