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 <carlo.kirchmeier@zuehlke.com>
This commit is contained in:
Carlo Kirchmeier 2025-01-17 10:34:24 +01:00 committed by Benjamin Cabé
parent 2f5f39fa37
commit 6d35071227
2 changed files with 6 additions and 1 deletions

View file

@ -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,
};

View file

@ -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