Jeff Johnson | 8b1f6d0 | 2012-02-03 20:43:26 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -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 | |
| 14 | #ifndef _WCNSS_WLAN_H_ |
| 15 | #define _WCNSS_WLAN_H_ |
| 16 | |
| 17 | #include <linux/device.h> |
| 18 | |
Sameer Thalappil | 409ed35 | 2011-12-07 10:53:31 -0800 | [diff] [blame] | 19 | enum wcnss_opcode { |
| 20 | WCNSS_WLAN_SWITCH_OFF = 0, |
| 21 | WCNSS_WLAN_SWITCH_ON, |
| 22 | }; |
| 23 | |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame^] | 24 | enum wcnss_hw_type { |
| 25 | WCNSS_RIVA_HW = 0, |
| 26 | WCNSS_PRONTO_HW, |
| 27 | }; |
| 28 | |
Sameer Thalappil | 409ed35 | 2011-12-07 10:53:31 -0800 | [diff] [blame] | 29 | struct wcnss_wlan_config { |
| 30 | int use_48mhz_xo; |
| 31 | }; |
| 32 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 33 | #define WCNSS_WLAN_IRQ_INVALID -1 |
| 34 | |
| 35 | struct device *wcnss_wlan_get_device(void); |
| 36 | struct resource *wcnss_wlan_get_memory_map(struct device *dev); |
| 37 | int wcnss_wlan_get_dxe_tx_irq(struct device *dev); |
| 38 | int wcnss_wlan_get_dxe_rx_irq(struct device *dev); |
| 39 | void wcnss_wlan_register_pm_ops(struct device *dev, |
| 40 | const struct dev_pm_ops *pm_ops); |
Sameer Thalappil | ecdd100 | 2011-09-09 10:52:27 -0700 | [diff] [blame] | 41 | void wcnss_wlan_unregister_pm_ops(struct device *dev, |
| 42 | const struct dev_pm_ops *pm_ops); |
Sameer Thalappil | a112bbc | 2012-05-23 12:20:32 -0700 | [diff] [blame] | 43 | void wcnss_register_thermal_mitigation(struct device *dev, |
| 44 | void (*tm_notify)(struct device *dev, int)); |
| 45 | void wcnss_unregister_thermal_mitigation( |
| 46 | void (*tm_notify)(struct device *dev, int)); |
Sameer Thalappil | 409ed35 | 2011-12-07 10:53:31 -0800 | [diff] [blame] | 47 | struct platform_device *wcnss_get_platform_device(void); |
| 48 | struct wcnss_wlan_config *wcnss_get_wlan_config(void); |
| 49 | int wcnss_wlan_power(struct device *dev, |
| 50 | struct wcnss_wlan_config *cfg, |
| 51 | enum wcnss_opcode opcode); |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame^] | 52 | int wcnss_req_power_on_lock(char *driver_name); |
| 53 | int wcnss_free_power_on_lock(char *driver_name); |
Jeff Johnson | 8b1f6d0 | 2012-02-03 20:43:26 -0800 | [diff] [blame] | 54 | unsigned int wcnss_get_serial_number(void); |
Sameer Thalappil | 13f4518 | 2012-07-23 18:02:45 -0700 | [diff] [blame] | 55 | void wcnss_flush_delayed_boot_votes(void); |
Sameer Thalappil | f138da5 | 2012-07-30 12:56:37 -0700 | [diff] [blame] | 56 | void wcnss_allow_suspend(void); |
| 57 | void wcnss_prevent_suspend(void); |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame^] | 58 | int wcnss_hardware_type(void); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 59 | #define wcnss_wlan_get_drvdata(dev) dev_get_drvdata(dev) |
| 60 | #define wcnss_wlan_set_drvdata(dev, data) dev_set_drvdata((dev), (data)) |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame^] | 61 | /* WLAN driver uses these names */ |
| 62 | #define req_riva_power_on_lock(name) wcnss_req_power_on_lock(name) |
| 63 | #define free_riva_power_on_lock(name) wcnss_free_power_on_lock(name) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 64 | |
| 65 | #endif /* _WCNSS_WLAN_H_ */ |