~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/linux/rfkill-regulator.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 */