summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/drivers/net/wireless/eagle/esp_android.h
diff options
context:
space:
mode:
authorKevin2014-11-15 10:00:36 +0800
committerKevin2014-11-15 10:00:36 +0800
commit9d40ac5867b9aefe0722bc1f110b965ff294d30d (patch)
treede942df665fac4bac0d9cb7ae86910fe937b0c1a /ANDROID_3.4.5/drivers/net/wireless/eagle/esp_android.h
parent392e8802486cb573b916e746010e141a75f507e6 (diff)
downloadFOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.tar.gz
FOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.tar.bz2
FOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.zip
add via modify part source code for wm8880 4.4 kitkat
Diffstat (limited to 'ANDROID_3.4.5/drivers/net/wireless/eagle/esp_android.h')
-rwxr-xr-xANDROID_3.4.5/drivers/net/wireless/eagle/esp_android.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/ANDROID_3.4.5/drivers/net/wireless/eagle/esp_android.h b/ANDROID_3.4.5/drivers/net/wireless/eagle/esp_android.h
new file mode 100755
index 00000000..ddd9a7de
--- /dev/null
+++ b/ANDROID_3.4.5/drivers/net/wireless/eagle/esp_android.h
@@ -0,0 +1,56 @@
+#ifndef _ESP_ANDROID_H
+#define _ESP_ANDROID_H
+
+#include <linux/version.h>
+#include <linux/firmware.h>
+
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+#define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_path.dentry->d_inode
+#else
+#define GET_INODE_FROM_FILEP(filp) \
+ (filp)->f_dentry->d_inode
+#endif
+
+#define E_ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+
+#ifdef ANDROID
+int android_readwrite_file(const char *filename, char *rbuf, const char *wbuf, size_t length);
+
+int android_request_firmware(const struct firmware **firmware_p, const char *name, struct device *device);
+
+void android_release_firmware(const struct firmware *firmware);
+
+#ifdef INIT_DATA_CONF
+#define INIT_CONF_FILE "init_data.conf"
+#endif /* def INIT_DATA_CONF */
+
+#define CONF_ATTR_LEN 24
+#define CONF_VAL_LEN 3
+#define MAX_ATTR_NUM 24
+#define MAX_FIX_ATTR_NUM 16
+#define MAX_BUF_LEN ((CONF_ATTR_LEN + CONF_VAL_LEN + 2) * MAX_ATTR_NUM + 2)
+
+struct esp_init_table_elem {
+ char attr[CONF_ATTR_LEN];
+ int offset;
+ short value;
+};
+
+int android_request_init_conf(void);
+void fix_init_data(u8 *init_data_buf, int buf_size);
+void show_init_buf(u8 *buf, int size);
+
+
+#endif
+
+#if defined(ANDROID) && defined(ESP_ANDROID_LOGGER)
+extern int logger_write( const unsigned char prio,
+ const char __kernel * const tag,
+ const char __kernel * const fmt,
+ ...);
+
+
+#endif // ANDROID
+#endif