diff options
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g/pmu-target.h')
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/pmu-target.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/pmu-target.h b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h index 5552e2196a..d33db42717 100644 --- a/firmware/target/arm/s5l8702/ipod6g/pmu-target.h +++ b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __PMU_TARGET_H__ | 22 | #ifndef __PMU_TARGET_H__ |
23 | #define __PMU_TARGET_H__ | 23 | #define __PMU_TARGET_H__ |
24 | 24 | ||
25 | #include <stdint.h> | ||
25 | #include <stdbool.h> | 26 | #include <stdbool.h> |
26 | #include "config.h" | 27 | #include "config.h" |
27 | 28 | ||
@@ -72,14 +73,22 @@ enum pcf50635_reg_gpiostat { | |||
72 | * GPIO3: output, unknown | 73 | * GPIO3: output, unknown |
73 | */ | 74 | */ |
74 | 75 | ||
76 | struct pmu_adc_channel | ||
77 | { | ||
78 | const char *name; | ||
79 | uint8_t adcc1; | ||
80 | uint8_t adcc2; | ||
81 | uint8_t adcc3; | ||
82 | uint8_t bias_dly; /* RB ticks */ | ||
83 | }; | ||
75 | 84 | ||
76 | unsigned char pmu_read(int address); | 85 | unsigned char pmu_read(int address); |
77 | int pmu_write(int address, unsigned char val); | 86 | int pmu_write(int address, unsigned char val); |
78 | int pmu_read_multiple(int address, int count, unsigned char* buffer); | 87 | int pmu_read_multiple(int address, int count, unsigned char* buffer); |
79 | int pmu_write_multiple(int address, int count, unsigned char* buffer); | 88 | int pmu_write_multiple(int address, int count, unsigned char* buffer); |
80 | int pmu_read_adc(unsigned int adc); | 89 | unsigned short pmu_read_adc(const struct pmu_adc_channel *ch); |
81 | int pmu_read_battery_voltage(void); | 90 | unsigned short pmu_adc_raw2mv( |
82 | int pmu_read_battery_current(void); | 91 | const struct pmu_adc_channel *ch, unsigned short raw); |
83 | void pmu_init(void); | 92 | void pmu_init(void); |
84 | void pmu_ldo_on_in_standby(unsigned int ldo, int onoff); | 93 | void pmu_ldo_on_in_standby(unsigned int ldo, int onoff); |
85 | void pmu_ldo_set_voltage(unsigned int ldo, unsigned char voltage); | 94 | void pmu_ldo_set_voltage(unsigned int ldo, unsigned char voltage); |