blob: 701eb7a51ebcf961c1c76a2f96fec1525ca9a56e [file] [log] [blame]
Joel Kingb6f0f612011-11-01 16:59:14 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef _ARCH_ARM_MACH_MSM_MDM_PRIVATE_H
14#define _ARCH_ARM_MACH_MSM_MDM_PRIVATE_H
15
16struct mdm_modem_drv;
17
18/* Private mdm2 data structure */
19struct mdm_modem_drv {
20 unsigned mdm2ap_errfatal_gpio;
21 unsigned ap2mdm_errfatal_gpio;
22 unsigned mdm2ap_status_gpio;
23 unsigned ap2mdm_status_gpio;
24 unsigned mdm2ap_wakeup_gpio;
25 unsigned ap2mdm_wakeup_gpio;
26 unsigned ap2mdm_pmic_reset_n_gpio;
27 unsigned ap2mdm_kpdpwr_n_gpio;
28
29 int mdm_errfatal_irq;
30 int mdm_status_irq;
31 int mdm_ready;
32 int mdm_boot_status;
33 int mdm_ram_dump_status;
34 enum charm_boot_type boot_type;
35 int mdm_debug_on;
36
37 void (*power_on_mdm_cb)(struct mdm_modem_drv *mdm_drv);
38 void (*normal_boot_done_cb)(struct mdm_modem_drv *mdm_drv);
39 void (*power_down_mdm_cb)(struct mdm_modem_drv *mdm_drv);
40 void (*debug_state_changed_cb)(int value);
41};
42
43struct mdm_callbacks {
44 void (*power_on_mdm_cb)(struct mdm_modem_drv *mdm_drv);
45 void (*normal_boot_done_cb)(struct mdm_modem_drv *mdm_drv);
46 void (*power_down_mdm_cb)(struct mdm_modem_drv *mdm_drv);
47 void (*debug_state_changed_cb)(int value);
48};
49
50int mdm_common_create(struct platform_device *pdev,
51 struct mdm_callbacks *mdm_cb);
52int mdm_common_modem_remove(struct platform_device *pdev);
53void mdm_common_modem_shutdown(struct platform_device *pdev);
54void mdm_common_set_debug_state(int value);
55
56#endif
57