4 #include <linux/version.h>
5 #include <linux/firmware.h>
8 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
9 #define GET_INODE_FROM_FILEP(filp) \
10 (filp)->f_path.dentry->d_inode
12 #define GET_INODE_FROM_FILEP(filp) \
13 (filp)->f_dentry->d_inode
16 #define E_ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
19 int android_readwrite_file(const char *filename, char *rbuf, const char *wbuf, size_t length);
21 int android_request_firmware(const struct firmware **firmware_p, const char *name, struct device *device);
23 void android_release_firmware(const struct firmware *firmware);
26 #define INIT_CONF_FILE "init_data.conf"
27 #endif /* def INIT_DATA_CONF */
29 #define CONF_ATTR_LEN 24
30 #define CONF_VAL_LEN 3
31 #define MAX_ATTR_NUM 24
32 #define MAX_FIX_ATTR_NUM 16
33 #define MAX_BUF_LEN ((CONF_ATTR_LEN + CONF_VAL_LEN + 2) * MAX_ATTR_NUM + 2)
35 struct esp_init_table_elem {
36 char attr[CONF_ATTR_LEN];
41 int android_request_init_conf(void);
42 void fix_init_data(u8 *init_data_buf, int buf_size);
43 void show_init_buf(u8 *buf, int size);
48 #if defined(ANDROID) && defined(ESP_ANDROID_LOGGER)
49 extern int logger_write( const unsigned char prio,
50 const char __kernel * const tag,
51 const char __kernel * const fmt,