18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef B43_SDIO_H_
38c2ecf20Sopenharmony_ci#define B43_SDIO_H_
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/ssb/ssb.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cistruct b43_wldev;
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifdef CONFIG_B43_SDIO
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cistruct b43_sdio {
138c2ecf20Sopenharmony_ci	struct ssb_bus ssb;
148c2ecf20Sopenharmony_ci	void *irq_handler_opaque;
158c2ecf20Sopenharmony_ci	void (*irq_handler)(struct b43_wldev *dev);
168c2ecf20Sopenharmony_ci};
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciint b43_sdio_request_irq(struct b43_wldev *dev,
198c2ecf20Sopenharmony_ci			 void (*handler)(struct b43_wldev *dev));
208c2ecf20Sopenharmony_civoid b43_sdio_free_irq(struct b43_wldev *dev);
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciint b43_sdio_init(void);
238c2ecf20Sopenharmony_civoid b43_sdio_exit(void);
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#else /* CONFIG_B43_SDIO */
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_cistatic inline int b43_sdio_request_irq(struct b43_wldev *dev,
308c2ecf20Sopenharmony_ci			 void (*handler)(struct b43_wldev *dev))
318c2ecf20Sopenharmony_ci{
328c2ecf20Sopenharmony_ci	return -ENODEV;
338c2ecf20Sopenharmony_ci}
348c2ecf20Sopenharmony_cistatic inline void b43_sdio_free_irq(struct b43_wldev *dev)
358c2ecf20Sopenharmony_ci{
368c2ecf20Sopenharmony_ci}
378c2ecf20Sopenharmony_cistatic inline int b43_sdio_init(void)
388c2ecf20Sopenharmony_ci{
398c2ecf20Sopenharmony_ci	return 0;
408c2ecf20Sopenharmony_ci}
418c2ecf20Sopenharmony_cistatic inline void b43_sdio_exit(void)
428c2ecf20Sopenharmony_ci{
438c2ecf20Sopenharmony_ci}
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#endif /* CONFIG_B43_SDIO */
468c2ecf20Sopenharmony_ci#endif /* B43_SDIO_H_ */
47