aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-07-04 11:18:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2012-07-25 13:33:56 +0100
commitdb070669d92cbd0ed39fb14effef3dcbd5bdd852 (patch)
treef536abb12524b34ee2240bee9708953512299586 /hw/i2c.h
parentc74aac7f8e802f31be8c4306317fd920e0f3bd91 (diff)
Add triton2 (twl4030) driver
The swiss knife companion chip for omap3 includes change from Loïc Minier <lool@dooz.org>: twl4030: Add PWMB OFF and ON regs twl4030: add SW2 conversion channels includes change from PMM: add dummy BCISIHCTRL includes change from Riku: add carkit analog control registers includes change from Riku: add rtc alarm and periodic interrupts includes: twl4030: add callback for providing madc results Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> Signed-off-by: Riku Voipo <riku.voipio@nokia.com> Signed-off-by: Loïc Minier <lool@dooz.org>
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) { \