aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i2c.h')
-rw-r--r--hw/i2c.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/i2c.h b/hw/i2c.h
index 0f5682b4b0..6a90334204 100644
--- a/hw/i2c.h
+++ b/hw/i2c.h
@@ -79,6 +79,25 @@ void tmp105_set(I2CSlave *i2c, int temp);
/* lm832x.c */
void lm832x_key_event(DeviceState *dev, int key, int state);
+/* twl4030.c */
+typedef struct {
+ int code;
+ int column;
+ int row;
+} TWL4030KeyMap;
+typedef enum twl4030_adc_type {
+ TWL4030_ADC_RT,
+ TWL4030_ADC_GP,
+ TWL4030_ADC_BCI
+} twl4030_adc_type;
+typedef uint16_t (*twl4030_madc_callback)(twl4030_adc_type type, int ch);
+void *twl4030_init(i2c_bus *bus, qemu_irq irq1, qemu_irq irq2,
+ const TWL4030KeyMap *keymap);
+void *twl5031_init(i2c_bus *bus, qemu_irq irq1, qemu_irq irq2,
+ const TWL4030KeyMap *keymap);
+void twl4030_set_powerbutton_state(void *opaque, int pressed);
+void twl4030_madc_attach(void *opaque, twl4030_madc_callback cb);
+
extern const VMStateDescription vmstate_i2c_slave;
#define VMSTATE_I2C_SLAVE(_field, _state) { \