From 6d35071227dff105804b21e16e4d6ad719dda27f Mon Sep 17 00:00:00 2001 From: Carlo Kirchmeier Date: Fri, 17 Jan 2025 10:34:24 +0100 Subject: [PATCH] drivers: disk: sdmmc_subsys: stm32_sdmmc driver custom disk name support In order to allow a custom disk name same as with the standard sdmmc driver an additional device-tree property was introduced. Signed-off-by: Carlo Kirchmeier --- drivers/disk/sdmmc_stm32.c | 2 +- dts/bindings/mmc/st,stm32-sdmmc.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/disk/sdmmc_stm32.c b/drivers/disk/sdmmc_stm32.c index 114e7d6b467..b0f3503b6c7 100644 --- a/drivers/disk/sdmmc_stm32.c +++ b/drivers/disk/sdmmc_stm32.c @@ -537,7 +537,7 @@ static const struct disk_operations stm32_sdmmc_ops = { }; static struct disk_info stm32_sdmmc_info = { - .name = "SD", + .name = DT_INST_PROP_OR(0, disk_name, "SD"), .ops = &stm32_sdmmc_ops, }; diff --git a/dts/bindings/mmc/st,stm32-sdmmc.yaml b/dts/bindings/mmc/st,stm32-sdmmc.yaml index 7071b44be16..7daf115520d 100644 --- a/dts/bindings/mmc/st,stm32-sdmmc.yaml +++ b/dts/bindings/mmc/st,stm32-sdmmc.yaml @@ -5,6 +5,11 @@ compatible: "st,stm32-sdmmc" include: [mmc.yaml, pinctrl-device.yaml, reset-device.yaml] properties: + disk-name: + type: string + description: | + Disk name. + clocks: required: true