Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
52 lines
1.8 KiB
C
52 lines
1.8 KiB
C
#ifndef __AW87339_H__
|
|
#define __AW87339_H__
|
|
|
|
|
|
#define AW87339_REG_CHIPID 0x00
|
|
#define AW87339_REG_SYSCTRL 0x01
|
|
#define AW87339_REG_MODECTRL 0x02
|
|
#define AW87339_REG_CPOVP 0x03
|
|
#define AW87339_REG_CPP 0x04
|
|
#define AW87339_REG_GAIN 0x05
|
|
#define AW87339_REG_AGC3_PO 0x06
|
|
#define AW87339_REG_AGC3 0x07
|
|
#define AW87339_REG_AGC2_PO 0x08
|
|
#define AW87339_REG_AGC2 0x09
|
|
#define AW87339_REG_AGC1 0x0A
|
|
|
|
#define AW87339_REG_DFT1 0x62
|
|
#define AW87339_REG_DFT2 0x63
|
|
#define AW87339_REG_ENCRY 0x64
|
|
|
|
#define AW87339_CHIP_DISABLE 0x0C
|
|
|
|
/********************************************
|
|
* Register Access
|
|
*******************************************/
|
|
#define AW87339_REG_MAX (0xFF)
|
|
|
|
#define AW87339_REG_NONE_ACCESS (0)
|
|
#define AW87339_REG_RD_ACCESS (1 << 0)
|
|
#define AW87339_REG_WR_ACCESS (1 << 1)
|
|
|
|
|
|
const unsigned char aw87339_reg_access[AW87339_REG_MAX] = {
|
|
[AW87339_REG_CHIPID] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_SYSCTRL] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_MODECTRL] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_CPOVP] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_CPP] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_GAIN] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_AGC3_PO] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_AGC3] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_AGC2_PO] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_AGC2] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_AGC1] = AW87339_REG_RD_ACCESS | AW87339_REG_WR_ACCESS,
|
|
[AW87339_REG_DFT1] = AW87339_REG_RD_ACCESS,
|
|
[AW87339_REG_DFT2] = AW87339_REG_RD_ACCESS,
|
|
[AW87339_REG_ENCRY] = AW87339_REG_RD_ACCESS,
|
|
};
|
|
|
|
|
|
#endif
|