aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/stm/stm32_sai.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/stm/stm32_sai.c')
-rw-r--r--sound/soc/stm/stm32_sai.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index 2a27a26bf7a1..f7713314913b 100644
--- a/sound/soc/stm/stm32_sai.c
+++ b/sound/soc/stm/stm32_sai.c
@@ -27,8 +27,17 @@
27 27
28#include "stm32_sai.h" 28#include "stm32_sai.h"
29 29
30static const struct stm32_sai_conf stm32_sai_conf_f4 = {
31 .version = SAI_STM32F4,
32};
33
34static const struct stm32_sai_conf stm32_sai_conf_h7 = {
35 .version = SAI_STM32H7,
36};
37
30static const struct of_device_id stm32_sai_ids[] = { 38static const struct of_device_id stm32_sai_ids[] = {
31 { .compatible = "st,stm32f4-sai", .data = (void *)SAI_STM32F4 }, 39 { .compatible = "st,stm32f4-sai", .data = (void *)&stm32_sai_conf_f4 },
40 { .compatible = "st,stm32h7-sai", .data = (void *)&stm32_sai_conf_h7 },
32 {} 41 {}
33}; 42};
34 43
@@ -52,7 +61,7 @@ static int stm32_sai_probe(struct platform_device *pdev)
52 61
53 of_id = of_match_device(stm32_sai_ids, &pdev->dev); 62 of_id = of_match_device(stm32_sai_ids, &pdev->dev);
54 if (of_id) 63 if (of_id)
55 sai->version = (enum stm32_sai_version)of_id->data; 64 sai->conf = (struct stm32_sai_conf *)of_id->data;
56 else 65 else
57 return -EINVAL; 66 return -EINVAL;
58 67
@@ -110,6 +119,6 @@ static struct platform_driver stm32_sai_driver = {
110module_platform_driver(stm32_sai_driver); 119module_platform_driver(stm32_sai_driver);
111 120
112MODULE_DESCRIPTION("STM32 Soc SAI Interface"); 121MODULE_DESCRIPTION("STM32 Soc SAI Interface");
113MODULE_AUTHOR("Olivier Moysan, <olivier.moysan@st.com>"); 122MODULE_AUTHOR("Olivier Moysan <olivier.moysan@st.com>");
114MODULE_ALIAS("platform:st,stm32-sai"); 123MODULE_ALIAS("platform:st,stm32-sai");
115MODULE_LICENSE("GPL v2"); 124MODULE_LICENSE("GPL v2");