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