aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLucas Tanure <tanureal@opensource.cirrus.com>2022-04-13 09:37:14 +0100
committerTakashi Iwai <tiwai@suse.de>2022-04-13 10:42:32 +0200
commit2603c974b45dbfeece80474ee32173756aac3ba1 (patch)
treee1b926fa5ab245c9087b9f41abb55273093d5a8c /include/sound
parentALSA: cs35l41: Unify hardware configuration (diff)
downloadlinux-dev-2603c974b45dbfeece80474ee32173756aac3ba1.tar.xz
linux-dev-2603c974b45dbfeece80474ee32173756aac3ba1.zip
ALSA: cs35l41: Check hw_config before using it
The driver can receive an empty hw_config, so mark as valid if successfully read from device tree/ACPI or set by the driver itself. Platforms not marked with a valid hw config will not be supported. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-3-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/cs35l41.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/cs35l41.h b/include/sound/cs35l41.h
index abcf850f7110..4200379e0c26 100644
--- a/include/sound/cs35l41.h
+++ b/include/sound/cs35l41.h
@@ -538,7 +538,6 @@
#define CS35L41_OTP_SIZE_WORDS 32
#define CS35L41_NUM_OTP_ELEM 100
-#define CS35L41_VALID_PDATA 0x80000000
#define CS35L41_NUM_SUPPLIES 2
#define CS35L41_SCLK_MSTR_MASK 0x10
@@ -753,12 +752,14 @@ enum cs35l41_gpio2_func {
};
struct cs35l41_gpio_cfg {
+ bool valid;
bool pol_inv;
bool out_en;
unsigned int func;
};
struct cs35l41_hw_cfg {
+ bool valid;
int bst_ind;
int bst_ipk;
int bst_cap;