]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - include/linux/wl12xx.h
ath5k: set SURVEY_INFO_IN_USE on get_survey
[mirror_ubuntu-artful-kernel.git] / include / linux / wl12xx.h
CommitLineData
2f01a1f5
KV
1/*
2 * This file is part of wl12xx
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 *
4c5f7d7a 6 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
2f01a1f5
KV
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
c1f9a095
OBC
24#ifndef _LINUX_WL12XX_H
25#define _LINUX_WL12XX_H
2f01a1f5 26
6cc9efed
LC
27#include <linux/err.h>
28
62c7d085 29/* Reference clock values */
c8aea565 30enum {
d29633b4
IY
31 WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */
32 WL12XX_REFCLOCK_26 = 1, /* 26 MHz */
33 WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */
34 WL12XX_REFCLOCK_52 = 3, /* 52 MHz */
35 WL12XX_REFCLOCK_38_XTAL = 4, /* 38.4 MHz, XTAL */
36 WL12XX_REFCLOCK_26_XTAL = 5, /* 26 MHz, XTAL */
c8aea565
GK
37};
38
62c7d085
LC
39/* TCXO clock values */
40enum {
41 WL12XX_TCXOCLOCK_19_2 = 0, /* 19.2MHz */
42 WL12XX_TCXOCLOCK_26 = 1, /* 26 MHz */
43 WL12XX_TCXOCLOCK_38_4 = 2, /* 38.4MHz */
44 WL12XX_TCXOCLOCK_52 = 3, /* 52 MHz */
45 WL12XX_TCXOCLOCK_16_368 = 4, /* 16.368 MHz */
46 WL12XX_TCXOCLOCK_32_736 = 5, /* 32.736 MHz */
47 WL12XX_TCXOCLOCK_16_8 = 6, /* 16.8 MHz */
48 WL12XX_TCXOCLOCK_33_6 = 7, /* 33.6 MHz */
49};
50
2f01a1f5
KV
51struct wl12xx_platform_data {
52 void (*set_power)(bool enable);
a02a2956
GI
53 /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
54 int irq;
c95cf3d0 55 bool use_eeprom;
15cea993 56 int board_ref_clock;
62c7d085 57 int board_tcxo_clock;
341b7cde 58 unsigned long platform_quirks;
a390e85c 59 bool pwr_in_suspend;
2f01a1f5
KV
60};
61
341b7cde
IY
62/* Platform does not support level trigger interrupts */
63#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0)
64
6cc9efed 65#ifdef CONFIG_WILINK_PLATFORM_DATA
65836112 66
61ee7007 67int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
65836112 68
6cc9efed
LC
69struct wl12xx_platform_data *wl12xx_get_platform_data(void);
70
65836112
OBC
71#else
72
73static inline
74int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
75{
76 return -ENOSYS;
77}
78
6cc9efed
LC
79static inline
80struct wl12xx_platform_data *wl12xx_get_platform_data(void)
81{
82 return ERR_PTR(-ENODATA);
83}
65836112 84
6cc9efed 85#endif
61ee7007 86
2f01a1f5 87#endif