diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/spi/spi-bcm63xx.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/spi/spi-bcm63xx.c')
| -rw-r--r-- | drivers/spi/spi-bcm63xx.c | 24 | 
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 3686d78c44a6..9aecb77c3d89 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -157,16 +157,6 @@ static inline u8 bcm_spi_readb(struct bcm63xx_spi *bs,  	return readb(bs->regs + bs->reg_offsets[offset]);  } -static inline u16 bcm_spi_readw(struct bcm63xx_spi *bs, -				unsigned int offset) -{ -#ifdef CONFIG_CPU_BIG_ENDIAN -	return ioread16be(bs->regs + bs->reg_offsets[offset]); -#else -	return readw(bs->regs + bs->reg_offsets[offset]); -#endif -} -  static inline void bcm_spi_writeb(struct bcm63xx_spi *bs,  				  u8 value, unsigned int offset)  { @@ -292,7 +282,7 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first,  	/* Issue the transfer */  	cmd = SPI_CMD_START_IMMEDIATE;  	cmd |= (prepend_len << SPI_CMD_PREPEND_BYTE_CNT_SHIFT); -	cmd |= (spi->chip_select << SPI_CMD_DEVICE_ID_SHIFT); +	cmd |= (spi_get_chipselect(spi, 0) << SPI_CMD_DEVICE_ID_SHIFT);  	bcm_spi_writew(bs, cmd, SPI_CMD);  	/* Enable the CMD_DONE interrupt */ @@ -615,7 +605,7 @@ out_err:  	return ret;  } -static int bcm63xx_spi_remove(struct platform_device *pdev) +static void bcm63xx_spi_remove(struct platform_device *pdev)  {  	struct spi_master *master = platform_get_drvdata(pdev);  	struct bcm63xx_spi *bs = spi_master_get_devdata(master); @@ -625,11 +615,8 @@ static int bcm63xx_spi_remove(struct platform_device *pdev)  	/* HW shutdown */  	clk_disable_unprepare(bs->clk); - -	return 0;  } -#ifdef CONFIG_PM_SLEEP  static int bcm63xx_spi_suspend(struct device *dev)  {  	struct spi_master *master = dev_get_drvdata(dev); @@ -656,11 +643,8 @@ static int bcm63xx_spi_resume(struct device *dev)  	return 0;  } -#endif -static const struct dev_pm_ops bcm63xx_spi_pm_ops = { -	SET_SYSTEM_SLEEP_PM_OPS(bcm63xx_spi_suspend, bcm63xx_spi_resume) -}; +static DEFINE_SIMPLE_DEV_PM_OPS(bcm63xx_spi_pm_ops, bcm63xx_spi_suspend, bcm63xx_spi_resume);  static struct platform_driver bcm63xx_spi_driver = {  	.driver = { @@ -670,7 +654,7 @@ static struct platform_driver bcm63xx_spi_driver = {  	},  	.id_table	= bcm63xx_spi_dev_match,  	.probe		= bcm63xx_spi_probe, -	.remove		= bcm63xx_spi_remove, +	.remove_new	= bcm63xx_spi_remove,  };  module_platform_driver(bcm63xx_spi_driver);  |