diff options
Diffstat (limited to 'drivers/mxc/pmic/core/pmic.h')
-rw-r--r-- | drivers/mxc/pmic/core/pmic.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mxc/pmic/core/pmic.h b/drivers/mxc/pmic/core/pmic.h index 770fbb72a044..964c44a06bc1 100644 --- a/drivers/mxc/pmic/core/pmic.h +++ b/drivers/mxc/pmic/core/pmic.h @@ -48,6 +48,7 @@ struct mxc_pmic { * * @return Returns 0 on success -1 on failure. */ +int mxc_spi_poll_transfer(struct spi_device *spi, struct spi_transfer *t); static inline int spi_rw(struct spi_device *spi, u8 * buf, size_t len) { struct spi_transfer t = { @@ -57,6 +58,9 @@ static inline int spi_rw(struct spi_device *spi, u8 * buf, size_t len) .cs_change = 0, .delay_usecs = 0, }; + mxc_spi_poll_transfer(spi, &t); + return 0; +#if 0 struct spi_message m; spi_message_init(&m); @@ -64,6 +68,7 @@ static inline int spi_rw(struct spi_device *spi, u8 * buf, size_t len) if (spi_sync(spi, &m) != 0 || m.status != 0) return PMIC_ERROR; return (len - m.actual_length); +#endif } /*! |