Device drivers can check if the master controller driver has to support flash pm. The controller driver indicates this using flash_pm_supported() spi master interface. Signed-off-by: Kamal Dasu <kdasu.kdev@xxxxxxxxx> --- include/linux/spi/spi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 75c6bd0..b5fbc1b 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -539,6 +539,7 @@ struct spi_master { int (*spi_flash_read)(struct spi_device *spi, struct spi_flash_read_message *msg); bool (*flash_read_supported)(struct spi_device *spi); + bool (*flash_pm_supported)(struct spi_device *spi); /* * These hooks are for drivers that use a generic implementation @@ -1185,6 +1186,13 @@ static inline bool spi_flash_read_supported(struct spi_device *spi) spi->master->flash_read_supported(spi)); } +/* SPI core interface to indicate flash pm support */ +static inline bool spi_flash_pm_supported(struct spi_device *spi) +{ + return (spi->master->flash_pm_supported && + spi->master->flash_pm_supported(spi)); +} + int spi_flash_read(struct spi_device *spi, struct spi_flash_read_message *msg); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html