Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 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 | |
| 16 | struct mdm_modem_drv; |
| 17 | |
Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 18 | struct mdm_ops { |
| 19 | void (*power_on_mdm_cb)(struct mdm_modem_drv *mdm_drv); |
| 20 | void (*normal_boot_done_cb)(struct mdm_modem_drv *mdm_drv); |
| 21 | void (*power_down_mdm_cb)(struct mdm_modem_drv *mdm_drv); |
| 22 | void (*debug_state_changed_cb)(int value); |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 23 | void (*status_cb)(struct mdm_modem_drv *mdm_drv, int value); |
Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 24 | }; |
| 25 | |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 26 | /* Private mdm2 data structure */ |
| 27 | struct mdm_modem_drv { |
| 28 | unsigned mdm2ap_errfatal_gpio; |
| 29 | unsigned ap2mdm_errfatal_gpio; |
| 30 | unsigned mdm2ap_status_gpio; |
| 31 | unsigned ap2mdm_status_gpio; |
| 32 | unsigned mdm2ap_wakeup_gpio; |
| 33 | unsigned ap2mdm_wakeup_gpio; |
| 34 | unsigned ap2mdm_pmic_reset_n_gpio; |
| 35 | unsigned ap2mdm_kpdpwr_n_gpio; |
| 36 | |
| 37 | int mdm_errfatal_irq; |
| 38 | int mdm_status_irq; |
| 39 | int mdm_ready; |
| 40 | int mdm_boot_status; |
| 41 | int mdm_ram_dump_status; |
| 42 | enum charm_boot_type boot_type; |
| 43 | int mdm_debug_on; |
| 44 | |
Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 45 | struct mdm_ops *ops; |
Joel King | 415af51 | 2012-02-03 10:22:43 -0800 | [diff] [blame] | 46 | struct mdm_platform_data *pdata; |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | int mdm_common_create(struct platform_device *pdev, |
Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 50 | struct mdm_ops *mdm_cb); |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 51 | int mdm_common_modem_remove(struct platform_device *pdev); |
| 52 | void mdm_common_modem_shutdown(struct platform_device *pdev); |
| 53 | void mdm_common_set_debug_state(int value); |
| 54 | |
| 55 | #endif |
| 56 | |