Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
twl.h File Reference
#include <linux/types.h>
#include <linux/input/matrix_keypad.h>

Go to the source code of this file.

Data Structures

struct  twl4030_clock_init_data
 
struct  twl4030_bci_platform_data
 
struct  twl4030_gpio_platform_data
 
struct  twl4030_madc_platform_data
 
struct  twl4030_keypad_data
 
struct  twl4030_usb_data
 
struct  twl4030_ins
 
struct  twl4030_script
 
struct  twl4030_resconfig
 
struct  twl4030_power_data
 
struct  twl4030_codec_data
 
struct  twl4030_vibra_data
 
struct  twl4030_audio_data
 
struct  twl4030_platform_data
 
struct  twl_regulator_driver_data
 

Macros

#define TWL4030_MODULE_USB   0x00
 
#define TWL4030_MODULE_AUDIO_VOICE   0x01
 
#define TWL4030_MODULE_GPIO   0x02
 
#define TWL4030_MODULE_INTBR   0x03
 
#define TWL4030_MODULE_PIH   0x04
 
#define TWL4030_MODULE_TEST   0x05
 
#define TWL4030_MODULE_KEYPAD   0x06
 
#define TWL4030_MODULE_MADC   0x07
 
#define TWL4030_MODULE_INTERRUPTS   0x08
 
#define TWL4030_MODULE_LED   0x09
 
#define TWL4030_MODULE_MAIN_CHARGE   0x0A
 
#define TWL4030_MODULE_PRECHARGE   0x0B
 
#define TWL4030_MODULE_PWM0   0x0C
 
#define TWL4030_MODULE_PWM1   0x0D
 
#define TWL4030_MODULE_PWMA   0x0E
 
#define TWL4030_MODULE_PWMB   0x0F
 
#define TWL5031_MODULE_ACCESSORY   0x10
 
#define TWL5031_MODULE_INTERRUPTS   0x11
 
#define TWL4030_MODULE_BACKUP   0x12
 
#define TWL4030_MODULE_INT   0x13
 
#define TWL4030_MODULE_PM_MASTER   0x14
 
#define TWL4030_MODULE_PM_RECEIVER   0x15
 
#define TWL4030_MODULE_RTC   0x16
 
#define TWL4030_MODULE_SECURED_REG   0x17
 
#define TWL_MODULE_USB   TWL4030_MODULE_USB
 
#define TWL_MODULE_AUDIO_VOICE   TWL4030_MODULE_AUDIO_VOICE
 
#define TWL_MODULE_PIH   TWL4030_MODULE_PIH
 
#define TWL_MODULE_MADC   TWL4030_MODULE_MADC
 
#define TWL_MODULE_MAIN_CHARGE   TWL4030_MODULE_MAIN_CHARGE
 
#define TWL_MODULE_PM_MASTER   TWL4030_MODULE_PM_MASTER
 
#define TWL_MODULE_PM_RECEIVER   TWL4030_MODULE_PM_RECEIVER
 
#define TWL_MODULE_RTC   TWL4030_MODULE_RTC
 
#define TWL_MODULE_PWM   TWL4030_MODULE_PWM0
 
#define TWL6030_MODULE_ID0   0x0D
 
#define TWL6030_MODULE_ID1   0x0E
 
#define TWL6030_MODULE_ID2   0x0F
 
#define GPIO_INTR_OFFSET   0
 
#define KEYPAD_INTR_OFFSET   1
 
#define BCI_INTR_OFFSET   2
 
#define MADC_INTR_OFFSET   3
 
#define USB_INTR_OFFSET   4
 
#define CHARGERFAULT_INTR_OFFSET   5
 
#define BCI_PRES_INTR_OFFSET   9
 
#define USB_PRES_INTR_OFFSET   10
 
#define RTC_INTR_OFFSET   11
 
#define PWR_INTR_OFFSET   0
 
#define HOTDIE_INTR_OFFSET   12
 
#define SMPSLDO_INTR_OFFSET   13
 
#define BATDETECT_INTR_OFFSET   14
 
#define SIMDETECT_INTR_OFFSET   15
 
#define MMCDETECT_INTR_OFFSET   16
 
#define GASGAUGE_INTR_OFFSET   17
 
#define USBOTG_INTR_OFFSET   4
 
#define CHARGER_INTR_OFFSET   2
 
#define RSV_INTR_OFFSET   0
 
#define REG_INT_STS_A   0x00
 
#define REG_INT_STS_B   0x01
 
#define REG_INT_STS_C   0x02
 
#define REG_INT_MSK_LINE_A   0x03
 
#define REG_INT_MSK_LINE_B   0x04
 
#define REG_INT_MSK_LINE_C   0x05
 
#define REG_INT_MSK_STS_A   0x06
 
#define REG_INT_MSK_STS_B   0x07
 
#define REG_INT_MSK_STS_C   0x08
 
#define TWL6030_PWR_INT_MASK   0x07
 
#define TWL6030_RTC_INT_MASK   0x18
 
#define TWL6030_HOTDIE_INT_MASK   0x20
 
#define TWL6030_SMPSLDOA_INT_MASK   0xC0
 
#define TWL6030_SMPSLDOB_INT_MASK   0x01
 
#define TWL6030_BATDETECT_INT_MASK   0x02
 
#define TWL6030_SIMDETECT_INT_MASK   0x04
 
#define TWL6030_MMCDETECT_INT_MASK   0x08
 
#define TWL6030_GPADC_INT_MASK   0x60
 
#define TWL6030_GASGAUGE_INT_MASK   0x80
 
#define TWL6030_USBOTG_INT_MASK   0x0F
 
#define TWL6030_CHARGER_CTRL_INT_MASK   0x10
 
#define TWL6030_CHARGER_FAULT_INT_MASK   0x60
 
#define TWL6030_MMCCTRL   0xEE
 
#define VMMC_AUTO_OFF   (0x1 << 3)
 
#define SW_FC   (0x1 << 2)
 
#define STS_MMC   0x1
 
#define TWL6030_CFG_INPUT_PUPD3   0xF2
 
#define MMC_PU   (0x1 << 3)
 
#define MMC_PD   (0x1 << 2)
 
#define TWL_SIL_TYPE(rev)   ((rev) & 0x00FFFFFF)
 
#define TWL_SIL_REV(rev)   ((rev) >> 24)
 
#define TWL_SIL_5030   0x09002F
 
#define TWL5030_REV_1_0   0x00
 
#define TWL5030_REV_1_1   0x10
 
#define TWL5030_REV_1_2   0x30
 
#define TWL4030_CLASS_ID   0x4030
 
#define TWL6030_CLASS_ID   0x6030
 
#define GET_TWL_REV   (twl_rev())
 
#define TWL_CLASS_IS(class, id)
 
#define TWL4030_SIH_CTRL_EXCLEN_MASK   BIT(0)
 
#define TWL4030_SIH_CTRL_PENDDIS_MASK   BIT(1)
 
#define TWL4030_SIH_CTRL_COR_MASK   BIT(2)
 
#define REG_GPIODATAIN1   0x0
 
#define REG_GPIODATAIN2   0x1
 
#define REG_GPIODATAIN3   0x2
 
#define REG_GPIODATADIR1   0x3
 
#define REG_GPIODATADIR2   0x4
 
#define REG_GPIODATADIR3   0x5
 
#define REG_GPIODATAOUT1   0x6
 
#define REG_GPIODATAOUT2   0x7
 
#define REG_GPIODATAOUT3   0x8
 
#define REG_CLEARGPIODATAOUT1   0x9
 
#define REG_CLEARGPIODATAOUT2   0xA
 
#define REG_CLEARGPIODATAOUT3   0xB
 
#define REG_SETGPIODATAOUT1   0xC
 
#define REG_SETGPIODATAOUT2   0xD
 
#define REG_SETGPIODATAOUT3   0xE
 
#define REG_GPIO_DEBEN1   0xF
 
#define REG_GPIO_DEBEN2   0x10
 
#define REG_GPIO_DEBEN3   0x11
 
#define REG_GPIO_CTRL   0x12
 
#define REG_GPIOPUPDCTR1   0x13
 
#define REG_GPIOPUPDCTR2   0x14
 
#define REG_GPIOPUPDCTR3   0x15
 
#define REG_GPIOPUPDCTR4   0x16
 
#define REG_GPIOPUPDCTR5   0x17
 
#define REG_GPIO_ISR1A   0x19
 
#define REG_GPIO_ISR2A   0x1A
 
#define REG_GPIO_ISR3A   0x1B
 
#define REG_GPIO_IMR1A   0x1C
 
#define REG_GPIO_IMR2A   0x1D
 
#define REG_GPIO_IMR3A   0x1E
 
#define REG_GPIO_ISR1B   0x1F
 
#define REG_GPIO_ISR2B   0x20
 
#define REG_GPIO_ISR3B   0x21
 
#define REG_GPIO_IMR1B   0x22
 
#define REG_GPIO_IMR2B   0x23
 
#define REG_GPIO_IMR3B   0x24
 
#define REG_GPIO_EDR1   0x28
 
#define REG_GPIO_EDR2   0x29
 
#define REG_GPIO_EDR3   0x2A
 
#define REG_GPIO_EDR4   0x2B
 
#define REG_GPIO_EDR5   0x2C
 
#define REG_GPIO_SIH_CTRL   0x2D
 
#define TWL4030_GPIO_MAX   18
 
#define REG_IDCODE_7_0   0x00
 
#define REG_IDCODE_15_8   0x01
 
#define REG_IDCODE_16_23   0x02
 
#define REG_IDCODE_31_24   0x03
 
#define REG_GPPUPDCTR1   0x0F
 
#define REG_UNLOCK_TEST_REG   0x12
 
#define I2C_SCL_CTRL_PU   BIT(0)
 
#define I2C_SDA_CTRL_PU   BIT(2)
 
#define SR_I2C_SCL_CTRL_PU   BIT(4)
 
#define SR_I2C_SDA_CTRL_PU   BIT(6)
 
#define TWL_EEPROM_R_UNLOCK   0x49
 
#define TWL4030_KEYPAD_KEYP_ISR1   0x11
 
#define TWL4030_KEYPAD_KEYP_IMR1   0x12
 
#define TWL4030_KEYPAD_KEYP_ISR2   0x13
 
#define TWL4030_KEYPAD_KEYP_IMR2   0x14
 
#define TWL4030_KEYPAD_KEYP_SIR   0x15 /* test register */
 
#define TWL4030_KEYPAD_KEYP_EDR   0x16
 
#define TWL4030_KEYPAD_KEYP_SIH_CTRL   0x17
 
#define TWL4030_MADC_ISR1   0x61
 
#define TWL4030_MADC_IMR1   0x62
 
#define TWL4030_MADC_ISR2   0x63
 
#define TWL4030_MADC_IMR2   0x64
 
#define TWL4030_MADC_SIR   0x65 /* test register */
 
#define TWL4030_MADC_EDR   0x66
 
#define TWL4030_MADC_SIH_CTRL   0x67
 
#define TWL4030_INTERRUPTS_BCIISR1A   0x0
 
#define TWL4030_INTERRUPTS_BCIISR2A   0x1
 
#define TWL4030_INTERRUPTS_BCIIMR1A   0x2
 
#define TWL4030_INTERRUPTS_BCIIMR2A   0x3
 
#define TWL4030_INTERRUPTS_BCIISR1B   0x4
 
#define TWL4030_INTERRUPTS_BCIISR2B   0x5
 
#define TWL4030_INTERRUPTS_BCIIMR1B   0x6
 
#define TWL4030_INTERRUPTS_BCIIMR2B   0x7
 
#define TWL4030_INTERRUPTS_BCISIR1   0x8 /* test register */
 
#define TWL4030_INTERRUPTS_BCISIR2   0x9 /* test register */
 
#define TWL4030_INTERRUPTS_BCIEDR1   0xa
 
#define TWL4030_INTERRUPTS_BCIEDR2   0xb
 
#define TWL4030_INTERRUPTS_BCIEDR3   0xc
 
#define TWL4030_INTERRUPTS_BCISIHCTRL   0xd
 
#define TWL4030_INT_PWR_ISR1   0x0
 
#define TWL4030_INT_PWR_IMR1   0x1
 
#define TWL4030_INT_PWR_ISR2   0x2
 
#define TWL4030_INT_PWR_IMR2   0x3
 
#define TWL4030_INT_PWR_SIR   0x4 /* test register */
 
#define TWL4030_INT_PWR_EDR1   0x5
 
#define TWL4030_INT_PWR_EDR2   0x6
 
#define TWL4030_INT_PWR_SIH_CTRL   0x7
 
#define TWL5031_ACIIMR_LSB   0x05
 
#define TWL5031_ACIIMR_MSB   0x06
 
#define TWL5031_ACIIDR_LSB   0x07
 
#define TWL5031_ACIIDR_MSB   0x08
 
#define TWL5031_ACCISR1   0x0F
 
#define TWL5031_ACCIMR1   0x10
 
#define TWL5031_ACCISR2   0x11
 
#define TWL5031_ACCIMR2   0x12
 
#define TWL5031_ACCSIR   0x13
 
#define TWL5031_ACCEDR1   0x14
 
#define TWL5031_ACCSIHCTRL   0x15
 
#define TWL5031_INTERRUPTS_BCIISR1   0x0
 
#define TWL5031_INTERRUPTS_BCIIMR1   0x1
 
#define TWL5031_INTERRUPTS_BCIISR2   0x2
 
#define TWL5031_INTERRUPTS_BCIIMR2   0x3
 
#define TWL5031_INTERRUPTS_BCISIR   0x4
 
#define TWL5031_INTERRUPTS_BCIEDR1   0x5
 
#define TWL5031_INTERRUPTS_BCIEDR2   0x6
 
#define TWL5031_INTERRUPTS_BCISIHCTRL   0x7
 
#define TWL4030_PM_MASTER_CFG_P1_TRANSITION   0x00
 
#define TWL4030_PM_MASTER_CFG_P2_TRANSITION   0x01
 
#define TWL4030_PM_MASTER_CFG_P3_TRANSITION   0x02
 
#define TWL4030_PM_MASTER_CFG_P123_TRANSITION   0x03
 
#define TWL4030_PM_MASTER_STS_BOOT   0x04
 
#define TWL4030_PM_MASTER_CFG_BOOT   0x05
 
#define TWL4030_PM_MASTER_SHUNDAN   0x06
 
#define TWL4030_PM_MASTER_BOOT_BCI   0x07
 
#define TWL4030_PM_MASTER_CFG_PWRANA1   0x08
 
#define TWL4030_PM_MASTER_CFG_PWRANA2   0x09
 
#define TWL4030_PM_MASTER_BACKUP_MISC_STS   0x0b
 
#define TWL4030_PM_MASTER_BACKUP_MISC_CFG   0x0c
 
#define TWL4030_PM_MASTER_BACKUP_MISC_TST   0x0d
 
#define TWL4030_PM_MASTER_PROTECT_KEY   0x0e
 
#define TWL4030_PM_MASTER_STS_HW_CONDITIONS   0x0f
 
#define TWL4030_PM_MASTER_P1_SW_EVENTS   0x10
 
#define TWL4030_PM_MASTER_P2_SW_EVENTS   0x11
 
#define TWL4030_PM_MASTER_P3_SW_EVENTS   0x12
 
#define TWL4030_PM_MASTER_STS_P123_STATE   0x13
 
#define TWL4030_PM_MASTER_PB_CFG   0x14
 
#define TWL4030_PM_MASTER_PB_WORD_MSB   0x15
 
#define TWL4030_PM_MASTER_PB_WORD_LSB   0x16
 
#define TWL4030_PM_MASTER_SEQ_ADD_W2P   0x1c
 
#define TWL4030_PM_MASTER_SEQ_ADD_P2A   0x1d
 
#define TWL4030_PM_MASTER_SEQ_ADD_A2W   0x1e
 
#define TWL4030_PM_MASTER_SEQ_ADD_A2S   0x1f
 
#define TWL4030_PM_MASTER_SEQ_ADD_S2A12   0x20
 
#define TWL4030_PM_MASTER_SEQ_ADD_S2A3   0x21
 
#define TWL4030_PM_MASTER_SEQ_ADD_WARM   0x22
 
#define TWL4030_PM_MASTER_MEMORY_ADDRESS   0x23
 
#define TWL4030_PM_MASTER_MEMORY_DATA   0x24
 
#define TWL4030_PM_MASTER_KEY_CFG1   0xc0
 
#define TWL4030_PM_MASTER_KEY_CFG2   0x0c
 
#define TWL4030_PM_MASTER_KEY_TST1   0xe0
 
#define TWL4030_PM_MASTER_KEY_TST2   0x0e
 
#define TWL4030_PM_MASTER_GLOBAL_TST   0xb6
 
#define DEV_GRP_NULL   0x0
 
#define DEV_GRP_P1   0x1 /* P1: all OMAP devices */
 
#define DEV_GRP_P2   0x2 /* P2: all Modem devices */
 
#define DEV_GRP_P3   0x4 /* P3: all peripheral devices */
 
#define RES_GRP_RES   0x0 /* Reserved */
 
#define RES_GRP_PP   0x1 /* Power providers */
 
#define RES_GRP_RC   0x2 /* Reset and control */
 
#define RES_GRP_PP_RC   0x3
 
#define RES_GRP_PR   0x4 /* Power references */
 
#define RES_GRP_PP_PR   0x5
 
#define RES_GRP_RC_PR   0x6
 
#define RES_GRP_ALL   0x7 /* All resource groups */
 
#define RES_TYPE2_R0   0x0
 
#define RES_TYPE_ALL   0x7
 
#define RES_STATE_WRST   0xF
 
#define RES_STATE_ACTIVE   0xE
 
#define RES_STATE_SLEEP   0x8
 
#define RES_STATE_OFF   0x0
 
#define RES_VAUX1   1
 
#define RES_VAUX2   2
 
#define RES_VAUX3   3
 
#define RES_VAUX4   4
 
#define RES_VMMC1   5
 
#define RES_VMMC2   6
 
#define RES_VPLL1   7
 
#define RES_VPLL2   8
 
#define RES_VSIM   9
 
#define RES_VDAC   10
 
#define RES_VINTANA1   11
 
#define RES_VINTANA2   12
 
#define RES_VINTDIG   13
 
#define RES_VIO   14
 
#define RES_VDD1   15
 
#define RES_VDD2   16
 
#define RES_VUSB_1V5   17
 
#define RES_VUSB_1V8   18
 
#define RES_VUSB_3V1   19
 
#define RES_VUSBCP   20
 
#define RES_REGEN   21
 
#define RES_NRES_PWRON   22
 
#define RES_CLKEN   23
 
#define RES_SYSEN   24
 
#define RES_HFCLKOUT   25
 
#define RES_32KCLKOUT   26
 
#define RES_RESET   27
 
#define RES_MAIN_REF   28
 
#define TOTAL_RESOURCES   28
 
#define MSG_BROADCAST(devgrp, grp, type, type2, state)
 
#define MSG_SINGULAR(devgrp, id, state)   ((devgrp) << 13 | 0 << 12 | (id) << 4 | (state))
 
#define MSG_BROADCAST_ALL(devgrp, state)   ((devgrp) << 5 | (state))
 
#define MSG_BROADCAST_REF   MSG_BROADCAST_ALL
 
#define MSG_BROADCAST_PROV   MSG_BROADCAST_ALL
 
#define MSG_BROADCAST__CLK_RST   MSG_BROADCAST_ALL
 
#define PERSISTENT_KEY(r, c)   KEY((r), (c), KEY_RESERVED)
 
#define TWL4030_WRST_SCRIPT   (1<<0)
 
#define TWL4030_WAKEUP12_SCRIPT   (1<<1)
 
#define TWL4030_WAKEUP3_SCRIPT   (1<<2)
 
#define TWL4030_SLEEP_SCRIPT   (1<<3)
 
#define TWL4030_RESCONFIG_UNDEF   ((u8)-1)
 
#define TWL4030_VAUX2   BIT(0) /* pre-5030 voltage ranges */
 
#define TPS_SUBSET   BIT(1) /* tps659[23]0 have fewer LDOs */
 
#define TWL5031   BIT(2) /* twl5031 has different registers */
 
#define TWL6030_CLASS   BIT(3) /* TWL6030 class */
 
#define TWL6025_SUBCLASS   BIT(4) /* TWL6025 has changed registers */
 
#define TWL4030_ALLOW_UNSUPPORTED
 
#define TWL4030_VDAC_DEV_GRP   0x3B
 
#define TWL4030_VDAC_DEDICATED   0x3E
 
#define TWL4030_VAUX1_DEV_GRP   0x17
 
#define TWL4030_VAUX1_DEDICATED   0x1A
 
#define TWL4030_VAUX2_DEV_GRP   0x1B
 
#define TWL4030_VAUX2_DEDICATED   0x1E
 
#define TWL4030_VAUX3_DEV_GRP   0x1F
 
#define TWL4030_VAUX3_DEDICATED   0x22
 
#define TWL4030_REG_VDD1   0
 
#define TWL4030_REG_VDD2   1
 
#define TWL4030_REG_VIO   2
 
#define TWL4030_REG_VDAC   3
 
#define TWL4030_REG_VPLL1   4
 
#define TWL4030_REG_VPLL2   5 /* not on all chips */
 
#define TWL4030_REG_VMMC1   6
 
#define TWL4030_REG_VMMC2   7 /* not on all chips */
 
#define TWL4030_REG_VSIM   8 /* not on all chips */
 
#define TWL4030_REG_VAUX1   9 /* not on all chips */
 
#define TWL4030_REG_VAUX2_4030   10 /* (twl4030-specific) */
 
#define TWL4030_REG_VAUX2   11 /* (twl5030 and newer) */
 
#define TWL4030_REG_VAUX3   12 /* not on all chips */
 
#define TWL4030_REG_VAUX4   13 /* not on all chips */
 
#define TWL4030_REG_VINTANA1   14
 
#define TWL4030_REG_VINTANA2   15
 
#define TWL4030_REG_VINTDIG   16
 
#define TWL4030_REG_VUSB1V5   17
 
#define TWL4030_REG_VUSB1V8   18
 
#define TWL4030_REG_VUSB3V1   19
 
#define TWL6030_REG_VDD1   30
 
#define TWL6030_REG_VDD2   31
 
#define TWL6030_REG_VDD3   32
 
#define TWL6030_REG_VMEM   33
 
#define TWL6030_REG_V2V1   34
 
#define TWL6030_REG_V1V29   35
 
#define TWL6030_REG_V1V8   36
 
#define TWL6030_REG_VAUX1_6030   37
 
#define TWL6030_REG_VAUX2_6030   38
 
#define TWL6030_REG_VAUX3_6030   39
 
#define TWL6030_REG_VMMC   40
 
#define TWL6030_REG_VPP   41
 
#define TWL6030_REG_VUSIM   42
 
#define TWL6030_REG_VANA   43
 
#define TWL6030_REG_VCXIO   44
 
#define TWL6030_REG_VDAC   45
 
#define TWL6030_REG_VUSB   46
 
#define TWL6030_REG_VRTC   47
 
#define TWL6030_REG_CLK32KG   48
 
#define TWL6025_REG_LDO2   49
 
#define TWL6025_REG_LDO4   50
 
#define TWL6025_REG_LDO3   51
 
#define TWL6025_REG_LDO5   52
 
#define TWL6025_REG_LDO1   53
 
#define TWL6025_REG_LDO7   54
 
#define TWL6025_REG_LDO6   55
 
#define TWL6025_REG_LDOLN   56
 
#define TWL6025_REG_LDOUSB   57
 
#define TWL6025_REG_SMPS3   58
 
#define TWL6025_REG_SMPS4   59
 
#define TWL6025_REG_VIO   60
 

Enumerations

enum  twl4030_usb_mode { T2_USB_MODE_ULPI = 1, T2_USB_MODE_CEA2011_3PIN = 2 }
 

Functions

unsigned int twl_rev (void)
 
int twl_i2c_write_u8 (u8 mod_no, u8 val, u8 reg)
 
int twl_i2c_read_u8 (u8 mod_no, u8 *val, u8 reg)
 
int twl_i2c_write (u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
 
int twl_i2c_read (u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
 
int twl_get_type (void)
 
int twl_get_version (void)
 
int twl_get_hfclk_rate (void)
 
int twl6030_interrupt_unmask (u8 bit_mask, u8 offset)
 
int twl6030_interrupt_mask (u8 bit_mask, u8 offset)
 
void twl4030_power_init (struct twl4030_power_data *triton2_scripts)
 
int twl4030_remove_script (u8 flags)
 
void twl4030_power_off (void)
 
int twl4030_sih_setup (struct device *dev, int module, int irq_base)
 

Macro Definition Documentation

#define BATDETECT_INTR_OFFSET   14

Definition at line 105 of file twl.h.

#define BCI_INTR_OFFSET   2

Definition at line 91 of file twl.h.

#define BCI_PRES_INTR_OFFSET   9

Definition at line 95 of file twl.h.

#define CHARGER_INTR_OFFSET   2

Definition at line 110 of file twl.h.

#define CHARGERFAULT_INTR_OFFSET   5

Definition at line 94 of file twl.h.

#define DEV_GRP_NULL   0x0

Definition at line 464 of file twl.h.

#define DEV_GRP_P1   0x1 /* P1: all OMAP devices */

Definition at line 465 of file twl.h.

#define DEV_GRP_P2   0x2 /* P2: all Modem devices */

Definition at line 466 of file twl.h.

#define DEV_GRP_P3   0x4 /* P3: all peripheral devices */

Definition at line 467 of file twl.h.

#define GASGAUGE_INTR_OFFSET   17

Definition at line 108 of file twl.h.

#define GET_TWL_REV   (twl_rev())

Definition at line 164 of file twl.h.

#define GPIO_INTR_OFFSET   0

Definition at line 89 of file twl.h.

#define HOTDIE_INTR_OFFSET   12

Definition at line 103 of file twl.h.

#define I2C_SCL_CTRL_PU   BIT(0)

Definition at line 301 of file twl.h.

#define I2C_SDA_CTRL_PU   BIT(2)

Definition at line 302 of file twl.h.

#define KEYPAD_INTR_OFFSET   1

Definition at line 90 of file twl.h.

#define MADC_INTR_OFFSET   3

Definition at line 92 of file twl.h.

#define MMC_PD   (0x1 << 2)

Definition at line 152 of file twl.h.

#define MMC_PU   (0x1 << 3)

Definition at line 151 of file twl.h.

#define MMCDETECT_INTR_OFFSET   16

Definition at line 107 of file twl.h.

#define MSG_BROADCAST (   devgrp,
  grp,
  type,
  type2,
  state 
)
Value:
( (devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \
| (type) << 4 | (state))

Definition at line 537 of file twl.h.

#define MSG_BROADCAST__CLK_RST   MSG_BROADCAST_ALL

Definition at line 549 of file twl.h.

#define MSG_BROADCAST_ALL (   devgrp,
  state 
)    ((devgrp) << 5 | (state))

Definition at line 544 of file twl.h.

#define MSG_BROADCAST_PROV   MSG_BROADCAST_ALL

Definition at line 548 of file twl.h.

#define MSG_BROADCAST_REF   MSG_BROADCAST_ALL

Definition at line 547 of file twl.h.

#define MSG_SINGULAR (   devgrp,
  id,
  state 
)    ((devgrp) << 13 | 0 << 12 | (id) << 4 | (state))

Definition at line 541 of file twl.h.

#define PERSISTENT_KEY (   r,
  c 
)    KEY((r), (c), KEY_RESERVED)

Definition at line 596 of file twl.h.

#define PWR_INTR_OFFSET   0

Definition at line 102 of file twl.h.

#define REG_CLEARGPIODATAOUT1   0x9

Definition at line 247 of file twl.h.

#define REG_CLEARGPIODATAOUT2   0xA

Definition at line 248 of file twl.h.

#define REG_CLEARGPIODATAOUT3   0xB

Definition at line 249 of file twl.h.

#define REG_GPIO_CTRL   0x12

Definition at line 256 of file twl.h.

#define REG_GPIO_DEBEN1   0xF

Definition at line 253 of file twl.h.

#define REG_GPIO_DEBEN2   0x10

Definition at line 254 of file twl.h.

#define REG_GPIO_DEBEN3   0x11

Definition at line 255 of file twl.h.

#define REG_GPIO_EDR1   0x28

Definition at line 274 of file twl.h.

#define REG_GPIO_EDR2   0x29

Definition at line 275 of file twl.h.

#define REG_GPIO_EDR3   0x2A

Definition at line 276 of file twl.h.

#define REG_GPIO_EDR4   0x2B

Definition at line 277 of file twl.h.

#define REG_GPIO_EDR5   0x2C

Definition at line 278 of file twl.h.

#define REG_GPIO_IMR1A   0x1C

Definition at line 265 of file twl.h.

#define REG_GPIO_IMR1B   0x22

Definition at line 271 of file twl.h.

#define REG_GPIO_IMR2A   0x1D

Definition at line 266 of file twl.h.

#define REG_GPIO_IMR2B   0x23

Definition at line 272 of file twl.h.

#define REG_GPIO_IMR3A   0x1E

Definition at line 267 of file twl.h.

#define REG_GPIO_IMR3B   0x24

Definition at line 273 of file twl.h.

#define REG_GPIO_ISR1A   0x19

Definition at line 262 of file twl.h.

#define REG_GPIO_ISR1B   0x1F

Definition at line 268 of file twl.h.

#define REG_GPIO_ISR2A   0x1A

Definition at line 263 of file twl.h.

#define REG_GPIO_ISR2B   0x20

Definition at line 269 of file twl.h.

#define REG_GPIO_ISR3A   0x1B

Definition at line 264 of file twl.h.

#define REG_GPIO_ISR3B   0x21

Definition at line 270 of file twl.h.

#define REG_GPIO_SIH_CTRL   0x2D

Definition at line 279 of file twl.h.

#define REG_GPIODATADIR1   0x3

Definition at line 241 of file twl.h.

#define REG_GPIODATADIR2   0x4

Definition at line 242 of file twl.h.

#define REG_GPIODATADIR3   0x5

Definition at line 243 of file twl.h.

#define REG_GPIODATAIN1   0x0

Definition at line 238 of file twl.h.

#define REG_GPIODATAIN2   0x1

Definition at line 239 of file twl.h.

#define REG_GPIODATAIN3   0x2

Definition at line 240 of file twl.h.

#define REG_GPIODATAOUT1   0x6

Definition at line 244 of file twl.h.

#define REG_GPIODATAOUT2   0x7

Definition at line 245 of file twl.h.

#define REG_GPIODATAOUT3   0x8

Definition at line 246 of file twl.h.

#define REG_GPIOPUPDCTR1   0x13

Definition at line 257 of file twl.h.

#define REG_GPIOPUPDCTR2   0x14

Definition at line 258 of file twl.h.

#define REG_GPIOPUPDCTR3   0x15

Definition at line 259 of file twl.h.

#define REG_GPIOPUPDCTR4   0x16

Definition at line 260 of file twl.h.

#define REG_GPIOPUPDCTR5   0x17

Definition at line 261 of file twl.h.

#define REG_GPPUPDCTR1   0x0F

Definition at line 296 of file twl.h.

#define REG_IDCODE_15_8   0x01

Definition at line 293 of file twl.h.

#define REG_IDCODE_16_23   0x02

Definition at line 294 of file twl.h.

#define REG_IDCODE_31_24   0x03

Definition at line 295 of file twl.h.

#define REG_IDCODE_7_0   0x00

Definition at line 292 of file twl.h.

#define REG_INT_MSK_LINE_A   0x03

Definition at line 118 of file twl.h.

#define REG_INT_MSK_LINE_B   0x04

Definition at line 119 of file twl.h.

#define REG_INT_MSK_LINE_C   0x05

Definition at line 120 of file twl.h.

#define REG_INT_MSK_STS_A   0x06

Definition at line 122 of file twl.h.

#define REG_INT_MSK_STS_B   0x07

Definition at line 123 of file twl.h.

#define REG_INT_MSK_STS_C   0x08

Definition at line 124 of file twl.h.

#define REG_INT_STS_A   0x00

Definition at line 114 of file twl.h.

#define REG_INT_STS_B   0x01

Definition at line 115 of file twl.h.

#define REG_INT_STS_C   0x02

Definition at line 116 of file twl.h.

#define REG_SETGPIODATAOUT1   0xC

Definition at line 250 of file twl.h.

#define REG_SETGPIODATAOUT2   0xD

Definition at line 251 of file twl.h.

#define REG_SETGPIODATAOUT3   0xE

Definition at line 252 of file twl.h.

#define REG_UNLOCK_TEST_REG   0x12

Definition at line 297 of file twl.h.

#define RES_32KCLKOUT   26

Definition at line 518 of file twl.h.

#define RES_CLKEN   23

Definition at line 515 of file twl.h.

#define RES_GRP_ALL   0x7 /* All resource groups */

Definition at line 477 of file twl.h.

#define RES_GRP_PP   0x1 /* Power providers */

Definition at line 471 of file twl.h.

#define RES_GRP_PP_PR   0x5

Definition at line 475 of file twl.h.

#define RES_GRP_PP_RC   0x3

Definition at line 473 of file twl.h.

#define RES_GRP_PR   0x4 /* Power references */

Definition at line 474 of file twl.h.

#define RES_GRP_RC   0x2 /* Reset and control */

Definition at line 472 of file twl.h.

#define RES_GRP_RC_PR   0x6

Definition at line 476 of file twl.h.

#define RES_GRP_RES   0x0 /* Reserved */

Definition at line 470 of file twl.h.

#define RES_HFCLKOUT   25

Definition at line 517 of file twl.h.

#define RES_MAIN_REF   28

Definition at line 521 of file twl.h.

#define RES_NRES_PWRON   22

Definition at line 514 of file twl.h.

#define RES_REGEN   21

Definition at line 512 of file twl.h.

#define RES_RESET   27

Definition at line 519 of file twl.h.

#define RES_STATE_ACTIVE   0xE

Definition at line 485 of file twl.h.

#define RES_STATE_OFF   0x0

Definition at line 487 of file twl.h.

#define RES_STATE_SLEEP   0x8

Definition at line 486 of file twl.h.

#define RES_STATE_WRST   0xF

Definition at line 484 of file twl.h.

#define RES_SYSEN   24

Definition at line 516 of file twl.h.

#define RES_TYPE2_R0   0x0

Definition at line 479 of file twl.h.

#define RES_TYPE_ALL   0x7

Definition at line 481 of file twl.h.

#define RES_VAUX1   1

Definition at line 492 of file twl.h.

#define RES_VAUX2   2

Definition at line 493 of file twl.h.

#define RES_VAUX3   3

Definition at line 494 of file twl.h.

#define RES_VAUX4   4

Definition at line 495 of file twl.h.

#define RES_VDAC   10

Definition at line 501 of file twl.h.

#define RES_VDD1   15

Definition at line 506 of file twl.h.

#define RES_VDD2   16

Definition at line 507 of file twl.h.

#define RES_VINTANA1   11

Definition at line 502 of file twl.h.

#define RES_VINTANA2   12

Definition at line 503 of file twl.h.

#define RES_VINTDIG   13

Definition at line 504 of file twl.h.

#define RES_VIO   14

Definition at line 505 of file twl.h.

#define RES_VMMC1   5

Definition at line 496 of file twl.h.

#define RES_VMMC2   6

Definition at line 497 of file twl.h.

#define RES_VPLL1   7

Definition at line 498 of file twl.h.

#define RES_VPLL2   8

Definition at line 499 of file twl.h.

#define RES_VSIM   9

Definition at line 500 of file twl.h.

#define RES_VUSB_1V5   17

Definition at line 508 of file twl.h.

#define RES_VUSB_1V8   18

Definition at line 509 of file twl.h.

#define RES_VUSB_3V1   19

Definition at line 510 of file twl.h.

#define RES_VUSBCP   20

Definition at line 511 of file twl.h.

#define RSV_INTR_OFFSET   0

Definition at line 111 of file twl.h.

#define RTC_INTR_OFFSET   11

Definition at line 97 of file twl.h.

#define SIMDETECT_INTR_OFFSET   15

Definition at line 106 of file twl.h.

#define SMPSLDO_INTR_OFFSET   13

Definition at line 104 of file twl.h.

#define SR_I2C_SCL_CTRL_PU   BIT(4)

Definition at line 303 of file twl.h.

#define SR_I2C_SDA_CTRL_PU   BIT(6)

Definition at line 304 of file twl.h.

#define STS_MMC   0x1

Definition at line 148 of file twl.h.

#define SW_FC   (0x1 << 2)

Definition at line 147 of file twl.h.

#define TOTAL_RESOURCES   28

Definition at line 523 of file twl.h.

#define TPS_SUBSET   BIT(1) /* tps659[23]0 have fewer LDOs */

Definition at line 748 of file twl.h.

#define TWL4030_ALLOW_UNSUPPORTED
Value:
BIT(5) /* Some voltages are possible
* but not officially supported.
* This flag is necessary to
* enable them.
*/

Definition at line 752 of file twl.h.

#define TWL4030_CLASS_ID   0x4030

Definition at line 161 of file twl.h.

#define TWL4030_GPIO_MAX   18

Definition at line 284 of file twl.h.

#define TWL4030_INT_PWR_EDR1   0x5

Definition at line 370 of file twl.h.

#define TWL4030_INT_PWR_EDR2   0x6

Definition at line 371 of file twl.h.

#define TWL4030_INT_PWR_IMR1   0x1

Definition at line 366 of file twl.h.

#define TWL4030_INT_PWR_IMR2   0x3

Definition at line 368 of file twl.h.

#define TWL4030_INT_PWR_ISR1   0x0

Definition at line 365 of file twl.h.

#define TWL4030_INT_PWR_ISR2   0x2

Definition at line 367 of file twl.h.

#define TWL4030_INT_PWR_SIH_CTRL   0x7

Definition at line 372 of file twl.h.

#define TWL4030_INT_PWR_SIR   0x4 /* test register */

Definition at line 369 of file twl.h.

#define TWL4030_INTERRUPTS_BCIEDR1   0xa

Definition at line 354 of file twl.h.

#define TWL4030_INTERRUPTS_BCIEDR2   0xb

Definition at line 355 of file twl.h.

#define TWL4030_INTERRUPTS_BCIEDR3   0xc

Definition at line 356 of file twl.h.

#define TWL4030_INTERRUPTS_BCIIMR1A   0x2

Definition at line 346 of file twl.h.

#define TWL4030_INTERRUPTS_BCIIMR1B   0x6

Definition at line 350 of file twl.h.

#define TWL4030_INTERRUPTS_BCIIMR2A   0x3

Definition at line 347 of file twl.h.

#define TWL4030_INTERRUPTS_BCIIMR2B   0x7

Definition at line 351 of file twl.h.

#define TWL4030_INTERRUPTS_BCIISR1A   0x0

Definition at line 344 of file twl.h.

#define TWL4030_INTERRUPTS_BCIISR1B   0x4

Definition at line 348 of file twl.h.

#define TWL4030_INTERRUPTS_BCIISR2A   0x1

Definition at line 345 of file twl.h.

#define TWL4030_INTERRUPTS_BCIISR2B   0x5

Definition at line 349 of file twl.h.

#define TWL4030_INTERRUPTS_BCISIHCTRL   0xd

Definition at line 357 of file twl.h.

#define TWL4030_INTERRUPTS_BCISIR1   0x8 /* test register */

Definition at line 352 of file twl.h.

#define TWL4030_INTERRUPTS_BCISIR2   0x9 /* test register */

Definition at line 353 of file twl.h.

#define TWL4030_KEYPAD_KEYP_EDR   0x16

Definition at line 320 of file twl.h.

#define TWL4030_KEYPAD_KEYP_IMR1   0x12

Definition at line 316 of file twl.h.

#define TWL4030_KEYPAD_KEYP_IMR2   0x14

Definition at line 318 of file twl.h.

#define TWL4030_KEYPAD_KEYP_ISR1   0x11

Definition at line 315 of file twl.h.

#define TWL4030_KEYPAD_KEYP_ISR2   0x13

Definition at line 317 of file twl.h.

#define TWL4030_KEYPAD_KEYP_SIH_CTRL   0x17

Definition at line 321 of file twl.h.

#define TWL4030_KEYPAD_KEYP_SIR   0x15 /* test register */

Definition at line 319 of file twl.h.

#define TWL4030_MADC_EDR   0x66

Definition at line 335 of file twl.h.

#define TWL4030_MADC_IMR1   0x62

Definition at line 331 of file twl.h.

#define TWL4030_MADC_IMR2   0x64

Definition at line 333 of file twl.h.

#define TWL4030_MADC_ISR1   0x61

Definition at line 330 of file twl.h.

#define TWL4030_MADC_ISR2   0x63

Definition at line 332 of file twl.h.

#define TWL4030_MADC_SIH_CTRL   0x67

Definition at line 336 of file twl.h.

#define TWL4030_MADC_SIR   0x65 /* test register */

Definition at line 334 of file twl.h.

#define TWL4030_MODULE_AUDIO_VOICE   0x01

Definition at line 46 of file twl.h.

#define TWL4030_MODULE_BACKUP   0x12

Definition at line 68 of file twl.h.

#define TWL4030_MODULE_GPIO   0x02

Definition at line 47 of file twl.h.

#define TWL4030_MODULE_INT   0x13

Definition at line 69 of file twl.h.

#define TWL4030_MODULE_INTBR   0x03

Definition at line 48 of file twl.h.

#define TWL4030_MODULE_INTERRUPTS   0x08

Definition at line 55 of file twl.h.

#define TWL4030_MODULE_KEYPAD   0x06

Definition at line 53 of file twl.h.

#define TWL4030_MODULE_LED   0x09

Definition at line 56 of file twl.h.

#define TWL4030_MODULE_MADC   0x07

Definition at line 54 of file twl.h.

#define TWL4030_MODULE_MAIN_CHARGE   0x0A

Definition at line 57 of file twl.h.

#define TWL4030_MODULE_PIH   0x04

Definition at line 49 of file twl.h.

#define TWL4030_MODULE_PM_MASTER   0x14

Definition at line 70 of file twl.h.

#define TWL4030_MODULE_PM_RECEIVER   0x15

Definition at line 71 of file twl.h.

#define TWL4030_MODULE_PRECHARGE   0x0B

Definition at line 58 of file twl.h.

#define TWL4030_MODULE_PWM0   0x0C

Definition at line 59 of file twl.h.

#define TWL4030_MODULE_PWM1   0x0D

Definition at line 60 of file twl.h.

#define TWL4030_MODULE_PWMA   0x0E

Definition at line 61 of file twl.h.

#define TWL4030_MODULE_PWMB   0x0F

Definition at line 62 of file twl.h.

#define TWL4030_MODULE_RTC   0x16

Definition at line 72 of file twl.h.

#define TWL4030_MODULE_SECURED_REG   0x17

Definition at line 73 of file twl.h.

#define TWL4030_MODULE_TEST   0x05

Definition at line 50 of file twl.h.

#define TWL4030_MODULE_USB   0x00

Definition at line 43 of file twl.h.

#define TWL4030_PM_MASTER_BACKUP_MISC_CFG   0x0c

Definition at line 423 of file twl.h.

#define TWL4030_PM_MASTER_BACKUP_MISC_STS   0x0b

Definition at line 422 of file twl.h.

#define TWL4030_PM_MASTER_BACKUP_MISC_TST   0x0d

Definition at line 424 of file twl.h.

#define TWL4030_PM_MASTER_BOOT_BCI   0x07

Definition at line 419 of file twl.h.

#define TWL4030_PM_MASTER_CFG_BOOT   0x05

Definition at line 417 of file twl.h.

#define TWL4030_PM_MASTER_CFG_P123_TRANSITION   0x03

Definition at line 415 of file twl.h.

#define TWL4030_PM_MASTER_CFG_P1_TRANSITION   0x00

Definition at line 412 of file twl.h.

#define TWL4030_PM_MASTER_CFG_P2_TRANSITION   0x01

Definition at line 413 of file twl.h.

#define TWL4030_PM_MASTER_CFG_P3_TRANSITION   0x02

Definition at line 414 of file twl.h.

#define TWL4030_PM_MASTER_CFG_PWRANA1   0x08

Definition at line 420 of file twl.h.

#define TWL4030_PM_MASTER_CFG_PWRANA2   0x09

Definition at line 421 of file twl.h.

#define TWL4030_PM_MASTER_GLOBAL_TST   0xb6

Definition at line 450 of file twl.h.

#define TWL4030_PM_MASTER_KEY_CFG1   0xc0

Definition at line 444 of file twl.h.

#define TWL4030_PM_MASTER_KEY_CFG2   0x0c

Definition at line 445 of file twl.h.

#define TWL4030_PM_MASTER_KEY_TST1   0xe0

Definition at line 447 of file twl.h.

#define TWL4030_PM_MASTER_KEY_TST2   0x0e

Definition at line 448 of file twl.h.

#define TWL4030_PM_MASTER_MEMORY_ADDRESS   0x23

Definition at line 441 of file twl.h.

#define TWL4030_PM_MASTER_MEMORY_DATA   0x24

Definition at line 442 of file twl.h.

#define TWL4030_PM_MASTER_P1_SW_EVENTS   0x10

Definition at line 427 of file twl.h.

#define TWL4030_PM_MASTER_P2_SW_EVENTS   0x11

Definition at line 428 of file twl.h.

#define TWL4030_PM_MASTER_P3_SW_EVENTS   0x12

Definition at line 429 of file twl.h.

#define TWL4030_PM_MASTER_PB_CFG   0x14

Definition at line 431 of file twl.h.

#define TWL4030_PM_MASTER_PB_WORD_LSB   0x16

Definition at line 433 of file twl.h.

#define TWL4030_PM_MASTER_PB_WORD_MSB   0x15

Definition at line 432 of file twl.h.

#define TWL4030_PM_MASTER_PROTECT_KEY   0x0e

Definition at line 425 of file twl.h.

#define TWL4030_PM_MASTER_SEQ_ADD_A2S   0x1f

Definition at line 437 of file twl.h.

#define TWL4030_PM_MASTER_SEQ_ADD_A2W   0x1e

Definition at line 436 of file twl.h.

#define TWL4030_PM_MASTER_SEQ_ADD_P2A   0x1d

Definition at line 435 of file twl.h.

#define TWL4030_PM_MASTER_SEQ_ADD_S2A12   0x20

Definition at line 438 of file twl.h.

#define TWL4030_PM_MASTER_SEQ_ADD_S2A3   0x21

Definition at line 439 of file twl.h.

#define TWL4030_PM_MASTER_SEQ_ADD_W2P   0x1c

Definition at line 434 of file twl.h.

#define TWL4030_PM_MASTER_SEQ_ADD_WARM   0x22

Definition at line 440 of file twl.h.

#define TWL4030_PM_MASTER_SHUNDAN   0x06

Definition at line 418 of file twl.h.

#define TWL4030_PM_MASTER_STS_BOOT   0x04

Definition at line 416 of file twl.h.

#define TWL4030_PM_MASTER_STS_HW_CONDITIONS   0x0f

Definition at line 426 of file twl.h.

#define TWL4030_PM_MASTER_STS_P123_STATE   0x13

Definition at line 430 of file twl.h.

#define TWL4030_REG_VAUX1   9 /* not on all chips */

Definition at line 791 of file twl.h.

#define TWL4030_REG_VAUX2   11 /* (twl5030 and newer) */

Definition at line 793 of file twl.h.

#define TWL4030_REG_VAUX2_4030   10 /* (twl4030-specific) */

Definition at line 792 of file twl.h.

#define TWL4030_REG_VAUX3   12 /* not on all chips */

Definition at line 794 of file twl.h.

#define TWL4030_REG_VAUX4   13 /* not on all chips */

Definition at line 795 of file twl.h.

#define TWL4030_REG_VDAC   3

Definition at line 785 of file twl.h.

#define TWL4030_REG_VDD1   0

Definition at line 780 of file twl.h.

#define TWL4030_REG_VDD2   1

Definition at line 781 of file twl.h.

#define TWL4030_REG_VINTANA1   14

Definition at line 798 of file twl.h.

#define TWL4030_REG_VINTANA2   15

Definition at line 799 of file twl.h.

#define TWL4030_REG_VINTDIG   16

Definition at line 800 of file twl.h.

#define TWL4030_REG_VIO   2

Definition at line 782 of file twl.h.

#define TWL4030_REG_VMMC1   6

Definition at line 788 of file twl.h.

#define TWL4030_REG_VMMC2   7 /* not on all chips */

Definition at line 789 of file twl.h.

#define TWL4030_REG_VPLL1   4

Definition at line 786 of file twl.h.

#define TWL4030_REG_VPLL2   5 /* not on all chips */

Definition at line 787 of file twl.h.

#define TWL4030_REG_VSIM   8 /* not on all chips */

Definition at line 790 of file twl.h.

#define TWL4030_REG_VUSB1V5   17

Definition at line 801 of file twl.h.

#define TWL4030_REG_VUSB1V8   18

Definition at line 802 of file twl.h.

#define TWL4030_REG_VUSB3V1   19

Definition at line 803 of file twl.h.

#define TWL4030_RESCONFIG_UNDEF   ((u8)-1)

Definition at line 652 of file twl.h.

#define TWL4030_SIH_CTRL_COR_MASK   BIT(2)

Definition at line 230 of file twl.h.

#define TWL4030_SIH_CTRL_EXCLEN_MASK   BIT(0)

Definition at line 228 of file twl.h.

#define TWL4030_SIH_CTRL_PENDDIS_MASK   BIT(1)

Definition at line 229 of file twl.h.

#define TWL4030_SLEEP_SCRIPT   (1<<3)

Definition at line 636 of file twl.h.

#define TWL4030_VAUX1_DEDICATED   0x1A

Definition at line 762 of file twl.h.

#define TWL4030_VAUX1_DEV_GRP   0x17

Definition at line 761 of file twl.h.

#define TWL4030_VAUX2   BIT(0) /* pre-5030 voltage ranges */

Definition at line 747 of file twl.h.

#define TWL4030_VAUX2_DEDICATED   0x1E

Definition at line 764 of file twl.h.

#define TWL4030_VAUX2_DEV_GRP   0x1B

Definition at line 763 of file twl.h.

#define TWL4030_VAUX3_DEDICATED   0x22

Definition at line 766 of file twl.h.

#define TWL4030_VAUX3_DEV_GRP   0x1F

Definition at line 765 of file twl.h.

#define TWL4030_VDAC_DEDICATED   0x3E

Definition at line 760 of file twl.h.

#define TWL4030_VDAC_DEV_GRP   0x3B

Definition at line 759 of file twl.h.

#define TWL4030_WAKEUP12_SCRIPT   (1<<1)

Definition at line 634 of file twl.h.

#define TWL4030_WAKEUP3_SCRIPT   (1<<2)

Definition at line 635 of file twl.h.

#define TWL4030_WRST_SCRIPT   (1<<0)

Definition at line 633 of file twl.h.

#define TWL5030_REV_1_0   0x00

Definition at line 157 of file twl.h.

#define TWL5030_REV_1_1   0x10

Definition at line 158 of file twl.h.

#define TWL5030_REV_1_2   0x30

Definition at line 159 of file twl.h.

#define TWL5031   BIT(2) /* twl5031 has different registers */

Definition at line 749 of file twl.h.

#define TWL5031_ACCEDR1   0x14

Definition at line 388 of file twl.h.

#define TWL5031_ACCIMR1   0x10

Definition at line 384 of file twl.h.

#define TWL5031_ACCIMR2   0x12

Definition at line 386 of file twl.h.

#define TWL5031_ACCISR1   0x0F

Definition at line 383 of file twl.h.

#define TWL5031_ACCISR2   0x11

Definition at line 385 of file twl.h.

#define TWL5031_ACCSIHCTRL   0x15

Definition at line 389 of file twl.h.

#define TWL5031_ACCSIR   0x13

Definition at line 387 of file twl.h.

#define TWL5031_ACIIDR_LSB   0x07

Definition at line 381 of file twl.h.

#define TWL5031_ACIIDR_MSB   0x08

Definition at line 382 of file twl.h.

#define TWL5031_ACIIMR_LSB   0x05

Definition at line 379 of file twl.h.

#define TWL5031_ACIIMR_MSB   0x06

Definition at line 380 of file twl.h.

#define TWL5031_INTERRUPTS_BCIEDR1   0x5

Definition at line 402 of file twl.h.

#define TWL5031_INTERRUPTS_BCIEDR2   0x6

Definition at line 403 of file twl.h.

#define TWL5031_INTERRUPTS_BCIIMR1   0x1

Definition at line 398 of file twl.h.

#define TWL5031_INTERRUPTS_BCIIMR2   0x3

Definition at line 400 of file twl.h.

#define TWL5031_INTERRUPTS_BCIISR1   0x0

Definition at line 397 of file twl.h.

#define TWL5031_INTERRUPTS_BCIISR2   0x2

Definition at line 399 of file twl.h.

#define TWL5031_INTERRUPTS_BCISIHCTRL   0x7

Definition at line 404 of file twl.h.

#define TWL5031_INTERRUPTS_BCISIR   0x4

Definition at line 401 of file twl.h.

#define TWL5031_MODULE_ACCESSORY   0x10

Definition at line 64 of file twl.h.

#define TWL5031_MODULE_INTERRUPTS   0x11

Definition at line 65 of file twl.h.

#define TWL6025_REG_LDO1   53

Definition at line 838 of file twl.h.

#define TWL6025_REG_LDO2   49

Definition at line 834 of file twl.h.

#define TWL6025_REG_LDO3   51

Definition at line 836 of file twl.h.

#define TWL6025_REG_LDO4   50

Definition at line 835 of file twl.h.

#define TWL6025_REG_LDO5   52

Definition at line 837 of file twl.h.

#define TWL6025_REG_LDO6   55

Definition at line 840 of file twl.h.

#define TWL6025_REG_LDO7   54

Definition at line 839 of file twl.h.

#define TWL6025_REG_LDOLN   56

Definition at line 841 of file twl.h.

#define TWL6025_REG_LDOUSB   57

Definition at line 842 of file twl.h.

#define TWL6025_REG_SMPS3   58

Definition at line 845 of file twl.h.

#define TWL6025_REG_SMPS4   59

Definition at line 846 of file twl.h.

#define TWL6025_REG_VIO   60

Definition at line 847 of file twl.h.

#define TWL6025_SUBCLASS   BIT(4) /* TWL6025 has changed registers */

Definition at line 751 of file twl.h.

#define TWL6030_BATDETECT_INT_MASK   0x02

Definition at line 134 of file twl.h.

#define TWL6030_CFG_INPUT_PUPD3   0xF2

Definition at line 150 of file twl.h.

#define TWL6030_CHARGER_CTRL_INT_MASK   0x10

Definition at line 142 of file twl.h.

#define TWL6030_CHARGER_FAULT_INT_MASK   0x60

Definition at line 143 of file twl.h.

#define TWL6030_CLASS   BIT(3) /* TWL6030 class */

Definition at line 750 of file twl.h.

#define TWL6030_CLASS_ID   0x6030

Definition at line 162 of file twl.h.

#define TWL6030_GASGAUGE_INT_MASK   0x80

Definition at line 138 of file twl.h.

#define TWL6030_GPADC_INT_MASK   0x60

Definition at line 137 of file twl.h.

#define TWL6030_HOTDIE_INT_MASK   0x20

Definition at line 129 of file twl.h.

#define TWL6030_MMCCTRL   0xEE

Definition at line 145 of file twl.h.

#define TWL6030_MMCDETECT_INT_MASK   0x08

Definition at line 136 of file twl.h.

#define TWL6030_MODULE_ID0   0x0D

Definition at line 85 of file twl.h.

#define TWL6030_MODULE_ID1   0x0E

Definition at line 86 of file twl.h.

#define TWL6030_MODULE_ID2   0x0F

Definition at line 87 of file twl.h.

#define TWL6030_PWR_INT_MASK   0x07

Definition at line 127 of file twl.h.

#define TWL6030_REG_CLK32KG   48

Definition at line 831 of file twl.h.

#define TWL6030_REG_V1V29   35

Definition at line 814 of file twl.h.

#define TWL6030_REG_V1V8   36

Definition at line 815 of file twl.h.

#define TWL6030_REG_V2V1   34

Definition at line 813 of file twl.h.

#define TWL6030_REG_VANA   43

Definition at line 824 of file twl.h.

#define TWL6030_REG_VAUX1_6030   37

Definition at line 818 of file twl.h.

#define TWL6030_REG_VAUX2_6030   38

Definition at line 819 of file twl.h.

#define TWL6030_REG_VAUX3_6030   39

Definition at line 820 of file twl.h.

#define TWL6030_REG_VCXIO   44

Definition at line 825 of file twl.h.

#define TWL6030_REG_VDAC   45

Definition at line 826 of file twl.h.

#define TWL6030_REG_VDD1   30

Definition at line 807 of file twl.h.

#define TWL6030_REG_VDD2   31

Definition at line 808 of file twl.h.

#define TWL6030_REG_VDD3   32

Definition at line 809 of file twl.h.

#define TWL6030_REG_VMEM   33

Definition at line 812 of file twl.h.

#define TWL6030_REG_VMMC   40

Definition at line 821 of file twl.h.

#define TWL6030_REG_VPP   41

Definition at line 822 of file twl.h.

#define TWL6030_REG_VRTC   47

Definition at line 830 of file twl.h.

#define TWL6030_REG_VUSB   46

Definition at line 827 of file twl.h.

#define TWL6030_REG_VUSIM   42

Definition at line 823 of file twl.h.

#define TWL6030_RTC_INT_MASK   0x18

Definition at line 128 of file twl.h.

#define TWL6030_SIMDETECT_INT_MASK   0x04

Definition at line 135 of file twl.h.

#define TWL6030_SMPSLDOA_INT_MASK   0xC0

Definition at line 130 of file twl.h.

#define TWL6030_SMPSLDOB_INT_MASK   0x01

Definition at line 133 of file twl.h.

#define TWL6030_USBOTG_INT_MASK   0x0F

Definition at line 141 of file twl.h.

#define TWL_CLASS_IS (   class,
  id 
)
Value:
static inline int twl_class_is_ ##class(void) \
{ \
return ((id) == (GET_TWL_REV)) ? 1 : 0; \
}

Definition at line 165 of file twl.h.

#define TWL_EEPROM_R_UNLOCK   0x49

Definition at line 306 of file twl.h.

#define TWL_MODULE_AUDIO_VOICE   TWL4030_MODULE_AUDIO_VOICE

Definition at line 76 of file twl.h.

#define TWL_MODULE_MADC   TWL4030_MODULE_MADC

Definition at line 78 of file twl.h.

#define TWL_MODULE_MAIN_CHARGE   TWL4030_MODULE_MAIN_CHARGE

Definition at line 79 of file twl.h.

#define TWL_MODULE_PIH   TWL4030_MODULE_PIH

Definition at line 77 of file twl.h.

#define TWL_MODULE_PM_MASTER   TWL4030_MODULE_PM_MASTER

Definition at line 80 of file twl.h.

#define TWL_MODULE_PM_RECEIVER   TWL4030_MODULE_PM_RECEIVER

Definition at line 81 of file twl.h.

#define TWL_MODULE_PWM   TWL4030_MODULE_PWM0

Definition at line 83 of file twl.h.

#define TWL_MODULE_RTC   TWL4030_MODULE_RTC

Definition at line 82 of file twl.h.

#define TWL_MODULE_USB   TWL4030_MODULE_USB

Definition at line 75 of file twl.h.

#define TWL_SIL_5030   0x09002F

Definition at line 156 of file twl.h.

#define TWL_SIL_REV (   rev)    ((rev) >> 24)

Definition at line 155 of file twl.h.

#define TWL_SIL_TYPE (   rev)    ((rev) & 0x00FFFFFF)

Definition at line 154 of file twl.h.

#define USB_INTR_OFFSET   4

Definition at line 93 of file twl.h.

#define USB_PRES_INTR_OFFSET   10

Definition at line 96 of file twl.h.

#define USBOTG_INTR_OFFSET   4

Definition at line 109 of file twl.h.

#define VMMC_AUTO_OFF   (0x1 << 3)

Definition at line 146 of file twl.h.

Enumeration Type Documentation

Enumerator:
T2_USB_MODE_ULPI 
T2_USB_MODE_CEA2011_3PIN 

Definition at line 605 of file twl.h.

Function Documentation

void twl4030_power_init ( struct twl4030_power_data triton2_scripts)

Definition at line 530 of file twl4030-power.c.

void twl4030_power_off ( void  )

Definition at line 520 of file twl4030-power.c.

int twl4030_remove_script ( u8  flags)

Definition at line 462 of file twl4030-power.c.

int twl4030_sih_setup ( struct device dev,
int  module,
int  irq_base 
)

Definition at line 632 of file twl4030-irq.c.

int twl6030_interrupt_mask ( u8  bit_mask,
u8  offset 
)

Definition at line 264 of file twl6030-irq.c.

int twl6030_interrupt_unmask ( u8  bit_mask,
u8  offset 
)

Definition at line 251 of file twl6030-irq.c.

int twl_get_hfclk_rate ( void  )

twl_get_hfclk_rate - API to get TWL external HFCLK clock rate.

Api to get the TWL HFCLK rate based on BOOT_CFG register.

Definition at line 488 of file twl-core.c.

int twl_get_type ( void  )

twl_get_type - API to get TWL Si type.

Api to get the TWL Si type from IDCODE value.

Definition at line 466 of file twl-core.c.

int twl_get_version ( void  )

twl_get_version - API to get TWL Si version.

Api to get the TWL Si version from IDCODE value.

Definition at line 477 of file twl-core.c.

int twl_i2c_read ( u8  mod_no,
u8 value,
u8  reg,
unsigned  num_bytes 
)

twl_i2c_read - Reads a n bit register in TWL4030/TWL5030/TWL60X0 : module number : an array of num_bytes containing data to be read : register address (just offset will do) : number of bytes to transfer

Returns result of operation - num_bytes is success else failure.

Definition at line 341 of file twl-core.c.

int twl_i2c_read_u8 ( u8  mod_no,
u8 value,
u8  reg 
)

twl_i2c_read_u8 - Reads a 8 bit register from TWL4030/TWL5030/TWL60X0 : module number : the value read 8 bit : register address (just offset will do)

Returns result of operation - 0 is success

Definition at line 423 of file twl-core.c.

int twl_i2c_write ( u8  mod_no,
u8 value,
u8  reg,
unsigned  num_bytes 
)

twl_i2c_write - Writes a n bit register in TWL4030/TWL5030/TWL60X0 : module number : an array of num_bytes+1 containing data to write : register address (just offset will do) : number of bytes to transfer

IMPORTANT: for 'value' parameter: Allocate value num_bytes+1 and valid data starts at Offset 1.

Returns the result of operation - 0 is success

Definition at line 280 of file twl-core.c.

int twl_i2c_write_u8 ( u8  mod_no,
u8  value,
u8  reg 
)

twl_i2c_write_u8 - Writes a 8 bit register in TWL4030/TWL5030/TWL60X0 : module number : the value to be written 8 bit : register address (just offset will do)

Returns result of operation - 0 is success

Definition at line 404 of file twl-core.c.

unsigned int twl_rev ( void  )

Definition at line 164 of file twl-core.c.