mfd: wcd934x: Add page 0x50 registers for wcd934x codec
Registers for page 0x50 in the wcd934x audio codec are currently not defined. These registers control WCD DSP register configuration and setup. Add these register definitions so that codec driver can read/write these registers. CRs-Fixed: 1049012 Change-Id: If1162c09de8d4d7c330a97a1f133f6d46ce2fd74 Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
This commit is contained in:
parent
2566204c8d
commit
ced88d4dfc
3 changed files with 40 additions and 0 deletions
|
@ -1815,6 +1815,8 @@ static bool wcd934x_is_readable_register(struct device *dev, unsigned int reg)
|
|||
pg_num = reg >> 0x8;
|
||||
if (pg_num == 0x80)
|
||||
pg_num = WCD934X_PAGE_0X80;
|
||||
else if (pg_num == 0x50)
|
||||
pg_num = WCD934X_PAGE_0x50;
|
||||
else if (pg_num > 0xF)
|
||||
return false;
|
||||
|
||||
|
@ -1835,6 +1837,8 @@ static bool wcd934x_is_volatile_register(struct device *dev, unsigned int reg)
|
|||
pg_num = reg >> 0x8;
|
||||
if (pg_num == 0x80)
|
||||
pg_num = WCD934X_PAGE_0X80;
|
||||
else if (pg_num == 0x50)
|
||||
pg_num = WCD934X_PAGE_0x50;
|
||||
else if (pg_num > 0xF)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -1983,6 +1983,40 @@ const u8 wcd934x_page15_reg_access[WCD934X_PAGE_SIZE] = {
|
|||
WCD934X_READ_WRITE,
|
||||
};
|
||||
|
||||
const u8 wcd934x_page_0x50_reg_access[WCD934X_PAGE_SIZE] = {
|
||||
[WCD934X_REG(WCD934X_PAGE80_PAGE_REGISTER)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_DATA_0)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_DATA_1)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_DATA_2)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_DATA_3)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_ADDR_0)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_ADDR_1)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_ADDR_2)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_ADDR_3)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_ADDR_0)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_ADDR_1)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_ADDR_2)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_ADDR_3)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_DATA_0)] = WCD934X_READ,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_DATA_1)] = WCD934X_READ,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_DATA_2)] = WCD934X_READ,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_RD_DATA_3)] = WCD934X_READ,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_ACCESS_CFG)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_ACCESS_STATUS)] = WCD934X_READ,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_NOM_CX_VDD)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_SVS_CX_VDD)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_SVS2_CX_VDD)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_NOM_MX_VDD)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_SVS_MX_VDD)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_SVS2_MX_VDD)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_SVS2_MIN_CX_VDD)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_MAX_SVS2_STEP)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_CTL)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_SW_MODECHNG_STATUS)] = WCD934X_READ,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_SW_MODECHNG_START)] = WCD934X_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_CPR_STATUS)] = WCD934X_READ_WRITE,
|
||||
};
|
||||
|
||||
const u8 wcd934x_page_0x80_reg_access[WCD934X_PAGE_SIZE] = {
|
||||
[WCD934X_REG(WCD934X_PAGE80_PAGE_REGISTER)] = WCD934X_READ_WRITE,
|
||||
[WCD934X_REG(WCD934X_CODEC_CPR_WR_DATA_0)] = WCD934X_READ_WRITE,
|
||||
|
@ -2116,5 +2150,6 @@ const u8 * const wcd934x_reg[WCD934X_NUM_PAGES] = {
|
|||
[WCD934X_PAGE_13] = wcd934x_page13_reg_access,
|
||||
[WCD934X_PAGE_14] = wcd934x_page14_reg_access,
|
||||
[WCD934X_PAGE_15] = wcd934x_page15_reg_access,
|
||||
[WCD934X_PAGE_0x50] = wcd934x_page_0x50_reg_access,
|
||||
[WCD934X_PAGE_0X80] = wcd934x_page_0x80_reg_access,
|
||||
};
|
||||
|
|
|
@ -33,6 +33,7 @@ enum {
|
|||
WCD934X_PAGE_13,
|
||||
WCD934X_PAGE_14,
|
||||
WCD934X_PAGE_15,
|
||||
WCD934X_PAGE_0x50,
|
||||
WCD934X_PAGE_0X80,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue