From cc84a87e4b590e58a04f9e6539dc3b4521f21d0f Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sun, 18 Aug 2024 16:32:31 +1000 Subject: [PATCH] sdhc: sdhc_spi: log message on power state change Add a basic log message when power is applied or removed from the SDHC card. Signed-off-by: Jordan Yates --- drivers/sdhc/sdhc_spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/sdhc/sdhc_spi.c b/drivers/sdhc/sdhc_spi.c index 291ca71c45c..020b4357e79 100644 --- a/drivers/sdhc/sdhc_spi.c +++ b/drivers/sdhc/sdhc_spi.c @@ -720,10 +720,12 @@ static int sdhc_spi_set_io(const struct device *dev, struct sdhc_io *ios) if (gpio_pin_set_dt(&cfg->pwr_gpio, 1)) { return -EIO; } + LOG_INF("Powered up"); } else { if (gpio_pin_set_dt(&cfg->pwr_gpio, 0)) { return -EIO; } + LOG_INF("Powered down"); } } data->power_mode = ios->power_mode;