mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: spi: rockchip: make spi_enable_chip take bool
The spi_enable_chip function takes a boolean
argument. Change the type to reflect that.
Change-Id: I71f016d0cbbb6a77cda3e10e8bb7da45b227b1c9
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 30688e4e67)
This commit is contained in:
committed by
Tao Huang
parent
1e47621958
commit
41b8d2add8
@@ -216,9 +216,9 @@ struct rockchip_spi {
|
||||
struct pinctrl_state *high_speed_state;
|
||||
};
|
||||
|
||||
static inline void spi_enable_chip(struct rockchip_spi *rs, int enable)
|
||||
static inline void spi_enable_chip(struct rockchip_spi *rs, bool enable)
|
||||
{
|
||||
writel_relaxed((enable ? 1 : 0), rs->regs + ROCKCHIP_SPI_SSIENR);
|
||||
writel_relaxed((enable ? 1U : 0U), rs->regs + ROCKCHIP_SPI_SSIENR);
|
||||
}
|
||||
|
||||
static inline void spi_set_clk(struct rockchip_spi *rs, u16 div)
|
||||
@@ -347,7 +347,7 @@ static int rockchip_spi_unprepare_message(struct spi_master *master,
|
||||
{
|
||||
struct rockchip_spi *rs = spi_master_get_devdata(master);
|
||||
|
||||
spi_enable_chip(rs, 0);
|
||||
spi_enable_chip(rs, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -387,7 +387,7 @@ static int rockchip_spi_pio_transfer(struct rockchip_spi *rs)
|
||||
{
|
||||
int remain = 0;
|
||||
|
||||
spi_enable_chip(rs, 1);
|
||||
spi_enable_chip(rs, true);
|
||||
|
||||
do {
|
||||
if (rs->tx) {
|
||||
@@ -407,7 +407,7 @@ static int rockchip_spi_pio_transfer(struct rockchip_spi *rs)
|
||||
if (rs->tx)
|
||||
wait_for_idle(rs);
|
||||
|
||||
spi_enable_chip(rs, 0);
|
||||
spi_enable_chip(rs, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -421,7 +421,7 @@ static void rockchip_spi_dma_rxcb(void *data)
|
||||
|
||||
rs->state &= ~RXBUSY;
|
||||
if (!(rs->state & TXBUSY)) {
|
||||
spi_enable_chip(rs, 0);
|
||||
spi_enable_chip(rs, false);
|
||||
spi_finalize_current_transfer(rs->master);
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ static void rockchip_spi_dma_txcb(void *data)
|
||||
|
||||
rs->state &= ~TXBUSY;
|
||||
if (!(rs->state & RXBUSY)) {
|
||||
spi_enable_chip(rs, 0);
|
||||
spi_enable_chip(rs, false);
|
||||
spi_finalize_current_transfer(rs->master);
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs)
|
||||
dma_async_issue_pending(rs->dma_rx.ch);
|
||||
}
|
||||
|
||||
spi_enable_chip(rs, 1);
|
||||
spi_enable_chip(rs, true);
|
||||
|
||||
if (txdesc) {
|
||||
spin_lock_irqsave(&rs->lock, flags);
|
||||
@@ -741,7 +741,7 @@ static int rockchip_spi_probe(struct platform_device *pdev)
|
||||
goto err_disable_apbclk;
|
||||
}
|
||||
|
||||
spi_enable_chip(rs, 0);
|
||||
spi_enable_chip(rs, false);
|
||||
|
||||
rs->type = SSI_MOTO_SPI;
|
||||
rs->master = master;
|
||||
|
||||
Reference in New Issue
Block a user