1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*
* drivers/misc/tegra-baseband/bb-power.h
*
* Copyright (C) 2011 NVIDIA Corporation
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
enum tegra_bb_callback_code {
CB_CODE_INIT = 1,
CB_CODE_DEINIT,
CB_CODE_L0L2,
CB_CODE_L2L0,
CB_CODE_L2L3,
CB_CODE_L3L0,
CB_CODE_INVALID,
};
struct tegra_bb_gpio_data {
struct gpio data;
bool doexport;
};
struct tegra_bb_gpio_irqdata {
int id;
const char *name;
irq_handler_t handler;
int flags;
void *cookie;
};
struct tegra_bb_power_gdata {
struct tegra_bb_gpio_data *gpio;
struct tegra_bb_gpio_irqdata *gpioirq;
};
typedef void* (*bb_init_cb)(void *pdata, int code);
typedef int (*bb_power_cb)(int code);
#ifdef CONFIG_TEGRA_BB_M7400
extern void *m7400_init(void *pdata, int code);
#define M7400_INIT_CB m7400_init
extern int m7400_power_callback(int code);
#define M7400_PWR_CB m7400_power_callback
#else
#define M7400_INIT_CB NULL
#define M7400_PWR_CB NULL
#endif
|