Skip to content

Commit cc84a87

Browse files
JordanYatesnashif
authored andcommitted
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 <[email protected]>
1 parent 2c52f9e commit cc84a87

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/sdhc/sdhc_spi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,12 @@ static int sdhc_spi_set_io(const struct device *dev, struct sdhc_io *ios)
720720
if (gpio_pin_set_dt(&cfg->pwr_gpio, 1)) {
721721
return -EIO;
722722
}
723+
LOG_INF("Powered up");
723724
} else {
724725
if (gpio_pin_set_dt(&cfg->pwr_gpio, 0)) {
725726
return -EIO;
726727
}
728+
LOG_INF("Powered down");
727729
}
728730
}
729731
data->power_mode = ios->power_mode;

0 commit comments

Comments
 (0)