Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Device probe and register.
0004  *
0005  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
0006  * Copyright (c) 2010, ST-Ericsson
0007  * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
0008  * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
0009  */
0010 #ifndef WFX_MAIN_H
0011 #define WFX_MAIN_H
0012 
0013 #include <linux/device.h>
0014 #include <linux/gpio/consumer.h>
0015 
0016 #include "hif_api_general.h"
0017 
0018 struct wfx_dev;
0019 struct wfx_hwbus_ops;
0020 
0021 struct wfx_platform_data {
0022     /* Keyset and ".sec" extension will be appended to this string */
0023     const char *file_fw;
0024     const char *file_pds;
0025     struct gpio_desc *gpio_wakeup;
0026     /* if true HIF D_out is sampled on the rising edge of the clock (intended to be used in
0027      * 50Mhz SDIO)
0028      */
0029     bool use_rising_clk;
0030 };
0031 
0032 struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_data *pdata,
0033                 const struct wfx_hwbus_ops *hwbus_ops, void *hwbus_priv);
0034 
0035 int wfx_probe(struct wfx_dev *wdev);
0036 void wfx_release(struct wfx_dev *wdev);
0037 
0038 bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor);
0039 int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len);
0040 
0041 #endif