diff options
author | olivier moysan <olivier.moysan@st.com> | 2017-06-16 15:16:24 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-06-16 20:59:03 +0300 |
commit | 03e78a242a15eca68e5c7cb606c94959382e2b18 (patch) | |
tree | d76d53c35180a2bb7d2dada264bce63fa5152499 /sound/soc/stm/stm32_sai.c | |
parent | 3861da5801f59f3e9252b6a5db92cfa71629995c (diff) | |
download | linux-03e78a242a15eca68e5c7cb606c94959382e2b18.tar.xz |
ASoC: stm32: sai: add h7 support
Add support of SAI on STM32H7 family.
Signed-off-by: olivier moysan <olivier.moysan@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/stm/stm32_sai.c')
-rw-r--r-- | sound/soc/stm/stm32_sai.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index 6159d66c2c54..f7713314913b 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -27,8 +27,17 @@ #include "stm32_sai.h" +static const struct stm32_sai_conf stm32_sai_conf_f4 = { + .version = SAI_STM32F4, +}; + +static const struct stm32_sai_conf stm32_sai_conf_h7 = { + .version = SAI_STM32H7, +}; + static const struct of_device_id stm32_sai_ids[] = { - { .compatible = "st,stm32f4-sai", .data = (void *)SAI_STM32F4 }, + { .compatible = "st,stm32f4-sai", .data = (void *)&stm32_sai_conf_f4 }, + { .compatible = "st,stm32h7-sai", .data = (void *)&stm32_sai_conf_h7 }, {} }; @@ -52,7 +61,7 @@ static int stm32_sai_probe(struct platform_device *pdev) of_id = of_match_device(stm32_sai_ids, &pdev->dev); if (of_id) - sai->version = (enum stm32_sai_version)of_id->data; + sai->conf = (struct stm32_sai_conf *)of_id->data; else return -EINVAL; |