wlcore: move wl12xx_platform_data up and make it truly optional

The platform data is used not only by wlcore-based drivers, but also
by wl1251.  Move it up in the directory hierarchy to reflect this.

Additionally, make it truly optional.  At the moment, disabling
platform data while wl1251_sdio or wlcore_sdio are enabled doesn't
work, but it will be necessary when device tree support is
implemented.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Luciano Coelho
2013-01-25 12:05:34 +02:00
parent 06ab4058ea
commit 6cc9efed70
7 changed files with 29 additions and 18 deletions

View File

@@ -24,6 +24,8 @@
#ifndef _LINUX_WL12XX_H
#define _LINUX_WL12XX_H
#include <linux/err.h>
/* Reference clock values */
enum {
WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */
@@ -60,10 +62,12 @@ struct wl12xx_platform_data {
/* Platform does not support level trigger interrupts */
#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0)
#ifdef CONFIG_WL12XX_PLATFORM_DATA
#ifdef CONFIG_WILINK_PLATFORM_DATA
int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
struct wl12xx_platform_data *wl12xx_get_platform_data(void);
#else
static inline
@@ -72,8 +76,12 @@ int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
return -ENOSYS;
}
#endif
struct wl12xx_platform_data *wl12xx_get_platform_data(void);
static inline
struct wl12xx_platform_data *wl12xx_get_platform_data(void)
{
return ERR_PTR(-ENODATA);
}
#endif
#endif