diff options
| author | Mark Brown <broonie@kernel.org> | 2026-10-04 21:37:20 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-04 21:37:20 +0200 |
| commit | 6158ac6cbe6b0bb464cdff60096d91c0a469e786 (patch) | |
| tree | 07386586ee58caccbfe79e758e4d56d493ae8c3d /include | |
| parent | 7d6adf283a83c9e4fce05a97599f8e6a006bd737 (diff) | |
| parent | c5f6155364056de8111b288f6b8c8a84f12f53e5 (diff) | |
| download | linux-next-6158ac6cbe6b0bb464cdff60096d91c0a469e786.tar.gz linux-next-6158ac6cbe6b0bb464cdff60096d91c0a469e786.zip | |
ASoC: aw88399: fix BSTS check using vendor driver logic
Marco Giunta <marco_giunta@outlook.it> says:
The aw88399 sysst check requires BSTS (boost finished) to assert during
startup. On hardware where the boost converter is bypassed via external
power supply (EN_HVBAT in BSTCTRL10, i.e. register 0x69 bit 2), BSTS never
asserts and init fails.
The vendor's generic Android driver (aw883xx, [1]) handles this by reading
EN_HVBAT and conditionally skipping the BSTS check.
When the original aw88399 driver was ported to the in-tree ASoC driver,
this logic was not included.
During the development of the HDA side codec driver, I worked around this
with a per-instance bsts_unreliable flag set from the HDA scodec
driver's per-model quirk table. While functional, this approach requires
every new device where the boost converter is bypassed to carry a quirk
entry, and prevents users from testing the driver on such devices via the
model= alc269 module parameter without a custom kernel to add the entry.
This series adds the correct hardware-based check from the vendor driver
(patch 1) and removes the now-unnecessary workaround (patch 2),
simplifying the code and removing a barrier to testing on new devices.
[1] https://www.awinic.com/en/driver/AW88399QNR/594
Link: https://patch.msgid.link/SN6PR19MB230304C2E75499FE23B53885FC8F2@SN6PR19MB2303.namprd19.prod.outlook.com
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/aw88399.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sound/aw88399.h b/include/sound/aw88399.h index a1e0de6be8ea..38d9bd6abd8b 100644 --- a/include/sound/aw88399.h +++ b/include/sound/aw88399.h @@ -449,6 +449,11 @@ #define AW88399_NOISE_GATE_EN_MASK \ (~(((1<<AW88399_NOISE_GATE_EN_BITS_LEN)-1) << AW88399_NOISE_GATE_EN_START_BIT)) +#define AW88399_EPS_EN_START_BIT (2) +#define AW88399_EPS_EN_BITS_LEN (1) +#define AW88399_EPS_EN_MASK \ + (~(((1 << AW88399_EPS_EN_BITS_LEN) - 1) << AW88399_EPS_EN_START_BIT)) + #define AW88399_WDT_CNT_START_BIT (0) #define AW88399_WDT_CNT_BITS_LEN (8) #define AW88399_WDT_CNT_MASK \ @@ -598,7 +603,6 @@ struct aw88399 { unsigned int crc_init_val; unsigned int vcalb_init_val; unsigned int dither_st; - bool bsts_unreliable; bool fw_needs_reload; }; |
