blob: 03d61f1d23abd9f439b037d7893104b883fbe4f6 [file] [log] [blame]
Thomas Gleixner2b27bdc2019-05-29 16:57:50 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Kalle Valo2f01a1f2009-04-29 23:33:31 +03002/*
3 * This file is part of wl12xx
4 *
5 * Copyright (C) 2009 Nokia Corporation
6 *
Kalle Valo4c5f7d72010-08-22 22:46:28 +03007 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
Kalle Valo2f01a1f2009-04-29 23:33:31 +03008 */
9
Ohad Ben-Cohenc1f9a092010-09-16 13:16:02 +020010#ifndef _LINUX_WL12XX_H
11#define _LINUX_WL12XX_H
Kalle Valo2f01a1f2009-04-29 23:33:31 +030012
Luciano Coelho6cc9efe2013-01-25 12:05:34 +020013#include <linux/err.h>
14
Luciano Coelho946651c2014-02-15 00:05:52 +010015struct wl1251_platform_data {
Sebastian Reichel1d207cd2014-02-15 00:05:53 +010016 int power_gpio;
Grazvydas Ignotasa02a2952010-04-16 13:22:12 +030017 /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
18 int irq;
David-John Willisc95cf3d02009-11-17 18:50:09 +020019 bool use_eeprom;
Luciano Coelho946651c2014-02-15 00:05:52 +010020};
21
Luciano Coelho6cc9efe2013-01-25 12:05:34 +020022#ifdef CONFIG_WILINK_PLATFORM_DATA
Ohad Ben-Cohen65836112010-09-28 20:20:28 +020023
Luciano Coelho946651c2014-02-15 00:05:52 +010024int wl1251_set_platform_data(const struct wl1251_platform_data *data);
25
26struct wl1251_platform_data *wl1251_get_platform_data(void);
27
Ohad Ben-Cohen65836112010-09-28 20:20:28 +020028#else
29
30static inline
Luciano Coelho946651c2014-02-15 00:05:52 +010031int wl1251_set_platform_data(const struct wl1251_platform_data *data)
32{
33 return -ENOSYS;
34}
35
36static inline
37struct wl1251_platform_data *wl1251_get_platform_data(void)
38{
39 return ERR_PTR(-ENODATA);
40}
41
Luciano Coelho6cc9efe2013-01-25 12:05:34 +020042#endif
Ohad Ben-Cohen61ee7002010-09-16 01:31:12 +020043
Kalle Valo2f01a1f2009-04-29 23:33:31 +030044#endif