diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-05-10 15:41:31 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-05-11 09:35:08 +0100 |
commit | 42c80cd439a938569a86f6ae135d38c1cda5569b (patch) | |
tree | afc267bd2aaeaff32d7a739deb709c755aa8f15f /drivers/spi/spi-pxa2xx.h | |
parent | 1bed378c6b9116c51ae59b970cf3d9b4e9e62ced (diff) | |
download | linux-stable-42c80cd439a938569a86f6ae135d38c1cda5569b.tar.gz linux-stable-42c80cd439a938569a86f6ae135d38c1cda5569b.tar.bz2 linux-stable-42c80cd439a938569a86f6ae135d38c1cda5569b.zip |
spi: pxa2xx: Extract clear_SSCR1_bits() helper
There are few places that repeat the logic of "clear some bits in SSCR1".
Extract clear_SSCR1_bits() helper to deduplicate that.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210510124134.24638-12-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.h')
-rw-r--r-- | drivers/spi/spi-pxa2xx.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index 739e264feaa6..ed63f7165cd8 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h @@ -105,6 +105,11 @@ static inline int pxa25x_ssp_comp(struct driver_data *drv_data) } } +static inline void clear_SSCR1_bits(const struct driver_data *drv_data, u32 bits) +{ + pxa2xx_spi_write(drv_data, SSCR1, pxa2xx_spi_read(drv_data, SSCR1) & ~bits); +} + static inline void write_SSSR_CS(struct driver_data *drv_data, u32 val) { if (drv_data->ssp_type == CE4100_SSP || |