blob: 1c492f92528d4bf7fadb3cb7e82634ac4145082c [file] [log] [blame]
Jeff Johnson8b1f6d02012-02-03 20:43:26 -08001/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
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 Thalappil409ed352011-12-07 10:53:31 -080019enum wcnss_opcode {
20 WCNSS_WLAN_SWITCH_OFF = 0,
21 WCNSS_WLAN_SWITCH_ON,
22};
23
24struct wcnss_wlan_config {
25 int use_48mhz_xo;
26};
27
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070028#define WCNSS_WLAN_IRQ_INVALID -1
29
30struct device *wcnss_wlan_get_device(void);
31struct resource *wcnss_wlan_get_memory_map(struct device *dev);
32int wcnss_wlan_get_dxe_tx_irq(struct device *dev);
33int wcnss_wlan_get_dxe_rx_irq(struct device *dev);
34void wcnss_wlan_register_pm_ops(struct device *dev,
35 const struct dev_pm_ops *pm_ops);
Sameer Thalappilecdd1002011-09-09 10:52:27 -070036void wcnss_wlan_unregister_pm_ops(struct device *dev,
37 const struct dev_pm_ops *pm_ops);
Jeff Johnson61374652012-04-16 20:51:48 -070038void wcnss_register_thermal_mitigation(void (*tm_notify)(int));
39void wcnss_unregister_thermal_mitigation(void (*tm_notify)(int));
Sameer Thalappil409ed352011-12-07 10:53:31 -080040struct platform_device *wcnss_get_platform_device(void);
41struct wcnss_wlan_config *wcnss_get_wlan_config(void);
42int wcnss_wlan_power(struct device *dev,
43 struct wcnss_wlan_config *cfg,
44 enum wcnss_opcode opcode);
Sameer Thalappilaebc0d82012-01-01 11:45:38 -080045int req_riva_power_on_lock(char *driver_name);
46int free_riva_power_on_lock(char *driver_name);
Jeff Johnson8b1f6d02012-02-03 20:43:26 -080047unsigned int wcnss_get_serial_number(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070048#define wcnss_wlan_get_drvdata(dev) dev_get_drvdata(dev)
49#define wcnss_wlan_set_drvdata(dev, data) dev_set_drvdata((dev), (data))
50
51#endif /* _WCNSS_WLAN_H_ */