diff options
author | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-27 10:30:55 +0200 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-27 10:32:44 +0200 |
commit | 28e675ccc41df417f049f3129519eb034801db56 (patch) | |
tree | b4f7c801fef5ae19583ef9dd358b41b3b8f4f9ad /drivers/mxc | |
parent | e67b7b69ff370aca48d898c2f5c2d387360e372a (diff) |
ENGR00122465: Applying from 1004 release in FSL compass site.
They are not am formatted.
ENGR00122465-1-spi-polling
ENGR00122465-2-spi-poll-sync
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/mxc')
-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 } /*! |