Commit f9535999 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'spi-fix-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few small driver specific fixes (including some of the widespread
  work on fixing missing ID tables for module autoloading and the revert
  of some problematic PM work in spi-rockchip), some improvements to the
  MAINTAINERS information for the NXP drivers and the addition of a new
  device ID to spidev"

* tag 'spi-fix-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  MAINTAINERS: SPI: Add mailing list imx@lists.linux.dev for nxp spi drivers
  MAINTAINERS: SPI: Add freescale lpspi maintainer information
  spi: spi-fsl-lpspi: Fix off-by-one in prescale max
  spi: spidev: Add missing spi_device_id for jg10309-01
  spi: bcm63xx: Enable module autoloading
  spi: intel: Add check devm_kasprintf() returned value
  spi: spidev: Add an entry for elgin,jg10309-01
  spi: rockchip: Resolve unbalanced runtime PM / system PM handling
parents 2a660447 c9ca76e8
...@@ -8864,6 +8864,7 @@ F: drivers/dma/fsldma.* ...@@ -8864,6 +8864,7 @@ F: drivers/dma/fsldma.*
FREESCALE DSPI DRIVER FREESCALE DSPI DRIVER
M: Vladimir Oltean <olteanv@gmail.com> M: Vladimir Oltean <olteanv@gmail.com>
L: linux-spi@vger.kernel.org L: linux-spi@vger.kernel.org
L: imx@lists.linux.dev
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/spi/fsl,dspi*.yaml F: Documentation/devicetree/bindings/spi/fsl,dspi*.yaml
F: drivers/spi/spi-fsl-dspi.c F: drivers/spi/spi-fsl-dspi.c
...@@ -8948,6 +8949,14 @@ S: Maintained ...@@ -8948,6 +8949,14 @@ S: Maintained
F: Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml F: Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
F: drivers/i2c/busses/i2c-imx-lpi2c.c F: drivers/i2c/busses/i2c-imx-lpi2c.c
FREESCALE IMX LPSPI DRIVER
M: Frank Li <Frank.Li@nxp.com>
L: linux-spi@vger.kernel.org
L: imx@lists.linux.dev
S: Maintained
F: Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml
F: drivers/spi/spi-fsl-lpspi.c
FREESCALE MPC I2C DRIVER FREESCALE MPC I2C DRIVER
M: Chris Packham <chris.packham@alliedtelesis.co.nz> M: Chris Packham <chris.packham@alliedtelesis.co.nz>
L: linux-i2c@vger.kernel.org L: linux-i2c@vger.kernel.org
...@@ -8984,6 +8993,7 @@ F: include/linux/fsl/ptp_qoriq.h ...@@ -8984,6 +8993,7 @@ F: include/linux/fsl/ptp_qoriq.h
FREESCALE QUAD SPI DRIVER FREESCALE QUAD SPI DRIVER
M: Han Xu <han.xu@nxp.com> M: Han Xu <han.xu@nxp.com>
L: linux-spi@vger.kernel.org L: linux-spi@vger.kernel.org
L: imx@lists.linux.dev
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml F: Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
F: drivers/spi/spi-fsl-qspi.c F: drivers/spi/spi-fsl-qspi.c
...@@ -16408,6 +16418,7 @@ M: Han Xu <han.xu@nxp.com> ...@@ -16408,6 +16418,7 @@ M: Han Xu <han.xu@nxp.com>
M: Haibo Chen <haibo.chen@nxp.com> M: Haibo Chen <haibo.chen@nxp.com>
R: Yogesh Gaur <yogeshgaur.83@gmail.com> R: Yogesh Gaur <yogeshgaur.83@gmail.com>
L: linux-spi@vger.kernel.org L: linux-spi@vger.kernel.org
L: imx@lists.linux.dev
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/spi/spi-nxp-fspi.yaml F: Documentation/devicetree/bindings/spi/spi-nxp-fspi.yaml
F: drivers/spi/spi-nxp-fspi.c F: drivers/spi/spi-nxp-fspi.c
......
...@@ -472,6 +472,7 @@ static const struct of_device_id bcm63xx_spi_of_match[] = { ...@@ -472,6 +472,7 @@ static const struct of_device_id bcm63xx_spi_of_match[] = {
{ .compatible = "brcm,bcm6358-spi", .data = &bcm6358_spi_reg_offsets }, { .compatible = "brcm,bcm6358-spi", .data = &bcm6358_spi_reg_offsets },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, bcm63xx_spi_of_match);
static int bcm63xx_spi_probe(struct platform_device *pdev) static int bcm63xx_spi_probe(struct platform_device *pdev)
{ {
......
...@@ -136,7 +136,7 @@ static struct fsl_lpspi_devtype_data imx93_lpspi_devtype_data = { ...@@ -136,7 +136,7 @@ static struct fsl_lpspi_devtype_data imx93_lpspi_devtype_data = {
}; };
static struct fsl_lpspi_devtype_data imx7ulp_lpspi_devtype_data = { static struct fsl_lpspi_devtype_data imx7ulp_lpspi_devtype_data = {
.prescale_max = 8, .prescale_max = 7,
}; };
static const struct of_device_id fsl_lpspi_dt_ids[] = { static const struct of_device_id fsl_lpspi_dt_ids[] = {
...@@ -336,7 +336,7 @@ static int fsl_lpspi_set_bitrate(struct fsl_lpspi_data *fsl_lpspi) ...@@ -336,7 +336,7 @@ static int fsl_lpspi_set_bitrate(struct fsl_lpspi_data *fsl_lpspi)
div = DIV_ROUND_UP(perclk_rate, config.speed_hz); div = DIV_ROUND_UP(perclk_rate, config.speed_hz);
for (prescale = 0; prescale < prescale_max; prescale++) { for (prescale = 0; prescale <= prescale_max; prescale++) {
scldiv = div / (1 << prescale) - 2; scldiv = div / (1 << prescale) - 2;
if (scldiv < 256) { if (scldiv < 256) {
fsl_lpspi->config.prescale = prescale; fsl_lpspi->config.prescale = prescale;
......
...@@ -1390,6 +1390,9 @@ static int intel_spi_populate_chip(struct intel_spi *ispi) ...@@ -1390,6 +1390,9 @@ static int intel_spi_populate_chip(struct intel_spi *ispi)
pdata->name = devm_kasprintf(ispi->dev, GFP_KERNEL, "%s-chip1", pdata->name = devm_kasprintf(ispi->dev, GFP_KERNEL, "%s-chip1",
dev_name(ispi->dev)); dev_name(ispi->dev));
if (!pdata->name)
return -ENOMEM;
pdata->nr_parts = 1; pdata->nr_parts = 1;
parts = devm_kcalloc(ispi->dev, pdata->nr_parts, sizeof(*parts), parts = devm_kcalloc(ispi->dev, pdata->nr_parts, sizeof(*parts),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -945,14 +945,16 @@ static int rockchip_spi_suspend(struct device *dev) ...@@ -945,14 +945,16 @@ static int rockchip_spi_suspend(struct device *dev)
{ {
int ret; int ret;
struct spi_controller *ctlr = dev_get_drvdata(dev); struct spi_controller *ctlr = dev_get_drvdata(dev);
struct rockchip_spi *rs = spi_controller_get_devdata(ctlr);
ret = spi_controller_suspend(ctlr); ret = spi_controller_suspend(ctlr);
if (ret < 0) if (ret < 0)
return ret; return ret;
clk_disable_unprepare(rs->spiclk); ret = pm_runtime_force_suspend(dev);
clk_disable_unprepare(rs->apb_pclk); if (ret < 0) {
spi_controller_resume(ctlr);
return ret;
}
pinctrl_pm_select_sleep_state(dev); pinctrl_pm_select_sleep_state(dev);
...@@ -963,25 +965,14 @@ static int rockchip_spi_resume(struct device *dev) ...@@ -963,25 +965,14 @@ static int rockchip_spi_resume(struct device *dev)
{ {
int ret; int ret;
struct spi_controller *ctlr = dev_get_drvdata(dev); struct spi_controller *ctlr = dev_get_drvdata(dev);
struct rockchip_spi *rs = spi_controller_get_devdata(ctlr);
pinctrl_pm_select_default_state(dev); pinctrl_pm_select_default_state(dev);
ret = clk_prepare_enable(rs->apb_pclk); ret = pm_runtime_force_resume(dev);
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = clk_prepare_enable(rs->spiclk); return spi_controller_resume(ctlr);
if (ret < 0)
clk_disable_unprepare(rs->apb_pclk);
ret = spi_controller_resume(ctlr);
if (ret < 0) {
clk_disable_unprepare(rs->spiclk);
clk_disable_unprepare(rs->apb_pclk);
}
return 0;
} }
#endif /* CONFIG_PM_SLEEP */ #endif /* CONFIG_PM_SLEEP */
......
...@@ -702,6 +702,7 @@ static const struct class spidev_class = { ...@@ -702,6 +702,7 @@ static const struct class spidev_class = {
static const struct spi_device_id spidev_spi_ids[] = { static const struct spi_device_id spidev_spi_ids[] = {
{ .name = "bh2228fv" }, { .name = "bh2228fv" },
{ .name = "dh2228fv" }, { .name = "dh2228fv" },
{ .name = "jg10309-01" },
{ .name = "ltc2488" }, { .name = "ltc2488" },
{ .name = "sx1301" }, { .name = "sx1301" },
{ .name = "bk4" }, { .name = "bk4" },
...@@ -731,6 +732,7 @@ static int spidev_of_check(struct device *dev) ...@@ -731,6 +732,7 @@ static int spidev_of_check(struct device *dev)
static const struct of_device_id spidev_dt_ids[] = { static const struct of_device_id spidev_dt_ids[] = {
{ .compatible = "cisco,spi-petra", .data = &spidev_of_check }, { .compatible = "cisco,spi-petra", .data = &spidev_of_check },
{ .compatible = "dh,dhcom-board", .data = &spidev_of_check }, { .compatible = "dh,dhcom-board", .data = &spidev_of_check },
{ .compatible = "elgin,jg10309-01", .data = &spidev_of_check },
{ .compatible = "lineartechnology,ltc2488", .data = &spidev_of_check }, { .compatible = "lineartechnology,ltc2488", .data = &spidev_of_check },
{ .compatible = "lwn,bk4", .data = &spidev_of_check }, { .compatible = "lwn,bk4", .data = &spidev_of_check },
{ .compatible = "menlo,m53cpld", .data = &spidev_of_check }, { .compatible = "menlo,m53cpld", .data = &spidev_of_check },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment