Commit | Line | Data |
---|---|---|
cbc6a6ed AO |
1 | /* |
2 | * rfkill-regulator.c - Regulator consumer driver for rfkill | |
3 | * | |
4 | * Copyright (C) 2009 Guiming Zhuo <gmzhuo@gmail.com> | |
5 | * Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it> | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License version 2 as | |
9 | * published by the Free Software Foundation. | |
10 | * | |
11 | */ | |
12 | ||
13 | #ifndef __LINUX_RFKILL_REGULATOR_H | |
14 | #define __LINUX_RFKILL_REGULATOR_H | |
15 | ||
16 | /* | |
17 | * Use "vrfkill" as supply id when declaring the regulator consumer: | |
18 | * | |
19 | * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = { | |
20 | * { .dev_name = "rfkill-regulator.0", .supply = "vrfkill" }, | |
21 | * }; | |
22 | * | |
23 | * If you have several regulator driven rfkill, you can append a numerical id to | |
24 | * .dev_name as done above, and use the same id when declaring the platform | |
25 | * device: | |
26 | * | |
27 | * static struct rfkill_regulator_platform_data ezx_rfkill_bt_data = { | |
28 | * .name = "ezx-bluetooth", | |
29 | * .type = RFKILL_TYPE_BLUETOOTH, | |
30 | * }; | |
31 | * | |
32 | * static struct platform_device a910_rfkill = { | |
33 | * .name = "rfkill-regulator", | |
34 | * .id = 0, | |
35 | * .dev = { | |
36 | * .platform_data = &ezx_rfkill_bt_data, | |
37 | * }, | |
38 | * }; | |
39 | */ | |
40 | ||
41 | #include <linux/rfkill.h> | |
42 | ||
43 | struct rfkill_regulator_platform_data { | |
44 | char *name; /* the name for the rfkill switch */ | |
45 | enum rfkill_type type; /* the type as specified in rfkill.h */ | |
46 | }; | |
47 | ||
48 | #endif /* __LINUX_RFKILL_REGULATOR_H */ |