Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
core.h File Reference
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/completion.h>
#include <linux/regmap.h>
#include <linux/mfd/wm8350/audio.h>
#include <linux/mfd/wm8350/gpio.h>
#include <linux/mfd/wm8350/pmic.h>
#include <linux/mfd/wm8350/rtc.h>
#include <linux/mfd/wm8350/supply.h>
#include <linux/mfd/wm8350/wdt.h>

Go to the source code of this file.

Data Structures

struct  wm8350_hwmon
 
struct  wm8350
 
struct  wm8350_platform_data
 

Macros

#define WM8350_RESET_ID   0x00
 
#define WM8350_ID   0x01
 
#define WM8350_REVISION   0x02
 
#define WM8350_SYSTEM_CONTROL_1   0x03
 
#define WM8350_SYSTEM_CONTROL_2   0x04
 
#define WM8350_SYSTEM_HIBERNATE   0x05
 
#define WM8350_INTERFACE_CONTROL   0x06
 
#define WM8350_POWER_MGMT_1   0x08
 
#define WM8350_POWER_MGMT_2   0x09
 
#define WM8350_POWER_MGMT_3   0x0A
 
#define WM8350_POWER_MGMT_4   0x0B
 
#define WM8350_POWER_MGMT_5   0x0C
 
#define WM8350_POWER_MGMT_6   0x0D
 
#define WM8350_POWER_MGMT_7   0x0E
 
#define WM8350_SYSTEM_INTERRUPTS   0x18
 
#define WM8350_INT_STATUS_1   0x19
 
#define WM8350_INT_STATUS_2   0x1A
 
#define WM8350_POWER_UP_INT_STATUS   0x1B
 
#define WM8350_UNDER_VOLTAGE_INT_STATUS   0x1C
 
#define WM8350_OVER_CURRENT_INT_STATUS   0x1D
 
#define WM8350_GPIO_INT_STATUS   0x1E
 
#define WM8350_COMPARATOR_INT_STATUS   0x1F
 
#define WM8350_SYSTEM_INTERRUPTS_MASK   0x20
 
#define WM8350_INT_STATUS_1_MASK   0x21
 
#define WM8350_INT_STATUS_2_MASK   0x22
 
#define WM8350_POWER_UP_INT_STATUS_MASK   0x23
 
#define WM8350_UNDER_VOLTAGE_INT_STATUS_MASK   0x24
 
#define WM8350_OVER_CURRENT_INT_STATUS_MASK   0x25
 
#define WM8350_GPIO_INT_STATUS_MASK   0x26
 
#define WM8350_COMPARATOR_INT_STATUS_MASK   0x27
 
#define WM8350_CHARGER_OVERRIDES   0xE2
 
#define WM8350_MISC_OVERRIDES   0xE3
 
#define WM8350_COMPARATOR_OVERRIDES   0xE7
 
#define WM8350_STATE_MACHINE_STATUS   0xE9
 
#define WM8350_MAX_REGISTER   0xFF
 
#define WM8350_UNLOCK_KEY   0x0013
 
#define WM8350_LOCK_KEY   0x0000
 
#define WM8350_SW_RESET_CHIP_ID_MASK   0xFFFF
 
#define WM8350_CHIP_REV_MASK   0x7000
 
#define WM8350_CONF_STS_MASK   0x0C00
 
#define WM8350_CUST_ID_MASK   0x00FF
 
#define WM8350_MASK_REV_MASK   0x00FF
 
#define WM8350_CHIP_ON   0x8000
 
#define WM8350_POWERCYCLE   0x2000
 
#define WM8350_VCC_FAULT_OV   0x1000
 
#define WM8350_REG_RSTB_TIME_MASK   0x0C00
 
#define WM8350_BG_SLEEP   0x0200
 
#define WM8350_MEM_VALID   0x0020
 
#define WM8350_CHIP_SET_UP   0x0010
 
#define WM8350_ON_DEB_T   0x0008
 
#define WM8350_ON_POL   0x0002
 
#define WM8350_IRQ_POL   0x0001
 
#define WM8350_USB_SUSPEND_8MA   0x8000
 
#define WM8350_USB_SUSPEND   0x4000
 
#define WM8350_USB_MSTR   0x2000
 
#define WM8350_USB_MSTR_SRC   0x1000
 
#define WM8350_USB_500MA   0x0800
 
#define WM8350_USB_NOLIM   0x0400
 
#define WM8350_HIBERNATE   0x8000
 
#define WM8350_WDOG_HIB_MODE   0x0080
 
#define WM8350_REG_HIB_STARTUP_SEQ   0x0040
 
#define WM8350_REG_RESET_HIB_MODE   0x0020
 
#define WM8350_RST_HIB_MODE   0x0010
 
#define WM8350_IRQ_HIB_MODE   0x0008
 
#define WM8350_MEMRST_HIB_MODE   0x0004
 
#define WM8350_PCCOMP_HIB_MODE   0x0002
 
#define WM8350_TEMPMON_HIB_MODE   0x0001
 
#define WM8350_USE_DEV_PINS   0x8000
 
#define WM8350_USE_DEV_PINS_MASK   0x8000
 
#define WM8350_USE_DEV_PINS_SHIFT   15
 
#define WM8350_DEV_ADDR_MASK   0x6000
 
#define WM8350_DEV_ADDR_SHIFT   13
 
#define WM8350_CONFIG_DONE   0x1000
 
#define WM8350_CONFIG_DONE_MASK   0x1000
 
#define WM8350_CONFIG_DONE_SHIFT   12
 
#define WM8350_RECONFIG_AT_ON   0x0800
 
#define WM8350_RECONFIG_AT_ON_MASK   0x0800
 
#define WM8350_RECONFIG_AT_ON_SHIFT   11
 
#define WM8350_AUTOINC   0x0200
 
#define WM8350_AUTOINC_MASK   0x0200
 
#define WM8350_AUTOINC_SHIFT   9
 
#define WM8350_ARA   0x0100
 
#define WM8350_ARA_MASK   0x0100
 
#define WM8350_ARA_SHIFT   8
 
#define WM8350_SPI_CFG   0x0008
 
#define WM8350_SPI_CFG_MASK   0x0008
 
#define WM8350_SPI_CFG_SHIFT   3
 
#define WM8350_SPI_4WIRE   0x0004
 
#define WM8350_SPI_4WIRE_MASK   0x0004
 
#define WM8350_SPI_4WIRE_SHIFT   2
 
#define WM8350_SPI_3WIRE   0x0002
 
#define WM8350_SPI_3WIRE_MASK   0x0002
 
#define WM8350_SPI_3WIRE_SHIFT   1
 
#define WM8350_USE_DEV_PINS_PRIMARY   0
 
#define WM8350_USE_DEV_PINS_DEV   1
 
#define WM8350_DEV_ADDR_34   0
 
#define WM8350_DEV_ADDR_36   1
 
#define WM8350_DEV_ADDR_3C   2
 
#define WM8350_DEV_ADDR_3E   3
 
#define WM8350_CONFIG_DONE_OFF   0
 
#define WM8350_CONFIG_DONE_DONE   1
 
#define WM8350_RECONFIG_AT_ON_OFF   0
 
#define WM8350_RECONFIG_AT_ON_ON   1
 
#define WM8350_AUTOINC_OFF   0
 
#define WM8350_AUTOINC_ON   1
 
#define WM8350_ARA_OFF   0
 
#define WM8350_ARA_ON   1
 
#define WM8350_SPI_CFG_CMOS   0
 
#define WM8350_SPI_CFG_OD   1
 
#define WM8350_SPI_4WIRE_3WIRE   0
 
#define WM8350_SPI_4WIRE_4WIRE   1
 
#define WM8350_SPI_3WIRE_I2C   0
 
#define WM8350_SPI_3WIRE_SPI   1
 
#define WM8350_CODEC_ISEL_MASK   0xC000
 
#define WM8350_VBUFEN   0x2000
 
#define WM8350_OUTPUT_DRAIN_EN   0x0400
 
#define WM8350_MIC_DET_ENA   0x0100
 
#define WM8350_BIASEN   0x0020
 
#define WM8350_MICBEN   0x0010
 
#define WM8350_VMIDEN   0x0004
 
#define WM8350_VMID_MASK   0x0003
 
#define WM8350_VMID_SHIFT   0
 
#define WM8350_IN3R_ENA   0x0800
 
#define WM8350_IN3L_ENA   0x0400
 
#define WM8350_INR_ENA   0x0200
 
#define WM8350_INL_ENA   0x0100
 
#define WM8350_MIXINR_ENA   0x0080
 
#define WM8350_MIXINL_ENA   0x0040
 
#define WM8350_OUT4_ENA   0x0020
 
#define WM8350_OUT3_ENA   0x0010
 
#define WM8350_MIXOUTR_ENA   0x0002
 
#define WM8350_MIXOUTL_ENA   0x0001
 
#define WM8350_IN3R_TO_OUT2R   0x0080
 
#define WM8350_OUT2R_ENA   0x0008
 
#define WM8350_OUT2L_ENA   0x0004
 
#define WM8350_OUT1R_ENA   0x0002
 
#define WM8350_OUT1L_ENA   0x0001
 
#define WM8350_SYSCLK_ENA   0x4000
 
#define WM8350_ADC_HPF_ENA   0x2000
 
#define WM8350_FLL_ENA   0x0800
 
#define WM8350_FLL_OSC_ENA   0x0400
 
#define WM8350_TOCLK_ENA   0x0100
 
#define WM8350_DACR_ENA   0x0020
 
#define WM8350_DACL_ENA   0x0010
 
#define WM8350_ADCR_ENA   0x0008
 
#define WM8350_ADCL_ENA   0x0004
 
#define WM8350_CODEC_ENA   0x1000
 
#define WM8350_RTC_TICK_ENA   0x0800
 
#define WM8350_OSC32K_ENA   0x0400
 
#define WM8350_CHG_ENA   0x0200
 
#define WM8350_ACC_DET_ENA   0x0100
 
#define WM8350_AUXADC_ENA   0x0080
 
#define WM8350_DCMP4_ENA   0x0008
 
#define WM8350_DCMP3_ENA   0x0004
 
#define WM8350_DCMP2_ENA   0x0002
 
#define WM8350_DCMP1_ENA   0x0001
 
#define WM8350_LS_ENA   0x8000
 
#define WM8350_LDO4_ENA   0x0800
 
#define WM8350_LDO3_ENA   0x0400
 
#define WM8350_LDO2_ENA   0x0200
 
#define WM8350_LDO1_ENA   0x0100
 
#define WM8350_DC6_ENA   0x0020
 
#define WM8350_DC5_ENA   0x0010
 
#define WM8350_DC4_ENA   0x0008
 
#define WM8350_DC3_ENA   0x0004
 
#define WM8350_DC2_ENA   0x0002
 
#define WM8350_DC1_ENA   0x0001
 
#define WM8350_CS2_ENA   0x0002
 
#define WM8350_CS1_ENA   0x0001
 
#define WM8350_OC_INT   0x2000
 
#define WM8350_UV_INT   0x1000
 
#define WM8350_PUTO_INT   0x0800
 
#define WM8350_CS_INT   0x0200
 
#define WM8350_EXT_INT   0x0100
 
#define WM8350_CODEC_INT   0x0080
 
#define WM8350_GP_INT   0x0040
 
#define WM8350_AUXADC_INT   0x0020
 
#define WM8350_RTC_INT   0x0010
 
#define WM8350_SYS_INT   0x0008
 
#define WM8350_CHG_INT   0x0004
 
#define WM8350_USB_INT   0x0002
 
#define WM8350_WKUP_INT   0x0001
 
#define WM8350_CHG_BAT_HOT_EINT   0x8000
 
#define WM8350_CHG_BAT_COLD_EINT   0x4000
 
#define WM8350_CHG_BAT_FAIL_EINT   0x2000
 
#define WM8350_CHG_TO_EINT   0x1000
 
#define WM8350_CHG_END_EINT   0x0800
 
#define WM8350_CHG_START_EINT   0x0400
 
#define WM8350_CHG_FAST_RDY_EINT   0x0200
 
#define WM8350_RTC_PER_EINT   0x0080
 
#define WM8350_RTC_SEC_EINT   0x0040
 
#define WM8350_RTC_ALM_EINT   0x0020
 
#define WM8350_CHG_VBATT_LT_3P9_EINT   0x0004
 
#define WM8350_CHG_VBATT_LT_3P1_EINT   0x0002
 
#define WM8350_CHG_VBATT_LT_2P85_EINT   0x0001
 
#define WM8350_CS1_EINT   0x2000
 
#define WM8350_CS2_EINT   0x1000
 
#define WM8350_USB_LIMIT_EINT   0x0400
 
#define WM8350_AUXADC_DATARDY_EINT   0x0100
 
#define WM8350_AUXADC_DCOMP4_EINT   0x0080
 
#define WM8350_AUXADC_DCOMP3_EINT   0x0040
 
#define WM8350_AUXADC_DCOMP2_EINT   0x0020
 
#define WM8350_AUXADC_DCOMP1_EINT   0x0010
 
#define WM8350_SYS_HYST_COMP_FAIL_EINT   0x0008
 
#define WM8350_SYS_CHIP_GT115_EINT   0x0004
 
#define WM8350_SYS_CHIP_GT140_EINT   0x0002
 
#define WM8350_SYS_WDOG_TO_EINT   0x0001
 
#define WM8350_PUTO_LDO4_EINT   0x0800
 
#define WM8350_PUTO_LDO3_EINT   0x0400
 
#define WM8350_PUTO_LDO2_EINT   0x0200
 
#define WM8350_PUTO_LDO1_EINT   0x0100
 
#define WM8350_PUTO_DC6_EINT   0x0020
 
#define WM8350_PUTO_DC5_EINT   0x0010
 
#define WM8350_PUTO_DC4_EINT   0x0008
 
#define WM8350_PUTO_DC3_EINT   0x0004
 
#define WM8350_PUTO_DC2_EINT   0x0002
 
#define WM8350_PUTO_DC1_EINT   0x0001
 
#define WM8350_UV_LDO4_EINT   0x0800
 
#define WM8350_UV_LDO3_EINT   0x0400
 
#define WM8350_UV_LDO2_EINT   0x0200
 
#define WM8350_UV_LDO1_EINT   0x0100
 
#define WM8350_UV_DC6_EINT   0x0020
 
#define WM8350_UV_DC5_EINT   0x0010
 
#define WM8350_UV_DC4_EINT   0x0008
 
#define WM8350_UV_DC3_EINT   0x0004
 
#define WM8350_UV_DC2_EINT   0x0002
 
#define WM8350_UV_DC1_EINT   0x0001
 
#define WM8350_OC_LS_EINT   0x8000
 
#define WM8350_GP12_EINT   0x1000
 
#define WM8350_GP11_EINT   0x0800
 
#define WM8350_GP10_EINT   0x0400
 
#define WM8350_GP9_EINT   0x0200
 
#define WM8350_GP8_EINT   0x0100
 
#define WM8350_GP7_EINT   0x0080
 
#define WM8350_GP6_EINT   0x0040
 
#define WM8350_GP5_EINT   0x0020
 
#define WM8350_GP4_EINT   0x0010
 
#define WM8350_GP3_EINT   0x0008
 
#define WM8350_GP2_EINT   0x0004
 
#define WM8350_GP1_EINT   0x0002
 
#define WM8350_GP0_EINT   0x0001
 
#define WM8350_EXT_USB_FB_EINT   0x8000
 
#define WM8350_EXT_WALL_FB_EINT   0x4000
 
#define WM8350_EXT_BAT_FB_EINT   0x2000
 
#define WM8350_CODEC_JCK_DET_L_EINT   0x0800
 
#define WM8350_CODEC_JCK_DET_R_EINT   0x0400
 
#define WM8350_CODEC_MICSCD_EINT   0x0200
 
#define WM8350_CODEC_MICD_EINT   0x0100
 
#define WM8350_WKUP_OFF_STATE_EINT   0x0040
 
#define WM8350_WKUP_HIB_STATE_EINT   0x0020
 
#define WM8350_WKUP_CONV_FAULT_EINT   0x0010
 
#define WM8350_WKUP_WDOG_RST_EINT   0x0008
 
#define WM8350_WKUP_GP_PWR_ON_EINT   0x0004
 
#define WM8350_WKUP_ONKEY_EINT   0x0002
 
#define WM8350_WKUP_GP_WAKEUP_EINT   0x0001
 
#define WM8350_IM_OC_INT   0x2000
 
#define WM8350_IM_UV_INT   0x1000
 
#define WM8350_IM_PUTO_INT   0x0800
 
#define WM8350_IM_SPARE_INT   0x0400
 
#define WM8350_IM_CS_INT   0x0200
 
#define WM8350_IM_EXT_INT   0x0100
 
#define WM8350_IM_CODEC_INT   0x0080
 
#define WM8350_IM_GP_INT   0x0040
 
#define WM8350_IM_AUXADC_INT   0x0020
 
#define WM8350_IM_RTC_INT   0x0010
 
#define WM8350_IM_SYS_INT   0x0008
 
#define WM8350_IM_CHG_INT   0x0004
 
#define WM8350_IM_USB_INT   0x0002
 
#define WM8350_IM_WKUP_INT   0x0001
 
#define WM8350_IM_CHG_BAT_HOT_EINT   0x8000
 
#define WM8350_IM_CHG_BAT_COLD_EINT   0x4000
 
#define WM8350_IM_CHG_BAT_FAIL_EINT   0x2000
 
#define WM8350_IM_CHG_TO_EINT   0x1000
 
#define WM8350_IM_CHG_END_EINT   0x0800
 
#define WM8350_IM_CHG_START_EINT   0x0400
 
#define WM8350_IM_CHG_FAST_RDY_EINT   0x0200
 
#define WM8350_IM_RTC_PER_EINT   0x0080
 
#define WM8350_IM_RTC_SEC_EINT   0x0040
 
#define WM8350_IM_RTC_ALM_EINT   0x0020
 
#define WM8350_IM_CHG_VBATT_LT_3P9_EINT   0x0004
 
#define WM8350_IM_CHG_VBATT_LT_3P1_EINT   0x0002
 
#define WM8350_IM_CHG_VBATT_LT_2P85_EINT   0x0001
 
#define WM8350_IM_SPARE2_EINT   0x8000
 
#define WM8350_IM_SPARE1_EINT   0x4000
 
#define WM8350_IM_CS1_EINT   0x2000
 
#define WM8350_IM_CS2_EINT   0x1000
 
#define WM8350_IM_USB_LIMIT_EINT   0x0400
 
#define WM8350_IM_AUXADC_DATARDY_EINT   0x0100
 
#define WM8350_IM_AUXADC_DCOMP4_EINT   0x0080
 
#define WM8350_IM_AUXADC_DCOMP3_EINT   0x0040
 
#define WM8350_IM_AUXADC_DCOMP2_EINT   0x0020
 
#define WM8350_IM_AUXADC_DCOMP1_EINT   0x0010
 
#define WM8350_IM_SYS_HYST_COMP_FAIL_EINT   0x0008
 
#define WM8350_IM_SYS_CHIP_GT115_EINT   0x0004
 
#define WM8350_IM_SYS_CHIP_GT140_EINT   0x0002
 
#define WM8350_IM_SYS_WDOG_TO_EINT   0x0001
 
#define WM8350_IM_PUTO_LDO4_EINT   0x0800
 
#define WM8350_IM_PUTO_LDO3_EINT   0x0400
 
#define WM8350_IM_PUTO_LDO2_EINT   0x0200
 
#define WM8350_IM_PUTO_LDO1_EINT   0x0100
 
#define WM8350_IM_PUTO_DC6_EINT   0x0020
 
#define WM8350_IM_PUTO_DC5_EINT   0x0010
 
#define WM8350_IM_PUTO_DC4_EINT   0x0008
 
#define WM8350_IM_PUTO_DC3_EINT   0x0004
 
#define WM8350_IM_PUTO_DC2_EINT   0x0002
 
#define WM8350_IM_PUTO_DC1_EINT   0x0001
 
#define WM8350_IM_UV_LDO4_EINT   0x0800
 
#define WM8350_IM_UV_LDO3_EINT   0x0400
 
#define WM8350_IM_UV_LDO2_EINT   0x0200
 
#define WM8350_IM_UV_LDO1_EINT   0x0100
 
#define WM8350_IM_UV_DC6_EINT   0x0020
 
#define WM8350_IM_UV_DC5_EINT   0x0010
 
#define WM8350_IM_UV_DC4_EINT   0x0008
 
#define WM8350_IM_UV_DC3_EINT   0x0004
 
#define WM8350_IM_UV_DC2_EINT   0x0002
 
#define WM8350_IM_UV_DC1_EINT   0x0001
 
#define WM8350_IM_OC_LS_EINT   0x8000
 
#define WM8350_IM_GP12_EINT   0x1000
 
#define WM8350_IM_GP11_EINT   0x0800
 
#define WM8350_IM_GP10_EINT   0x0400
 
#define WM8350_IM_GP9_EINT   0x0200
 
#define WM8350_IM_GP8_EINT   0x0100
 
#define WM8350_IM_GP7_EINT   0x0080
 
#define WM8350_IM_GP6_EINT   0x0040
 
#define WM8350_IM_GP5_EINT   0x0020
 
#define WM8350_IM_GP4_EINT   0x0010
 
#define WM8350_IM_GP3_EINT   0x0008
 
#define WM8350_IM_GP2_EINT   0x0004
 
#define WM8350_IM_GP1_EINT   0x0002
 
#define WM8350_IM_GP0_EINT   0x0001
 
#define WM8350_IM_EXT_USB_FB_EINT   0x8000
 
#define WM8350_IM_EXT_WALL_FB_EINT   0x4000
 
#define WM8350_IM_EXT_BAT_FB_EINT   0x2000
 
#define WM8350_IM_CODEC_JCK_DET_L_EINT   0x0800
 
#define WM8350_IM_CODEC_JCK_DET_R_EINT   0x0400
 
#define WM8350_IM_CODEC_MICSCD_EINT   0x0200
 
#define WM8350_IM_CODEC_MICD_EINT   0x0100
 
#define WM8350_IM_WKUP_OFF_STATE_EINT   0x0040
 
#define WM8350_IM_WKUP_HIB_STATE_EINT   0x0020
 
#define WM8350_IM_WKUP_CONV_FAULT_EINT   0x0010
 
#define WM8350_IM_WKUP_WDOG_RST_EINT   0x0008
 
#define WM8350_IM_WKUP_GP_PWR_ON_EINT   0x0004
 
#define WM8350_IM_WKUP_ONKEY_EINT   0x0002
 
#define WM8350_IM_WKUP_GP_WAKEUP_EINT   0x0001
 
#define WM8350_READ_STATUS   0x0800
 
#define WM8350_TSTRAM_CLK   0x0100
 
#define WM8350_TSTRAM_CLK_ENA   0x0080
 
#define WM8350_STARTSEQ   0x0040
 
#define WM8350_READ_SRC   0x0020
 
#define WM8350_COUNT_DIR   0x0010
 
#define WM8350_TSTRAM_MODE_MASK   0x000E
 
#define WM8350_TSTRAM_ENA   0x0001
 
#define WM8350_LS_STS   0x8000
 
#define WM8350_LDO4_STS   0x0800
 
#define WM8350_LDO3_STS   0x0400
 
#define WM8350_LDO2_STS   0x0200
 
#define WM8350_LDO1_STS   0x0100
 
#define WM8350_DC6_STS   0x0020
 
#define WM8350_DC5_STS   0x0010
 
#define WM8350_DC4_STS   0x0008
 
#define WM8350_DC3_STS   0x0004
 
#define WM8350_DC2_STS   0x0002
 
#define WM8350_DC1_STS   0x0001
 
#define WM8350_CHG_BATT_HOT_OVRDE   0x8000
 
#define WM8350_CHG_BATT_COLD_OVRDE   0x4000
 
#define WM8350_USB_LIMIT_OVRDE   0x0400
 
#define WM8350_USB_FB_OVRDE   0x8000
 
#define WM8350_WALL_FB_OVRDE   0x4000
 
#define WM8350_BATT_FB_OVRDE   0x2000
 
#define WM8350_USB_SM_MASK   0x0700
 
#define WM8350_USB_SM_SHIFT   8
 
#define WM8350_USB_SM_100_SLV   1
 
#define WM8350_USB_SM_500_SLV   5
 
#define WM8350_USB_SM_STDBY_SLV   7
 
#define WM8350_IRQ_WKUP_OFF_STATE   43
 
#define WM8350_IRQ_WKUP_HIB_STATE   44
 
#define WM8350_IRQ_WKUP_CONV_FAULT   45
 
#define WM8350_IRQ_WKUP_WDOG_RST   46
 
#define WM8350_IRQ_WKUP_GP_PWR_ON   47
 
#define WM8350_IRQ_WKUP_ONKEY   48
 
#define WM8350_IRQ_WKUP_GP_WAKEUP   49
 
#define WM8350_REV_E   0x4
 
#define WM8350_REV_F   0x5
 
#define WM8350_REV_G   0x6
 
#define WM8350_REV_H   0x7
 
#define WM8350_NUM_IRQ   63
 
#define WM8350_NUM_IRQ_REGS   7
 

Functions

int wm8350_device_init (struct wm8350 *wm8350, int irq, struct wm8350_platform_data *pdata)
 
void wm8350_device_exit (struct wm8350 *wm8350)
 
int wm8350_clear_bits (struct wm8350 *wm8350, u16 reg, u16 mask)
 
int wm8350_set_bits (struct wm8350 *wm8350, u16 reg, u16 mask)
 
u16 wm8350_reg_read (struct wm8350 *wm8350, int reg)
 
int wm8350_reg_write (struct wm8350 *wm8350, int reg, u16 val)
 
int wm8350_reg_lock (struct wm8350 *wm8350)
 
int wm8350_reg_unlock (struct wm8350 *wm8350)
 
int wm8350_block_read (struct wm8350 *wm8350, int reg, int size, u16 *dest)
 
int wm8350_block_write (struct wm8350 *wm8350, int reg, int size, u16 *src)
 
int wm8350_irq_init (struct wm8350 *wm8350, int irq, struct wm8350_platform_data *pdata)
 
int wm8350_irq_exit (struct wm8350 *wm8350)
 

Variables

struct regmap_config wm8350_regmap
 

Macro Definition Documentation

#define WM8350_ACC_DET_ENA   0x0100

Definition at line 247 of file core.h.

#define WM8350_ADC_HPF_ENA   0x2000

Definition at line 231 of file core.h.

#define WM8350_ADCL_ENA   0x0004

Definition at line 238 of file core.h.

#define WM8350_ADCR_ENA   0x0008

Definition at line 237 of file core.h.

#define WM8350_ARA   0x0100

Definition at line 148 of file core.h.

#define WM8350_ARA_MASK   0x0100

Definition at line 149 of file core.h.

#define WM8350_ARA_OFF   0

Definition at line 179 of file core.h.

#define WM8350_ARA_ON   1

Definition at line 180 of file core.h.

#define WM8350_ARA_SHIFT   8

Definition at line 150 of file core.h.

#define WM8350_AUTOINC   0x0200

Definition at line 145 of file core.h.

#define WM8350_AUTOINC_MASK   0x0200

Definition at line 146 of file core.h.

#define WM8350_AUTOINC_OFF   0

Definition at line 176 of file core.h.

#define WM8350_AUTOINC_ON   1

Definition at line 177 of file core.h.

#define WM8350_AUTOINC_SHIFT   9

Definition at line 147 of file core.h.

#define WM8350_AUXADC_DATARDY_EINT   0x0100

Definition at line 315 of file core.h.

#define WM8350_AUXADC_DCOMP1_EINT   0x0010

Definition at line 319 of file core.h.

#define WM8350_AUXADC_DCOMP2_EINT   0x0020

Definition at line 318 of file core.h.

#define WM8350_AUXADC_DCOMP3_EINT   0x0040

Definition at line 317 of file core.h.

#define WM8350_AUXADC_DCOMP4_EINT   0x0080

Definition at line 316 of file core.h.

#define WM8350_AUXADC_ENA   0x0080

Definition at line 248 of file core.h.

#define WM8350_AUXADC_INT   0x0020

Definition at line 285 of file core.h.

#define WM8350_BATT_FB_OVRDE   0x2000

Definition at line 557 of file core.h.

#define WM8350_BG_SLEEP   0x0200

Definition at line 101 of file core.h.

#define WM8350_BIASEN   0x0020

Definition at line 198 of file core.h.

#define WM8350_CHARGER_OVERRIDES   0xE2

Definition at line 63 of file core.h.

#define WM8350_CHG_BAT_COLD_EINT   0x4000

Definition at line 296 of file core.h.

#define WM8350_CHG_BAT_FAIL_EINT   0x2000

Definition at line 297 of file core.h.

#define WM8350_CHG_BAT_HOT_EINT   0x8000

Definition at line 295 of file core.h.

#define WM8350_CHG_BATT_COLD_OVRDE   0x4000

Definition at line 545 of file core.h.

#define WM8350_CHG_BATT_HOT_OVRDE   0x8000

Definition at line 544 of file core.h.

#define WM8350_CHG_ENA   0x0200

Definition at line 246 of file core.h.

#define WM8350_CHG_END_EINT   0x0800

Definition at line 299 of file core.h.

#define WM8350_CHG_FAST_RDY_EINT   0x0200

Definition at line 301 of file core.h.

#define WM8350_CHG_INT   0x0004

Definition at line 288 of file core.h.

#define WM8350_CHG_START_EINT   0x0400

Definition at line 300 of file core.h.

#define WM8350_CHG_TO_EINT   0x1000

Definition at line 298 of file core.h.

#define WM8350_CHG_VBATT_LT_2P85_EINT   0x0001

Definition at line 307 of file core.h.

#define WM8350_CHG_VBATT_LT_3P1_EINT   0x0002

Definition at line 306 of file core.h.

#define WM8350_CHG_VBATT_LT_3P9_EINT   0x0004

Definition at line 305 of file core.h.

#define WM8350_CHIP_ON   0x8000

Definition at line 97 of file core.h.

#define WM8350_CHIP_REV_MASK   0x7000

Definition at line 85 of file core.h.

#define WM8350_CHIP_SET_UP   0x0010

Definition at line 103 of file core.h.

#define WM8350_CODEC_ENA   0x1000

Definition at line 243 of file core.h.

#define WM8350_CODEC_INT   0x0080

Definition at line 283 of file core.h.

#define WM8350_CODEC_ISEL_MASK   0xC000

Definition at line 194 of file core.h.

#define WM8350_CODEC_JCK_DET_L_EINT   0x0800

Definition at line 381 of file core.h.

#define WM8350_CODEC_JCK_DET_R_EINT   0x0400

Definition at line 382 of file core.h.

#define WM8350_CODEC_MICD_EINT   0x0100

Definition at line 384 of file core.h.

#define WM8350_CODEC_MICSCD_EINT   0x0200

Definition at line 383 of file core.h.

#define WM8350_COMPARATOR_INT_STATUS   0x1F

Definition at line 54 of file core.h.

#define WM8350_COMPARATOR_INT_STATUS_MASK   0x27

Definition at line 62 of file core.h.

#define WM8350_COMPARATOR_OVERRIDES   0xE7

Definition at line 65 of file core.h.

#define WM8350_CONF_STS_MASK   0x0C00

Definition at line 86 of file core.h.

#define WM8350_CONFIG_DONE   0x1000

Definition at line 139 of file core.h.

#define WM8350_CONFIG_DONE_DONE   1

Definition at line 171 of file core.h.

#define WM8350_CONFIG_DONE_MASK   0x1000

Definition at line 140 of file core.h.

#define WM8350_CONFIG_DONE_OFF   0

Definition at line 170 of file core.h.

#define WM8350_CONFIG_DONE_SHIFT   12

Definition at line 141 of file core.h.

#define WM8350_COUNT_DIR   0x0010

Definition at line 522 of file core.h.

#define WM8350_CS1_EINT   0x2000

Definition at line 312 of file core.h.

#define WM8350_CS1_ENA   0x0001

Definition at line 273 of file core.h.

#define WM8350_CS2_EINT   0x1000

Definition at line 313 of file core.h.

#define WM8350_CS2_ENA   0x0002

Definition at line 272 of file core.h.

#define WM8350_CS_INT   0x0200

Definition at line 281 of file core.h.

#define WM8350_CUST_ID_MASK   0x00FF

Definition at line 87 of file core.h.

#define WM8350_DACL_ENA   0x0010

Definition at line 236 of file core.h.

#define WM8350_DACR_ENA   0x0020

Definition at line 235 of file core.h.

#define WM8350_DC1_ENA   0x0001

Definition at line 267 of file core.h.

#define WM8350_DC1_STS   0x0001

Definition at line 539 of file core.h.

#define WM8350_DC2_ENA   0x0002

Definition at line 266 of file core.h.

#define WM8350_DC2_STS   0x0002

Definition at line 538 of file core.h.

#define WM8350_DC3_ENA   0x0004

Definition at line 265 of file core.h.

#define WM8350_DC3_STS   0x0004

Definition at line 537 of file core.h.

#define WM8350_DC4_ENA   0x0008

Definition at line 264 of file core.h.

#define WM8350_DC4_STS   0x0008

Definition at line 536 of file core.h.

#define WM8350_DC5_ENA   0x0010

Definition at line 263 of file core.h.

#define WM8350_DC5_STS   0x0010

Definition at line 535 of file core.h.

#define WM8350_DC6_ENA   0x0020

Definition at line 262 of file core.h.

#define WM8350_DC6_STS   0x0020

Definition at line 534 of file core.h.

#define WM8350_DCMP1_ENA   0x0001

Definition at line 252 of file core.h.

#define WM8350_DCMP2_ENA   0x0002

Definition at line 251 of file core.h.

#define WM8350_DCMP3_ENA   0x0004

Definition at line 250 of file core.h.

#define WM8350_DCMP4_ENA   0x0008

Definition at line 249 of file core.h.

#define WM8350_DEV_ADDR_34   0

Definition at line 165 of file core.h.

#define WM8350_DEV_ADDR_36   1

Definition at line 166 of file core.h.

#define WM8350_DEV_ADDR_3C   2

Definition at line 167 of file core.h.

#define WM8350_DEV_ADDR_3E   3

Definition at line 168 of file core.h.

#define WM8350_DEV_ADDR_MASK   0x6000

Definition at line 137 of file core.h.

#define WM8350_DEV_ADDR_SHIFT   13

Definition at line 138 of file core.h.

#define WM8350_EXT_BAT_FB_EINT   0x2000

Definition at line 380 of file core.h.

#define WM8350_EXT_INT   0x0100

Definition at line 282 of file core.h.

#define WM8350_EXT_USB_FB_EINT   0x8000

Definition at line 378 of file core.h.

#define WM8350_EXT_WALL_FB_EINT   0x4000

Definition at line 379 of file core.h.

#define WM8350_FLL_ENA   0x0800

Definition at line 232 of file core.h.

#define WM8350_FLL_OSC_ENA   0x0400

Definition at line 233 of file core.h.

#define WM8350_GP0_EINT   0x0001

Definition at line 373 of file core.h.

#define WM8350_GP10_EINT   0x0400

Definition at line 363 of file core.h.

#define WM8350_GP11_EINT   0x0800

Definition at line 362 of file core.h.

#define WM8350_GP12_EINT   0x1000

Definition at line 361 of file core.h.

#define WM8350_GP1_EINT   0x0002

Definition at line 372 of file core.h.

#define WM8350_GP2_EINT   0x0004

Definition at line 371 of file core.h.

#define WM8350_GP3_EINT   0x0008

Definition at line 370 of file core.h.

#define WM8350_GP4_EINT   0x0010

Definition at line 369 of file core.h.

#define WM8350_GP5_EINT   0x0020

Definition at line 368 of file core.h.

#define WM8350_GP6_EINT   0x0040

Definition at line 367 of file core.h.

#define WM8350_GP7_EINT   0x0080

Definition at line 366 of file core.h.

#define WM8350_GP8_EINT   0x0100

Definition at line 365 of file core.h.

#define WM8350_GP9_EINT   0x0200

Definition at line 364 of file core.h.

#define WM8350_GP_INT   0x0040

Definition at line 284 of file core.h.

#define WM8350_GPIO_INT_STATUS   0x1E

Definition at line 53 of file core.h.

#define WM8350_GPIO_INT_STATUS_MASK   0x26

Definition at line 61 of file core.h.

#define WM8350_HIBERNATE   0x8000

Definition at line 121 of file core.h.

#define WM8350_ID   0x01

Definition at line 33 of file core.h.

#define WM8350_IM_AUXADC_DATARDY_EINT   0x0100

Definition at line 436 of file core.h.

#define WM8350_IM_AUXADC_DCOMP1_EINT   0x0010

Definition at line 440 of file core.h.

#define WM8350_IM_AUXADC_DCOMP2_EINT   0x0020

Definition at line 439 of file core.h.

#define WM8350_IM_AUXADC_DCOMP3_EINT   0x0040

Definition at line 438 of file core.h.

#define WM8350_IM_AUXADC_DCOMP4_EINT   0x0080

Definition at line 437 of file core.h.

#define WM8350_IM_AUXADC_INT   0x0020

Definition at line 404 of file core.h.

#define WM8350_IM_CHG_BAT_COLD_EINT   0x4000

Definition at line 415 of file core.h.

#define WM8350_IM_CHG_BAT_FAIL_EINT   0x2000

Definition at line 416 of file core.h.

#define WM8350_IM_CHG_BAT_HOT_EINT   0x8000

Definition at line 414 of file core.h.

#define WM8350_IM_CHG_END_EINT   0x0800

Definition at line 418 of file core.h.

#define WM8350_IM_CHG_FAST_RDY_EINT   0x0200

Definition at line 420 of file core.h.

#define WM8350_IM_CHG_INT   0x0004

Definition at line 407 of file core.h.

#define WM8350_IM_CHG_START_EINT   0x0400

Definition at line 419 of file core.h.

#define WM8350_IM_CHG_TO_EINT   0x1000

Definition at line 417 of file core.h.

#define WM8350_IM_CHG_VBATT_LT_2P85_EINT   0x0001

Definition at line 426 of file core.h.

#define WM8350_IM_CHG_VBATT_LT_3P1_EINT   0x0002

Definition at line 425 of file core.h.

#define WM8350_IM_CHG_VBATT_LT_3P9_EINT   0x0004

Definition at line 424 of file core.h.

#define WM8350_IM_CODEC_INT   0x0080

Definition at line 402 of file core.h.

#define WM8350_IM_CODEC_JCK_DET_L_EINT   0x0800

Definition at line 502 of file core.h.

#define WM8350_IM_CODEC_JCK_DET_R_EINT   0x0400

Definition at line 503 of file core.h.

#define WM8350_IM_CODEC_MICD_EINT   0x0100

Definition at line 505 of file core.h.

#define WM8350_IM_CODEC_MICSCD_EINT   0x0200

Definition at line 504 of file core.h.

#define WM8350_IM_CS1_EINT   0x2000

Definition at line 433 of file core.h.

#define WM8350_IM_CS2_EINT   0x1000

Definition at line 434 of file core.h.

#define WM8350_IM_CS_INT   0x0200

Definition at line 400 of file core.h.

#define WM8350_IM_EXT_BAT_FB_EINT   0x2000

Definition at line 501 of file core.h.

#define WM8350_IM_EXT_INT   0x0100

Definition at line 401 of file core.h.

#define WM8350_IM_EXT_USB_FB_EINT   0x8000

Definition at line 499 of file core.h.

#define WM8350_IM_EXT_WALL_FB_EINT   0x4000

Definition at line 500 of file core.h.

#define WM8350_IM_GP0_EINT   0x0001

Definition at line 494 of file core.h.

#define WM8350_IM_GP10_EINT   0x0400

Definition at line 484 of file core.h.

#define WM8350_IM_GP11_EINT   0x0800

Definition at line 483 of file core.h.

#define WM8350_IM_GP12_EINT   0x1000

Definition at line 482 of file core.h.

#define WM8350_IM_GP1_EINT   0x0002

Definition at line 493 of file core.h.

#define WM8350_IM_GP2_EINT   0x0004

Definition at line 492 of file core.h.

#define WM8350_IM_GP3_EINT   0x0008

Definition at line 491 of file core.h.

#define WM8350_IM_GP4_EINT   0x0010

Definition at line 490 of file core.h.

#define WM8350_IM_GP5_EINT   0x0020

Definition at line 489 of file core.h.

#define WM8350_IM_GP6_EINT   0x0040

Definition at line 488 of file core.h.

#define WM8350_IM_GP7_EINT   0x0080

Definition at line 487 of file core.h.

#define WM8350_IM_GP8_EINT   0x0100

Definition at line 486 of file core.h.

#define WM8350_IM_GP9_EINT   0x0200

Definition at line 485 of file core.h.

#define WM8350_IM_GP_INT   0x0040

Definition at line 403 of file core.h.

#define WM8350_IM_OC_INT   0x2000

Definition at line 396 of file core.h.

#define WM8350_IM_OC_LS_EINT   0x8000

Definition at line 477 of file core.h.

#define WM8350_IM_PUTO_DC1_EINT   0x0001

Definition at line 458 of file core.h.

#define WM8350_IM_PUTO_DC2_EINT   0x0002

Definition at line 457 of file core.h.

#define WM8350_IM_PUTO_DC3_EINT   0x0004

Definition at line 456 of file core.h.

#define WM8350_IM_PUTO_DC4_EINT   0x0008

Definition at line 455 of file core.h.

#define WM8350_IM_PUTO_DC5_EINT   0x0010

Definition at line 454 of file core.h.

#define WM8350_IM_PUTO_DC6_EINT   0x0020

Definition at line 453 of file core.h.

#define WM8350_IM_PUTO_INT   0x0800

Definition at line 398 of file core.h.

#define WM8350_IM_PUTO_LDO1_EINT   0x0100

Definition at line 452 of file core.h.

#define WM8350_IM_PUTO_LDO2_EINT   0x0200

Definition at line 451 of file core.h.

#define WM8350_IM_PUTO_LDO3_EINT   0x0400

Definition at line 450 of file core.h.

#define WM8350_IM_PUTO_LDO4_EINT   0x0800

Definition at line 449 of file core.h.

#define WM8350_IM_RTC_ALM_EINT   0x0020

Definition at line 423 of file core.h.

#define WM8350_IM_RTC_INT   0x0010

Definition at line 405 of file core.h.

#define WM8350_IM_RTC_PER_EINT   0x0080

Definition at line 421 of file core.h.

#define WM8350_IM_RTC_SEC_EINT   0x0040

Definition at line 422 of file core.h.

#define WM8350_IM_SPARE1_EINT   0x4000

Definition at line 432 of file core.h.

#define WM8350_IM_SPARE2_EINT   0x8000

Definition at line 431 of file core.h.

#define WM8350_IM_SPARE_INT   0x0400

Definition at line 399 of file core.h.

#define WM8350_IM_SYS_CHIP_GT115_EINT   0x0004

Definition at line 442 of file core.h.

#define WM8350_IM_SYS_CHIP_GT140_EINT   0x0002

Definition at line 443 of file core.h.

#define WM8350_IM_SYS_HYST_COMP_FAIL_EINT   0x0008

Definition at line 441 of file core.h.

#define WM8350_IM_SYS_INT   0x0008

Definition at line 406 of file core.h.

#define WM8350_IM_SYS_WDOG_TO_EINT   0x0001

Definition at line 444 of file core.h.

#define WM8350_IM_USB_INT   0x0002

Definition at line 408 of file core.h.

#define WM8350_IM_USB_LIMIT_EINT   0x0400

Definition at line 435 of file core.h.

#define WM8350_IM_UV_DC1_EINT   0x0001

Definition at line 472 of file core.h.

#define WM8350_IM_UV_DC2_EINT   0x0002

Definition at line 471 of file core.h.

#define WM8350_IM_UV_DC3_EINT   0x0004

Definition at line 470 of file core.h.

#define WM8350_IM_UV_DC4_EINT   0x0008

Definition at line 469 of file core.h.

#define WM8350_IM_UV_DC5_EINT   0x0010

Definition at line 468 of file core.h.

#define WM8350_IM_UV_DC6_EINT   0x0020

Definition at line 467 of file core.h.

#define WM8350_IM_UV_INT   0x1000

Definition at line 397 of file core.h.

#define WM8350_IM_UV_LDO1_EINT   0x0100

Definition at line 466 of file core.h.

#define WM8350_IM_UV_LDO2_EINT   0x0200

Definition at line 465 of file core.h.

#define WM8350_IM_UV_LDO3_EINT   0x0400

Definition at line 464 of file core.h.

#define WM8350_IM_UV_LDO4_EINT   0x0800

Definition at line 463 of file core.h.

#define WM8350_IM_WKUP_CONV_FAULT_EINT   0x0010

Definition at line 508 of file core.h.

#define WM8350_IM_WKUP_GP_PWR_ON_EINT   0x0004

Definition at line 510 of file core.h.

#define WM8350_IM_WKUP_GP_WAKEUP_EINT   0x0001

Definition at line 512 of file core.h.

#define WM8350_IM_WKUP_HIB_STATE_EINT   0x0020

Definition at line 507 of file core.h.

#define WM8350_IM_WKUP_INT   0x0001

Definition at line 409 of file core.h.

#define WM8350_IM_WKUP_OFF_STATE_EINT   0x0040

Definition at line 506 of file core.h.

#define WM8350_IM_WKUP_ONKEY_EINT   0x0002

Definition at line 511 of file core.h.

#define WM8350_IM_WKUP_WDOG_RST_EINT   0x0008

Definition at line 509 of file core.h.

#define WM8350_IN3L_ENA   0x0400

Definition at line 208 of file core.h.

#define WM8350_IN3R_ENA   0x0800

Definition at line 207 of file core.h.

#define WM8350_IN3R_TO_OUT2R   0x0080

Definition at line 221 of file core.h.

#define WM8350_INL_ENA   0x0100

Definition at line 210 of file core.h.

#define WM8350_INR_ENA   0x0200

Definition at line 209 of file core.h.

#define WM8350_INT_STATUS_1   0x19

Definition at line 48 of file core.h.

#define WM8350_INT_STATUS_1_MASK   0x21

Definition at line 56 of file core.h.

#define WM8350_INT_STATUS_2   0x1A

Definition at line 49 of file core.h.

#define WM8350_INT_STATUS_2_MASK   0x22

Definition at line 57 of file core.h.

#define WM8350_INTERFACE_CONTROL   0x06

Definition at line 38 of file core.h.

#define WM8350_IRQ_HIB_MODE   0x0008

Definition at line 126 of file core.h.

#define WM8350_IRQ_POL   0x0001

Definition at line 106 of file core.h.

#define WM8350_IRQ_WKUP_CONV_FAULT   45

Definition at line 573 of file core.h.

#define WM8350_IRQ_WKUP_GP_PWR_ON   47

Definition at line 575 of file core.h.

#define WM8350_IRQ_WKUP_GP_WAKEUP   49

Definition at line 577 of file core.h.

#define WM8350_IRQ_WKUP_HIB_STATE   44

Definition at line 572 of file core.h.

#define WM8350_IRQ_WKUP_OFF_STATE   43

Definition at line 571 of file core.h.

#define WM8350_IRQ_WKUP_ONKEY   48

Definition at line 576 of file core.h.

#define WM8350_IRQ_WKUP_WDOG_RST   46

Definition at line 574 of file core.h.

#define WM8350_LDO1_ENA   0x0100

Definition at line 261 of file core.h.

#define WM8350_LDO1_STS   0x0100

Definition at line 533 of file core.h.

#define WM8350_LDO2_ENA   0x0200

Definition at line 260 of file core.h.

#define WM8350_LDO2_STS   0x0200

Definition at line 532 of file core.h.

#define WM8350_LDO3_ENA   0x0400

Definition at line 259 of file core.h.

#define WM8350_LDO3_STS   0x0400

Definition at line 531 of file core.h.

#define WM8350_LDO4_ENA   0x0800

Definition at line 258 of file core.h.

#define WM8350_LDO4_STS   0x0800

Definition at line 530 of file core.h.

#define WM8350_LOCK_KEY   0x0000

Definition at line 71 of file core.h.

#define WM8350_LS_ENA   0x8000

Definition at line 257 of file core.h.

#define WM8350_LS_STS   0x8000

Definition at line 529 of file core.h.

#define WM8350_MASK_REV_MASK   0x00FF

Definition at line 92 of file core.h.

#define WM8350_MAX_REGISTER   0xFF

Definition at line 68 of file core.h.

#define WM8350_MEM_VALID   0x0020

Definition at line 102 of file core.h.

#define WM8350_MEMRST_HIB_MODE   0x0004

Definition at line 127 of file core.h.

#define WM8350_MIC_DET_ENA   0x0100

Definition at line 197 of file core.h.

#define WM8350_MICBEN   0x0010

Definition at line 199 of file core.h.

#define WM8350_MISC_OVERRIDES   0xE3

Definition at line 64 of file core.h.

#define WM8350_MIXINL_ENA   0x0040

Definition at line 212 of file core.h.

#define WM8350_MIXINR_ENA   0x0080

Definition at line 211 of file core.h.

#define WM8350_MIXOUTL_ENA   0x0001

Definition at line 216 of file core.h.

#define WM8350_MIXOUTR_ENA   0x0002

Definition at line 215 of file core.h.

#define WM8350_NUM_IRQ   63

Definition at line 585 of file core.h.

#define WM8350_NUM_IRQ_REGS   7

Definition at line 587 of file core.h.

#define WM8350_OC_INT   0x2000

Definition at line 278 of file core.h.

#define WM8350_OC_LS_EINT   0x8000

Definition at line 356 of file core.h.

#define WM8350_ON_DEB_T   0x0008

Definition at line 104 of file core.h.

#define WM8350_ON_POL   0x0002

Definition at line 105 of file core.h.

#define WM8350_OSC32K_ENA   0x0400

Definition at line 245 of file core.h.

#define WM8350_OUT1L_ENA   0x0001

Definition at line 225 of file core.h.

#define WM8350_OUT1R_ENA   0x0002

Definition at line 224 of file core.h.

#define WM8350_OUT2L_ENA   0x0004

Definition at line 223 of file core.h.

#define WM8350_OUT2R_ENA   0x0008

Definition at line 222 of file core.h.

#define WM8350_OUT3_ENA   0x0010

Definition at line 214 of file core.h.

#define WM8350_OUT4_ENA   0x0020

Definition at line 213 of file core.h.

#define WM8350_OUTPUT_DRAIN_EN   0x0400

Definition at line 196 of file core.h.

#define WM8350_OVER_CURRENT_INT_STATUS   0x1D

Definition at line 52 of file core.h.

#define WM8350_OVER_CURRENT_INT_STATUS_MASK   0x25

Definition at line 60 of file core.h.

#define WM8350_PCCOMP_HIB_MODE   0x0002

Definition at line 128 of file core.h.

#define WM8350_POWER_MGMT_1   0x08

Definition at line 39 of file core.h.

#define WM8350_POWER_MGMT_2   0x09

Definition at line 40 of file core.h.

#define WM8350_POWER_MGMT_3   0x0A

Definition at line 41 of file core.h.

#define WM8350_POWER_MGMT_4   0x0B

Definition at line 42 of file core.h.

#define WM8350_POWER_MGMT_5   0x0C

Definition at line 43 of file core.h.

#define WM8350_POWER_MGMT_6   0x0D

Definition at line 44 of file core.h.

#define WM8350_POWER_MGMT_7   0x0E

Definition at line 45 of file core.h.

#define WM8350_POWER_UP_INT_STATUS   0x1B

Definition at line 50 of file core.h.

#define WM8350_POWER_UP_INT_STATUS_MASK   0x23

Definition at line 58 of file core.h.

#define WM8350_POWERCYCLE   0x2000

Definition at line 98 of file core.h.

#define WM8350_PUTO_DC1_EINT   0x0001

Definition at line 337 of file core.h.

#define WM8350_PUTO_DC2_EINT   0x0002

Definition at line 336 of file core.h.

#define WM8350_PUTO_DC3_EINT   0x0004

Definition at line 335 of file core.h.

#define WM8350_PUTO_DC4_EINT   0x0008

Definition at line 334 of file core.h.

#define WM8350_PUTO_DC5_EINT   0x0010

Definition at line 333 of file core.h.

#define WM8350_PUTO_DC6_EINT   0x0020

Definition at line 332 of file core.h.

#define WM8350_PUTO_INT   0x0800

Definition at line 280 of file core.h.

#define WM8350_PUTO_LDO1_EINT   0x0100

Definition at line 331 of file core.h.

#define WM8350_PUTO_LDO2_EINT   0x0200

Definition at line 330 of file core.h.

#define WM8350_PUTO_LDO3_EINT   0x0400

Definition at line 329 of file core.h.

#define WM8350_PUTO_LDO4_EINT   0x0800

Definition at line 328 of file core.h.

#define WM8350_READ_SRC   0x0020

Definition at line 521 of file core.h.

#define WM8350_READ_STATUS   0x0800

Definition at line 517 of file core.h.

#define WM8350_RECONFIG_AT_ON   0x0800

Definition at line 142 of file core.h.

#define WM8350_RECONFIG_AT_ON_MASK   0x0800

Definition at line 143 of file core.h.

#define WM8350_RECONFIG_AT_ON_OFF   0

Definition at line 173 of file core.h.

#define WM8350_RECONFIG_AT_ON_ON   1

Definition at line 174 of file core.h.

#define WM8350_RECONFIG_AT_ON_SHIFT   11

Definition at line 144 of file core.h.

#define WM8350_REG_HIB_STARTUP_SEQ   0x0040

Definition at line 123 of file core.h.

#define WM8350_REG_RESET_HIB_MODE   0x0020

Definition at line 124 of file core.h.

#define WM8350_REG_RSTB_TIME_MASK   0x0C00

Definition at line 100 of file core.h.

#define WM8350_RESET_ID   0x00

Definition at line 32 of file core.h.

#define WM8350_REV_E   0x4

Definition at line 580 of file core.h.

#define WM8350_REV_F   0x5

Definition at line 581 of file core.h.

#define WM8350_REV_G   0x6

Definition at line 582 of file core.h.

#define WM8350_REV_H   0x7

Definition at line 583 of file core.h.

#define WM8350_REVISION   0x02

Definition at line 34 of file core.h.

#define WM8350_RST_HIB_MODE   0x0010

Definition at line 125 of file core.h.

#define WM8350_RTC_ALM_EINT   0x0020

Definition at line 304 of file core.h.

#define WM8350_RTC_INT   0x0010

Definition at line 286 of file core.h.

#define WM8350_RTC_PER_EINT   0x0080

Definition at line 302 of file core.h.

#define WM8350_RTC_SEC_EINT   0x0040

Definition at line 303 of file core.h.

#define WM8350_RTC_TICK_ENA   0x0800

Definition at line 244 of file core.h.

#define WM8350_SPI_3WIRE   0x0002

Definition at line 157 of file core.h.

#define WM8350_SPI_3WIRE_I2C   0

Definition at line 188 of file core.h.

#define WM8350_SPI_3WIRE_MASK   0x0002

Definition at line 158 of file core.h.

#define WM8350_SPI_3WIRE_SHIFT   1

Definition at line 159 of file core.h.

#define WM8350_SPI_3WIRE_SPI   1

Definition at line 189 of file core.h.

#define WM8350_SPI_4WIRE   0x0004

Definition at line 154 of file core.h.

#define WM8350_SPI_4WIRE_3WIRE   0

Definition at line 185 of file core.h.

#define WM8350_SPI_4WIRE_4WIRE   1

Definition at line 186 of file core.h.

#define WM8350_SPI_4WIRE_MASK   0x0004

Definition at line 155 of file core.h.

#define WM8350_SPI_4WIRE_SHIFT   2

Definition at line 156 of file core.h.

#define WM8350_SPI_CFG   0x0008

Definition at line 151 of file core.h.

#define WM8350_SPI_CFG_CMOS   0

Definition at line 182 of file core.h.

#define WM8350_SPI_CFG_MASK   0x0008

Definition at line 152 of file core.h.

#define WM8350_SPI_CFG_OD   1

Definition at line 183 of file core.h.

#define WM8350_SPI_CFG_SHIFT   3

Definition at line 153 of file core.h.

#define WM8350_STARTSEQ   0x0040

Definition at line 520 of file core.h.

#define WM8350_STATE_MACHINE_STATUS   0xE9

Definition at line 66 of file core.h.

#define WM8350_SW_RESET_CHIP_ID_MASK   0xFFFF

Definition at line 80 of file core.h.

#define WM8350_SYS_CHIP_GT115_EINT   0x0004

Definition at line 321 of file core.h.

#define WM8350_SYS_CHIP_GT140_EINT   0x0002

Definition at line 322 of file core.h.

#define WM8350_SYS_HYST_COMP_FAIL_EINT   0x0008

Definition at line 320 of file core.h.

#define WM8350_SYS_INT   0x0008

Definition at line 287 of file core.h.

#define WM8350_SYS_WDOG_TO_EINT   0x0001

Definition at line 323 of file core.h.

#define WM8350_SYSCLK_ENA   0x4000

Definition at line 230 of file core.h.

#define WM8350_SYSTEM_CONTROL_1   0x03

Definition at line 35 of file core.h.

#define WM8350_SYSTEM_CONTROL_2   0x04

Definition at line 36 of file core.h.

#define WM8350_SYSTEM_HIBERNATE   0x05

Definition at line 37 of file core.h.

#define WM8350_SYSTEM_INTERRUPTS   0x18

Definition at line 47 of file core.h.

#define WM8350_SYSTEM_INTERRUPTS_MASK   0x20

Definition at line 55 of file core.h.

#define WM8350_TEMPMON_HIB_MODE   0x0001

Definition at line 129 of file core.h.

#define WM8350_TOCLK_ENA   0x0100

Definition at line 234 of file core.h.

#define WM8350_TSTRAM_CLK   0x0100

Definition at line 518 of file core.h.

#define WM8350_TSTRAM_CLK_ENA   0x0080

Definition at line 519 of file core.h.

#define WM8350_TSTRAM_ENA   0x0001

Definition at line 524 of file core.h.

#define WM8350_TSTRAM_MODE_MASK   0x000E

Definition at line 523 of file core.h.

#define WM8350_UNDER_VOLTAGE_INT_STATUS   0x1C

Definition at line 51 of file core.h.

#define WM8350_UNDER_VOLTAGE_INT_STATUS_MASK   0x24

Definition at line 59 of file core.h.

#define WM8350_UNLOCK_KEY   0x0013

Definition at line 70 of file core.h.

#define WM8350_USB_500MA   0x0800

Definition at line 115 of file core.h.

#define WM8350_USB_FB_OVRDE   0x8000

Definition at line 555 of file core.h.

#define WM8350_USB_INT   0x0002

Definition at line 289 of file core.h.

#define WM8350_USB_LIMIT_EINT   0x0400

Definition at line 314 of file core.h.

#define WM8350_USB_LIMIT_OVRDE   0x0400

Definition at line 550 of file core.h.

#define WM8350_USB_MSTR   0x2000

Definition at line 113 of file core.h.

#define WM8350_USB_MSTR_SRC   0x1000

Definition at line 114 of file core.h.

#define WM8350_USB_NOLIM   0x0400

Definition at line 116 of file core.h.

#define WM8350_USB_SM_100_SLV   1

Definition at line 566 of file core.h.

#define WM8350_USB_SM_500_SLV   5

Definition at line 567 of file core.h.

#define WM8350_USB_SM_MASK   0x0700

Definition at line 563 of file core.h.

#define WM8350_USB_SM_SHIFT   8

Definition at line 564 of file core.h.

#define WM8350_USB_SM_STDBY_SLV   7

Definition at line 568 of file core.h.

#define WM8350_USB_SUSPEND   0x4000

Definition at line 112 of file core.h.

#define WM8350_USB_SUSPEND_8MA   0x8000

Definition at line 111 of file core.h.

#define WM8350_USE_DEV_PINS   0x8000

Definition at line 134 of file core.h.

#define WM8350_USE_DEV_PINS_DEV   1

Definition at line 163 of file core.h.

#define WM8350_USE_DEV_PINS_MASK   0x8000

Definition at line 135 of file core.h.

#define WM8350_USE_DEV_PINS_PRIMARY   0

Definition at line 162 of file core.h.

#define WM8350_USE_DEV_PINS_SHIFT   15

Definition at line 136 of file core.h.

#define WM8350_UV_DC1_EINT   0x0001

Definition at line 351 of file core.h.

#define WM8350_UV_DC2_EINT   0x0002

Definition at line 350 of file core.h.

#define WM8350_UV_DC3_EINT   0x0004

Definition at line 349 of file core.h.

#define WM8350_UV_DC4_EINT   0x0008

Definition at line 348 of file core.h.

#define WM8350_UV_DC5_EINT   0x0010

Definition at line 347 of file core.h.

#define WM8350_UV_DC6_EINT   0x0020

Definition at line 346 of file core.h.

#define WM8350_UV_INT   0x1000

Definition at line 279 of file core.h.

#define WM8350_UV_LDO1_EINT   0x0100

Definition at line 345 of file core.h.

#define WM8350_UV_LDO2_EINT   0x0200

Definition at line 344 of file core.h.

#define WM8350_UV_LDO3_EINT   0x0400

Definition at line 343 of file core.h.

#define WM8350_UV_LDO4_EINT   0x0800

Definition at line 342 of file core.h.

#define WM8350_VBUFEN   0x2000

Definition at line 195 of file core.h.

#define WM8350_VCC_FAULT_OV   0x1000

Definition at line 99 of file core.h.

#define WM8350_VMID_MASK   0x0003

Definition at line 201 of file core.h.

#define WM8350_VMID_SHIFT   0

Definition at line 202 of file core.h.

#define WM8350_VMIDEN   0x0004

Definition at line 200 of file core.h.

#define WM8350_WALL_FB_OVRDE   0x4000

Definition at line 556 of file core.h.

#define WM8350_WDOG_HIB_MODE   0x0080

Definition at line 122 of file core.h.

#define WM8350_WKUP_CONV_FAULT_EINT   0x0010

Definition at line 387 of file core.h.

#define WM8350_WKUP_GP_PWR_ON_EINT   0x0004

Definition at line 389 of file core.h.

#define WM8350_WKUP_GP_WAKEUP_EINT   0x0001

Definition at line 391 of file core.h.

#define WM8350_WKUP_HIB_STATE_EINT   0x0020

Definition at line 386 of file core.h.

#define WM8350_WKUP_INT   0x0001

Definition at line 290 of file core.h.

#define WM8350_WKUP_OFF_STATE_EINT   0x0040

Definition at line 385 of file core.h.

#define WM8350_WKUP_ONKEY_EINT   0x0002

Definition at line 390 of file core.h.

#define WM8350_WKUP_WDOG_RST_EINT   0x0008

Definition at line 388 of file core.h.

Function Documentation

int wm8350_block_read ( struct wm8350 wm8350,
int  reg,
int  size,
u16 dest 
)

Definition at line 105 of file wm8350-core.c.

int wm8350_block_write ( struct wm8350 wm8350,
int  reg,
int  size,
u16 src 
)

Definition at line 119 of file wm8350-core.c.

int wm8350_clear_bits ( struct wm8350 wm8350,
u16  reg,
u16  mask 
)

Definition at line 68 of file wm8350-core.c.

void wm8350_device_exit ( struct wm8350 wm8350)

Definition at line 446 of file wm8350-core.c.

int wm8350_device_init ( struct wm8350 wm8350,
int  irq,
struct wm8350_platform_data pdata 
)

Definition at line 277 of file wm8350-core.c.

int wm8350_irq_exit ( struct wm8350 wm8350)

Definition at line 549 of file wm8350-irq.c.

int wm8350_irq_init ( struct wm8350 wm8350,
int  irq,
struct wm8350_platform_data pdata 
)

Definition at line 469 of file wm8350-irq.c.

int wm8350_reg_lock ( struct wm8350 wm8350)

wm8350_reg_lock()

The WM8350 has a hardware lock which can be used to prevent writes to some registers (generally those which can cause particularly serious problems if misused). This function enables that lock.

Definition at line 140 of file wm8350-core.c.

u16 wm8350_reg_read ( struct wm8350 wm8350,
int  reg 
)

Definition at line 80 of file wm8350-core.c.

int wm8350_reg_unlock ( struct wm8350 wm8350)

wm8350_reg_unlock()

The WM8350 has a hardware lock which can be used to prevent writes to some registers (generally those which can cause particularly serious problems if misused). This function disables that lock so updates can be performed. For maximum safety this should be done only when required.

Definition at line 169 of file wm8350-core.c.

int wm8350_reg_write ( struct wm8350 wm8350,
int  reg,
u16  val 
)

Definition at line 93 of file wm8350-core.c.

int wm8350_set_bits ( struct wm8350 wm8350,
u16  reg,
u16  mask 
)

Definition at line 74 of file wm8350-core.c.

Variable Documentation

struct regmap_config wm8350_regmap

Definition at line 328 of file wm8350-regmap.c.