2 * Copyright (c) 2011, NVIDIA Corporation.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __RFKILL_GPIO_H
21 #define __RFKILL_GPIO_H
23 #include <linux/types.h>
24 #include <linux/rfkill.h>
26 #define RFKILL_RK_GPIO_NAME_SIZE 64
28 struct rfkill_rk_iomux {
34 struct rfkill_rk_gpio {
36 char name[RFKILL_RK_GPIO_NAME_SIZE];
37 int enable; // disable = !enable
38 struct rfkill_rk_iomux iomux;
41 struct rfkill_rk_irq {
42 char name[RFKILL_RK_GPIO_NAME_SIZE];
43 struct rfkill_rk_gpio gpio;
48 * struct rfkill_rk_platform_data - platform data for rfkill gpio device.
49 * for unused gpio's, the expected value is -1.
50 * @name: name for the gpio rf kill instance
51 * @reset_gpio: GPIO which is used for reseting rfkill switch
52 * @shutdown_gpio: GPIO which is used for shutdown of rfkill switch
55 struct rfkill_rk_platform_data {
57 enum rfkill_type type;
58 struct rfkill_rk_gpio poweron_gpio;
59 struct rfkill_rk_gpio reset_gpio;
60 struct rfkill_rk_gpio wake_gpio; // Host wake or sleep BT
61 struct rfkill_rk_irq wake_host_irq; // BT wakeup host
62 struct rfkill_rk_gpio rts_gpio;
65 #endif /* __RFKILL_GPIO_H */