Kalle Valo | 2f01a1f | 2009-04-29 23:33:31 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of wl12xx |
| 3 | * |
| 4 | * Copyright (C) 2009 Nokia Corporation |
| 5 | * |
Kalle Valo | 4c5f7d7 | 2010-08-22 22:46:28 +0300 | [diff] [blame] | 6 | * Contact: Luciano Coelho <luciano.coelho@nokia.com> |
Kalle Valo | 2f01a1f | 2009-04-29 23:33:31 +0300 | [diff] [blame] | 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 | |
Ohad Ben-Cohen | c1f9a09 | 2010-09-16 13:16:02 +0200 | [diff] [blame] | 24 | #ifndef _LINUX_WL12XX_H |
| 25 | #define _LINUX_WL12XX_H |
Kalle Valo | 2f01a1f | 2009-04-29 23:33:31 +0300 | [diff] [blame] | 26 | |
Luciano Coelho | 6cc9efe | 2013-01-25 12:05:34 +0200 | [diff] [blame] | 27 | #include <linux/err.h> |
| 28 | |
Luciano Coelho | 946651c | 2014-02-15 00:05:52 +0100 | [diff] [blame] | 29 | struct wl1251_platform_data { |
Sebastian Reichel | 1d207cd | 2014-02-15 00:05:53 +0100 | [diff] [blame] | 30 | int power_gpio; |
Grazvydas Ignotas | a02a295 | 2010-04-16 13:22:12 +0300 | [diff] [blame] | 31 | /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ |
| 32 | int irq; |
David-John Willis | c95cf3d0 | 2009-11-17 18:50:09 +0200 | [diff] [blame] | 33 | bool use_eeprom; |
Luciano Coelho | 946651c | 2014-02-15 00:05:52 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
Luciano Coelho | 6cc9efe | 2013-01-25 12:05:34 +0200 | [diff] [blame] | 36 | #ifdef CONFIG_WILINK_PLATFORM_DATA |
Ohad Ben-Cohen | 6583611 | 2010-09-28 20:20:28 +0200 | [diff] [blame] | 37 | |
Luciano Coelho | 946651c | 2014-02-15 00:05:52 +0100 | [diff] [blame] | 38 | int wl1251_set_platform_data(const struct wl1251_platform_data *data); |
| 39 | |
| 40 | struct wl1251_platform_data *wl1251_get_platform_data(void); |
| 41 | |
Ohad Ben-Cohen | 6583611 | 2010-09-28 20:20:28 +0200 | [diff] [blame] | 42 | #else |
| 43 | |
| 44 | static inline |
Luciano Coelho | 946651c | 2014-02-15 00:05:52 +0100 | [diff] [blame] | 45 | int wl1251_set_platform_data(const struct wl1251_platform_data *data) |
| 46 | { |
| 47 | return -ENOSYS; |
| 48 | } |
| 49 | |
| 50 | static inline |
| 51 | struct wl1251_platform_data *wl1251_get_platform_data(void) |
| 52 | { |
| 53 | return ERR_PTR(-ENODATA); |
| 54 | } |
| 55 | |
Luciano Coelho | 6cc9efe | 2013-01-25 12:05:34 +0200 | [diff] [blame] | 56 | #endif |
Ohad Ben-Cohen | 61ee700 | 2010-09-16 01:31:12 +0200 | [diff] [blame] | 57 | |
Kalle Valo | 2f01a1f | 2009-04-29 23:33:31 +0300 | [diff] [blame] | 58 | #endif |