aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax_cmc/wimax_i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wimax_cmc/wimax_i2c.h')
-rw-r--r--drivers/net/wimax_cmc/wimax_i2c.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/net/wimax_cmc/wimax_i2c.h b/drivers/net/wimax_cmc/wimax_i2c.h
new file mode 100644
index 0000000..cadd762
--- /dev/null
+++ b/drivers/net/wimax_cmc/wimax_i2c.h
@@ -0,0 +1,53 @@
+/**
+ * wimax_i2c.h
+ *
+ * EEPROM access functions
+ */
+#ifndef __WIMAX_I2C_H__
+#define __WIMAX_I2C_H__
+#include <linux/mutex.h>
+#define WIMAX_BOOTIMAGE_PATH "/system/etc/wimax_boot.bin"
+
+struct boot_image_data {
+ unsigned int size;
+ unsigned int address;
+ unsigned int offset;
+ struct mutex lock;
+ unsigned char *data;
+};
+
+/* Write WiMAX boot image to EEPROM */
+int eeprom_write_boot(void);
+
+/* Write HW rev to EEPROM */
+int eeprom_write_rev(void);
+
+/* Erase WiMAX certification */
+void eeprom_erase_cert(void);
+
+/* Check WiMAX cerification exist or not */
+int eeprom_check_cert(void);
+
+/* Check WiMAX calibration done or not */
+int eeprom_check_cal(void);
+
+/* Read WiMAX boot image */
+void eeprom_read_boot(void);
+
+/* Read entire EEPROM data */
+void eeprom_read_all(void);
+
+/* Erase entire EEPROM data */
+void eeprom_erase_all(void);
+
+#ifndef DRIVER_BIT_BANG
+
+/* Initialize i2c-gpio driver for eeprom*/
+int wmxeeprom_init(void);
+
+/* Remove the eeprom i2c-gpio driver */
+void wmxeeprom_exit(void);
+
+#endif
+
+#endif /* __WIMAX_I2C_H__ */