Browse Source

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 <jordan@embeint.com>
pull/77311/head
Jordan Yates 11 months ago committed by Anas Nashif
parent
commit
cc84a87e4b
  1. 2
      drivers/sdhc/sdhc_spi.c

2
drivers/sdhc/sdhc_spi.c

@ -720,10 +720,12 @@ static int sdhc_spi_set_io(const struct device *dev, struct sdhc_io *ios) @@ -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;

Loading…
Cancel
Save