aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRhyland Klein <rklein@nvidia.com>2011-05-16 17:41:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-19 13:53:54 -0400
commit7176ba23f8b589b1df3229574ff46fb904ce9ec5 (patch)
treee0811eed20f2f636c217f719862a63b6652543b8 /include/linux
parentc6820f1e6c8273ca4b8f94c2354193d19e1a5c47 (diff)
net: rfkill: add generic gpio rfkill driver
This adds a new generic gpio rfkill driver to support rfkill switches which are controlled by gpios. The driver also supports passing in data about the clock for the radio, so that when rfkill is blocking, it can disable the clock. This driver assumes platform data is passed from the board files to configure it for specific devices. Original-patch-by: Anantha Idapalapati <aidapalapati@nvidia.com> Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rfkill-gpio.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/rfkill-gpio.h b/include/linux/rfkill-gpio.h
new file mode 100644
index 000000000000..a175d0598033
--- /dev/null
+++ b/include/linux/rfkill-gpio.h
@@ -0,0 +1,43 @@
1/*
2 * Copyright (c) 2011, NVIDIA Corporation.
3 *
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.
8 *
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
12 * more details.
13 *
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.
17 */
18
19
20#ifndef __RFKILL_GPIO_H
21#define __RFKILL_GPIO_H
22
23#include <linux/types.h>
24#include <linux/rfkill.h>
25
26/**
27 * struct rfkill_gpio_platform_data - platform data for rfkill gpio device.
28 * for unused gpio's, the expected value is -1.
29 * @name: name for the gpio rf kill instance
30 * @reset_gpio: GPIO which is used for reseting rfkill switch
31 * @shutdown_gpio: GPIO which is used for shutdown of rfkill switch
32 * @power_clk_name: [optional] name of clk to turn off while blocked
33 */
34
35struct rfkill_gpio_platform_data {
36 char *name;
37 int reset_gpio;
38 int shutdown_gpio;
39 const char *power_clk_name;
40 enum rfkill_type type;
41};
42
43#endif /* __RFKILL_GPIO_H */