Commit Graph

1295889 Commits

Author SHA1 Message Date
Mark Brown
f10d52087c
spi: Merge up fixes
A patch for Qualcomm depends on some fixes.
2024-09-12 12:38:44 +01:00
Yang Yingliang
740c1c84bf
spi: remove spi_controller_is_slave() and spi_slave_abort()
spi_controller_is_slave() and spi_slave_abort() are all replaced,
so they can be removed.

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20240910022618.1397-8-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-10 12:41:42 +01:00
Yang Yingliang
5b2e4d1515
platform/olpc: olpc-xo175-ec: switch to use spi_target_abort().
Switch to use modern name function spi_target_abort().

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patch.msgid.link/20240910022618.1397-7-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-10 12:41:41 +01:00
Yang Yingliang
be03763d24
spi: slave-mt27xx: switch to use target_abort
Switch to use modern name target_abort.

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20240910022618.1397-6-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-10 12:41:40 +01:00
Yang Yingliang
94628e5a07
spi: spidev: switch to use spi_target_abort()
Switch to use modern name function spi_target_abort().

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20240910022618.1397-5-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-10 12:41:39 +01:00
Yang Yingliang
f4bf5454f8
spi: slave-system-control: switch to use spi_target_abort()
Switch to use modern name function spi_target_abort().

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20240910022618.1397-4-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-10 12:41:38 +01:00
Yang Yingliang
6adfdf0780
spi: slave-time: switch to use spi_target_abort()
Switch to use modern name function spi_target_abort().

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20240910022618.1397-3-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-10 12:41:37 +01:00
Yang Yingliang
1e0cc8d0a1
spi: switch to use spi_controller_is_target()
Switch to use modern name function spi_controller_is_target().

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20240910022618.1397-2-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-10 12:41:36 +01:00
Jinjie Ruan
b787a33864
spi: geni-qcom: Fix incorrect free_irq() sequence
In spi_geni_remove(), the free_irq() sequence is different from that
on the probe error path. And the IRQ will still remain and it's interrupt
handler may use the dma channel after release dma channel and before free
irq, which is not secure, fix it.

Fixes: b59c122484 ("spi: spi-geni-qcom: Add support for GPI dma")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240909073141.951494-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-09 12:57:33 +01:00
Jinjie Ruan
89e362c883
spi: geni-qcom: Undo runtime PM changes at driver exit time
It's important to undo pm_runtime_use_autosuspend() with
pm_runtime_dont_use_autosuspend() at driver exit time unless driver
initially enabled pm_runtime with devm_pm_runtime_enable()
(which handles it for you).

Hence, switch to devm_pm_runtime_enable() to fix it, so the
pm_runtime_disable() in probe error path and remove function
can be removed.

Fixes: cfdab2cd85 ("spi: spi-geni-qcom: Set an autosuspend delay of 250 ms")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240909073141.951494-2-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-09 12:57:32 +01:00
Frank Li
c9ca76e823
MAINTAINERS: SPI: Add mailing list imx@lists.linux.dev for nxp spi drivers
Add mailing list imx@lists.linux.dev for nxp spi drivers(qspi, fspi and
dspi).

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20240905155230.1901787-1-Frank.Li@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-05 19:15:45 +01:00
Frank Li
fb9820c550
MAINTAINERS: SPI: Add freescale lpspi maintainer information
Add imx@lists.linux.dev and NXP maintainer information for lpspi driver
(drivers/spi/spi-fsl-lpspi.c).

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20240905154124.1901311-1-Frank.Li@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-05 19:15:44 +01:00
Haibo Chen
9228956a62
spi: fspi: add support for imx8ulp
The flexspi on imx8ulp only has 16 LUTs, different with others which
have up to 32 LUTs.

Add a separate compatible string and nxp_fspi_devtype_data to support
flexspi on imx8ulp.

Fixes: ef89fd56bd ("arm64: dts: imx8ulp: add flexspi node")
Cc: stable@kernel.org
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20240905094338.1986871-4-haibo.chen@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-05 16:07:21 +01:00
Haibo Chen
190b7e2efb
spi: fspi: involve lut_num for struct nxp_fspi_devtype_data
The flexspi on different SoCs may have different number of LUTs.
So involve lut_num in nxp_fspi_devtype_data to make distinguish.
This patch prepare for the adding of imx8ulp.

Fixes: ef89fd56bd ("arm64: dts: imx8ulp: add flexspi node")
Cc: stable@kernel.org
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20240905094338.1986871-3-haibo.chen@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-05 16:07:20 +01:00
Haibo Chen
12736adc43
dt-bindings: spi: nxp-fspi: add imx8ulp support
The flexspi on imx8ulp only has 16 number of LUTs, it is different
with flexspi on other imx SoC which has 32 number of LUTs.

Fixes: ef89fd56bd ("arm64: dts: imx8ulp: add flexspi node")
Cc: stable@kernel.org
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20240905094338.1986871-2-haibo.chen@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-05 16:07:19 +01:00
Stefan Wahren
ff949d981c
spi: spi-fsl-lpspi: Fix off-by-one in prescale max
The commit 783bf5d09f ("spi: spi-fsl-lpspi: limit PRESCALE bit in
TCR register") doesn't implement the prescaler maximum as intended.
The maximum allowed value for i.MX93 should be 1 and for i.MX7ULP
it should be 7. So this needs also a adjustment of the comparison
in the scldiv calculation.

Fixes: 783bf5d09f ("spi: spi-fsl-lpspi: limit PRESCALE bit in TCR register")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20240905111537.90389-1-wahrenst@gmx.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-05 12:55:59 +01:00
zhang jiao
dce35dd276
spi: spidev_fdx: Fix the wrong format specifier
The unsigned int should use "%u" instead of "%d".

Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240904073550.103618-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-04 16:50:33 +01:00
Mark Brown
8426899ff6
Add device tree for ArmSoM Sige 5 board
Merge series from Detlev Casanova <detlev.casanova@collabora.com>:

Add the rk3576-armsom-sige5 device tree as well as its rk3576.dtsi base
and pinctrl information in rk3576-pinctrl.dtsi.

The other commits add DT bindings documentation for the devices that
already work with the current corresponding drivers.

Note that as is, the rockchip gpio driver needs the gpio nodes
to be children of the pinctrl node, even though this is deprecated.

When the driver supports it, they can be moved out of the pinctrl node.

The power-domain@RK3576_PD_USB is a child of power-domain@RK3576_PD_VOP.
That looks strange but it is how the hardware is, and confirmed by
Rockchip: The NOC bus of USB passes through the PD of VOP, so it relies on
VOP PD.

The other bindings have been applied on next.

Changes since v3:
- Dropped mmc dt-bindings (submitted in [2])
- Dropped syscon dt-bindings (applied in [3])
- Fix gpu interrupt names mapping
- (Fix email headers overwriting)

Changes since v2:
- Fix LEDs in armsom dts
- mmc: Move allOf after the required block
- Remove saradc dt-binding commit (already applied)
- Remove opp-microvolt-L* fields
- Reword mali commit message
- Use rgmii-id and remove delays on gmac nodes

Changes since v1:
- Add eMMC support
- Add gpu node
- Add rtc node
- Add spi compatible dt-bindings
- Add watchdog support
- Dropped timer compatible commit (applied in [0])
- Move ethernet aliases to board dt
- Move mmio nodes to soc node
- Removed cru grf phandle
- Removed gpio aliases
- Removed grf compatibles (applied in [1])
- Removed pinctrl php-grf phandle
- Removed v2-tuning for sdcard
- Renamed clock nodes
- Renamed regulators do match regulator-vcc-<voltage>-<name>
- Renamed the rkvdec_sram node to vdec_sram to match prior generations
- Reorder fields consistently in nodes
- Use correct #power-domain-cells values

[0]: https://lore.kernel.org/all/918bb9e4-02d9-4dca-bed2-28bb123bdc10@linaro.org/
[1]: https://lore.kernel.org/all/172441646605.877570.8075942261050000.b4-ty@sntech.de/
[2]: https://lore.kernel.org/all/20240903145615.9302-1-detlev.casanova@collabora.com/
[3]: https://lore.kernel.org/all/172500660860.97285.13837050366813522297.b4-ty@kernel.org/

Detlev.

Detlev Casanova (9):
  dt-bindings: arm: rockchip: Add ArmSoM Sige 5
  dt-bindings: arm: rockchip: Add rk3576 compatible string to pmu.yaml
  dt-bindings: i2c: i2c-rk3x: Add rk3576 compatible
  dt-bindings: serial: snps-dw-apb-uart: Add Rockchip RK3576
  dt-bindings: gpu: Add rockchip,rk3576-mali compatible
  dt-bindings: watchdog: Add rockchip,rk3576-wdt compatible
  spi: dt-bindings: Add rockchip,rk3576-spi compatible
  arm64: dts: rockchip: Add rk3576 SoC base DT
  arm64: dts: rockchip: Add rk3576-armsom-sige5 board

 .../devicetree/bindings/arm/rockchip.yaml     |    5 +
 .../devicetree/bindings/arm/rockchip/pmu.yaml |    2 +
 .../bindings/gpu/arm,mali-bifrost.yaml        |    1 +
 .../devicetree/bindings/i2c/i2c-rk3x.yaml     |    1 +
 .../bindings/serial/snps-dw-apb-uart.yaml     |    1 +
 .../devicetree/bindings/spi/spi-rockchip.yaml |    1 +
 .../bindings/watchdog/snps,dw-wdt.yaml        |    1 +
 arch/arm64/boot/dts/rockchip/Makefile         |    1 +
 .../boot/dts/rockchip/rk3576-armsom-sige5.dts |  659 ++
 .../boot/dts/rockchip/rk3576-pinctrl.dtsi     | 5775 +++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3576.dtsi      | 1644 +++++
 11 files changed, 8091 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3576.dtsi

--
2.46.0
2024-09-03 23:51:22 +01:00
Fabio Estevam
02774b1443
spi: mxs: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern
RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives.

The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the __maybe_unused annotations from the
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240902184655.932699-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-03 22:07:58 +01:00
Detlev Casanova
b0cdf9cc08
spi: dt-bindings: Add rockchip,rk3576-spi compatible
It is compatible with the rockchip,rk3066-spi SPI core.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240903152308.13565-8-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-03 17:38:41 +01:00
Geert Uytterhoeven
5478a4f7b9
spi: spidev: Add missing spi_device_id for jg10309-01
When the of_device_id entry for "elgin,jg10309-01" was added, the
corresponding spi_device_id was forgotten, causing a warning message
during boot-up:

    SPI driver spidev has no spi_device_id for elgin,jg10309-01

Fix module autoloading and shut up the warning by adding the missing
entry.

Fixes: 5f3eee1eef ("spi: spidev: Add an entry for elgin,jg10309-01")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/54bbb9d8a8db7e52d13e266f2d4a9bcd8b42a98a.1725366625.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-03 14:10:00 +01:00
Nathan Chancellor
bf62a8c790
spi: Revert "spi: Insert the missing pci_dev_put()before return"
Commit 8a0ec8c2d7 ("spi: Insert the missing pci_dev_put()before
return") added two uses of pci_dev_put() with an uninitialized dma_dev,
resulting in the following compiler warnings (or errors with
CONFIG_WERROR) when building with clang:

  drivers/spi/spi-pxa2xx-pci.c:150:15: error: variable 'dma_dev' is uninitialized when used here [-Werror,-Wuninitialized]
    150 |                 pci_dev_put(dma_dev);
        |                             ^~~~~~~
  drivers/spi/spi-pxa2xx-pci.c:228:15: error: variable 'dma_dev' is uninitialized when used here [-Werror,-Wuninitialized]
    228 |                 pci_dev_put(dma_dev);
        |                             ^~~~~~~

Commit 609d7ffdc4 ("spi: pxa2xx-pci: Balance reference count for PCI
DMA device") added a call to pci_dev_put() via
devm_add_action_or_reset() in case of failures, so the recent change was
incorrect for multiple reasons. Revert it altogether.

Fixes: 8a0ec8c2d7 ("spi: Insert the missing pci_dev_put()before return")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/CAMuHMdWNjo69_W6f+R9QJJOf8uF0htg2XazeS-yjugJv3UM+kg@mail.gmail.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20240902-spi-revert-8a0ec8c2d736-v1-1-928b829fed2b@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-03 12:37:20 +01:00
Kuan-Wei Chiu
f626a0cd07
spi: zynq-qspi: Replace kzalloc with kmalloc for buffer allocation
In zynq_qspi_exec_mem_op(), the temporary buffer is allocated with
kzalloc and then immediately initialized using memset to 0xff. To
optimize this, replace kzalloc with kmalloc, as the zeroing operation
is redundant and unnecessary.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20240814192839.345523-1-visitorckw@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-02 19:17:44 +01:00
Andy Shevchenko
e86836883a
spi: ppc4xx: Sort headers
Sort the headers in alphabetic order in order to ease
the maintenance for this part.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240902103203.2476576-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-02 12:56:31 +01:00
Andy Shevchenko
7f9f8c5939
spi: ppc4xx: Revert "handle irq_of_parse_and_map() errors"
The commit had been applied twice as
  0f245463b0 ("spi: ppc4xx: handle irq_of_parse_and_map() errors")
and
  f1011ba20b ("spi: ppc4xx: handle irq_of_parse_and_map() errors")

This reverts commit f1011ba20b.

Fixes: f1011ba20b ("spi: ppc4xx: handle irq_of_parse_and_map() errors")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240902102853.2476165-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-02 12:56:30 +01:00
Liao Chen
709df70a20
spi: bcm63xx: Enable module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based
on the alias from of_device_id table.

Signed-off-by: Liao Chen <liaochen4@huawei.com>
Link: https://patch.msgid.link/20240831094231.795024-1-liaochen4@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-02 12:56:01 +01:00
Jinjie Ruan
d814fd0f04
spi: zynqmp-gqspi: Simplify with dev_err_probe()
Use the dev_err_probe() helper to simplify error handling during probe.
This also handle scenario, when EDEFER is returned and useless error
is printed.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20240826121421.3384792-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-30 15:14:18 +01:00
Jinjie Ruan
64640f6c97
spi: zynqmp-gqspi: Use devm_spi_alloc_host()
Use devm_spi_alloc_host() so that there's no need to call
spi_controller_put() in the error path.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20240826121421.3384792-2-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-30 15:14:17 +01:00
Hongbo Li
e3de1d8deb
spi: spi-ppc4xx: Remove duplicate included header file linux/platform_device.h
The header file linux/platform_device.h is included
twice. Remove the last one.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240830075800.3541646-1-lihongbo22@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-30 12:28:38 +01:00
Charles Han
2920294686
spi: intel: Add check devm_kasprintf() returned value
intel_spi_populate_chip() use devm_kasprintf() to set pdata->name.
This can return a NULL pointer on failure but this returned value
is not checked.

Fixes: e58db3bcd9 ("spi: intel: Add default partition and name to the second chip")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://patch.msgid.link/20240830074106.8744-1-hanchunchao@inspur.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-30 12:28:17 +01:00
Mark Brown
99311b8a9e
spi: atmel-quadspi: Fix uninitialized res
Merge series from Jinjie Ruan <ruanjinjie@huawei.com>:

Fix uninitialized res in probe function.
2024-08-29 18:39:19 +01:00
Mark Brown
11543f534a
spi: bcmbca-hsspi: Fix missing pm_runtime_disable()
Merge series from Jinjie Ruan <ruanjinjie@huawei.com>:

Fix missing pm_runtime_disable().
2024-08-29 18:39:05 +01:00
Mark Brown
1db86650b9
spi: wpcm-fiu: Fix uninitialized res
Merge series from Jinjie Ruan <ruanjinjie@huawei.com>:

Fix uninitialized res in probe function.
2024-08-29 18:38:53 +01:00
Fabio Estevam
5f3eee1eef
spi: spidev: Add an entry for elgin,jg10309-01
The rv1108-elgin-r1 board has an LCD controlled via SPI in userspace.
The marking on the LCD is JG10309-01.

Add the "elgin,jg10309-01" compatible string.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20240828180057.3167190-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-29 13:24:32 +01:00
Yan Zhen
3959d1f0f8
spi: nxp-fspi: Use max macro
When the original file is guaranteed to contain the minmax.h header file
and compile correctly, using the real macro is usually
more intuitive and readable.

Signed-off-by: Yan Zhen <yanzhen@vivo.com>
Link: https://patch.msgid.link/20240827131203.3918516-1-yanzhen@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-29 13:02:07 +01:00
Fabio Estevam
ab3f6e1592
spi: spidev: Add an entry for elgin,jg10309-01
The rv1108-elgin-r1 board has an LCD controlled via SPI in userspace.
The marking on the LCD is JG10309-01.

Add the "elgin,jg10309-01" compatible string.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20240829113158.3324928-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-29 13:02:06 +01:00
Fabio Estevam
ac7ee784fd
dt-bindings: trivial-devices: Document elgin,jg10309-01
The rv1108-elgin-r1 board has an LCD controlled via SPI in userspace.
The marking on the LCD is JG10309-01.

Add an entry for the "elgin,jg10309-01" compatible string.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20240829113158.3324928-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-29 13:02:05 +01:00
Yang Ruibin
8a0ec8c2d7
spi: Insert the missing pci_dev_put()before return
Increase the reference count by calling pci_get_slot(), and remember to
decrement the reference count by calling pci_dev_put().

Signed-off-by: Yang Ruibin <11162571@vivo.com>
Link: https://patch.msgid.link/20240829033511.1917015-1-11162571@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-29 13:02:04 +01:00
Jinjie Ruan
196d34e2c8
spi: wpcm-fiu: Simplify with dev_err_probe()
Use the dev_err_probe() helper to simplify error handling during probe.
This also handle scenario, when EDEFER is returned and useless error
is printed.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240826132544.3463616-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 22:22:24 +01:00
Jinjie Ruan
0f2cf3bc47
spi: wpcm-fiu: Fix uninitialized res
The second platform_get_resource_byname() can not be replaced with
devm_platform_ioremap_resource_byname(), because the intermediate "res"
is used by resource_size() later.

Fixes: 3bf2a5359b ("spi: wpcm-fiu: Use devm_platform_ioremap_resource_byname()")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240826132544.3463616-2-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 22:22:23 +01:00
Jinjie Ruan
2d3e6351a2
spi: atmel-quadspi: Simplify with dev_err_probe()
Use the dev_err_probe() helper to simplify error handling during probe.
This also handle scenario, when EDEFER is returned and useless error
is printed.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240826125913.3434305-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 22:11:17 +01:00
Jinjie Ruan
c2ea9b8a53
spi: atmel-quadspi: Fix uninitialized res
The second platform_get_resource_byname() can not be replaced with
devm_platform_ioremap_resource_byname(), because the intermediate "res"
is used to assign for "aq->mmap_size".

Fixes: 3ccea1dede ("spi: atmel-quadspi: Simpify resource lookup")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Hari Prasath Gujulan Elango <hari.prasathge@microchip.com>
Link: https://patch.msgid.link/20240826125913.3434305-2-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 22:11:16 +01:00
Jinjie Ruan
deb269e039
spi: bcmbca-hsspi: Use devm_spi_alloc_host()
Use devm_spi_alloc_host() so that there's no need to call
spi_controller_put() in the error path.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Link: https://patch.msgid.link/20240826124903.3429235-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 20:39:08 +01:00
Jinjie Ruan
4439a2e92c
spi: bcmbca-hsspi: Fix missing pm_runtime_disable()
The pm_runtime_disable() is missing in remove function, use
devm_pm_runtime_enable() to fix it. So the pm_runtime_disable() in
the probe error path can also be removed.

Fixes: a38a2233f2 ("spi: bcmbca-hsspi: Add driver for newer HSSPI controller")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Link: https://patch.msgid.link/20240826124903.3429235-2-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 20:39:07 +01:00
Brian Norris
be721b451a
spi: rockchip: Resolve unbalanced runtime PM / system PM handling
Commit e882575efc ("spi: rockchip: Suspend and resume the bus during
NOIRQ_SYSTEM_SLEEP_PM ops") stopped respecting runtime PM status and
simply disabled clocks unconditionally when suspending the system. This
causes problems when the device is already runtime suspended when we go
to sleep -- in which case we double-disable clocks and produce a
WARNing.

Switch back to pm_runtime_force_{suspend,resume}(), because that still
seems like the right thing to do, and the aforementioned commit makes no
explanation why it stopped using it.

Also, refactor some of the resume() error handling, because it's not
actually a good idea to re-disable clocks on failure.

Fixes: e882575efc ("spi: rockchip: Suspend and resume the bus during NOIRQ_SYSTEM_SLEEP_PM ops")
Cc: stable@vger.kernel.org
Reported-by: Ondřej Jirman <megi@xff.cz>
Closes: https://lore.kernel.org/lkml/20220621154218.sau54jeij4bunf56@core/
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://patch.msgid.link/20240827171126.1115748-1-briannorris@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 20:39:00 +01:00
Bastien Curutchet
2fe6102bf0
spi: davinci: Adapt transfer's timeout to transfer's length
The timeout used when waiting for transfer's completion is always set to
HZ. This isn't enough if a transfer is too large or if the bus speed is
too low.

Use the bus speed and the transfer length to calculate an appropriate
timeout

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20240828063131.10507-1-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-28 13:38:02 +01:00
Linus Torvalds
5be63fc19f Linux 6.11-rc5 2024-08-25 19:07:11 +12:00
Linus Torvalds
72bea05cb1 bcachefs fixes for 6.11-rc5, v2
- rhashtable conversion for vfs inodes
 - rcu_pending, btree key cache conversion
 + nocow deadlock fix
 + fix for new rebalance_work accounting
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEKnAFLkS8Qha+jvQrE6szbY3KbnYFAmbKB9wACgkQE6szbY3K
 bnYMtw/+LSGV/eqwLwdeuABggU5gehWjxqkWF/uGE7fPP8pP0dJQnvCLRVKtAro2
 0mJh6j+kM602fU5jH/W8WNn1h8J7dAdkyqI7P/D3ZgTdaCtxso+A0Nj95CYpNdWY
 ESX9CLUYSxtFatT/kfWvlRvqlSJBYo7WgNsV6tcnPdpC+Oki6Kwlq22iI+ma9Ty7
 uDbgd05/R9KCSxaaV+9iojCsEq6h/tuFH8Z3f3SevA8H29odh5mt0UWNn05pf3mt
 rAnDUJ5TQVYubMIcbS6MhjVoLZ3AxOefkk4pctdbdmGSPJcssDeXvATn/wHYl6Fp
 +et1ECRU3Sc3dqcmT0RaTm/yxYytdtKA4HVxS4ELKbsIM2xU0Pjq3JQwKzHRwXDd
 a3r0WXa+LqHkBP37g0HhuxhxAECnbpUM9bvDivgGssVDLyxfMKUkhDsuzegjrHAF
 v5H08myk5maKvLv+dD6e23t0l1i9eB/bSsw1iNGOgZP4k9gsUlESvppFGw/10F+Q
 1Y/qeSiNTG9kJyo9PQTOZ6rFVxrfaZ9NFP4EAXcWId81OsQHYY8XnE5XaJATxnwF
 MzCgNdmzuf67X6Q8fCeNCJtiZ5sCmbyENGd6hbyYFDg+R02p0NOM4ABVN6BBfXJ+
 eHPyu2bvusIZt8MD6c7fOxyGsGdgLxIv/SkqLayZdxEaY3VvS2g=
 =ejxu
 -----END PGP SIGNATURE-----

Merge tag 'bcachefs-2024-08-24' of git://evilpiepirate.org/bcachefs

Pull bcachefs fixes from Kent Overstreet:

 - assorted syzbot fixes

 - some upgrade fixes for old (pre 1.0) filesystems

 - fix for moving data off a device that was switched to durability=0
   after data had been written to it.

 - nocow deadlock fix

 - fix for new rebalance_work accounting

* tag 'bcachefs-2024-08-24' of git://evilpiepirate.org/bcachefs: (28 commits)
  bcachefs: Fix rebalance_work accounting
  bcachefs: Fix failure to flush moves before sleeping in copygc
  bcachefs: don't use rht_bucket() in btree_key_cache_scan()
  bcachefs: add missing inode_walker_exit()
  bcachefs: clear path->should_be_locked in bch2_btree_key_cache_drop()
  bcachefs: Fix double assignment in check_dirent_to_subvol()
  bcachefs: Fix refcounting in discard path
  bcachefs: Fix compat issue with old alloc_v4 keys
  bcachefs: Fix warning in bch2_fs_journal_stop()
  fs/super.c: improve get_tree() error message
  bcachefs: Fix missing validation in bch2_sb_journal_v2_validate()
  bcachefs: Fix replay_now_at() assert
  bcachefs: Fix locking in bch2_ioc_setlabel()
  bcachefs: fix failure to relock in btree_node_fill()
  bcachefs: fix failure to relock in bch2_btree_node_mem_alloc()
  bcachefs: unlock_long() before resort in journal replay
  bcachefs: fix missing bch2_err_str()
  bcachefs: fix time_stats_to_text()
  bcachefs: Fix bch2_bucket_gens_init()
  bcachefs: Fix bch2_trigger_alloc assert
  ...
2024-08-25 17:20:48 +12:00
Linus Torvalds
780bdc1ba7 five ksmbd server fixes
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmbJteoACgkQiiy9cAdy
 T1F+Pwv/RHXSnQD+jkFEfQCEgsZZOfWD0V74VZqm90N48gfB3giZw9mtV4I1jQzI
 0+UerZjN7lHIDC4f6qp48TSEodHpprAxLfsg5JJN/OxDE+0MSbctTjLeHlduVzw6
 iHEdaE3jWN0p4YZRdbyrUCaOoTEk9cKwiG7r2DjArNyQ8kClveeqrGfdZUDTHNkv
 IIs6CJ8PFo7dicpAIGPmMz1TGq5Lh2EFjZTYEweSSlyXUNKaWgz3BXBIXD4LwK6w
 mFjGPxGNBDorcvzHcOUZnrpfACB3WNOSPN/WK5sQL6LXGCx3sWtUvGxLFkxFwjSq
 D7gvo7qnBuycNyR03RfmWyXYx+2KzdYoAUGTNV114zMJskBC0QhIIF6JK+xZdPZX
 XHxbr4CRR7fsaZOur5MTWXEzVJxvC1irULKoBp7lvYpEoAV6yXpK3XegAHIASKUE
 /Cw9qikIvxrMg4BjWPP1JhbKRw92uL2ty4oO913hbnBsScS8jCystuNl6ataiXWq
 PN5rN4sy
 =bGOb
 -----END PGP SIGNATURE-----

Merge tag '6.11-rc5-server-fixes' of git://git.samba.org/ksmbd

Pull smb server fixes from Steve French:

 - query directory flex array fix

 - fix potential null ptr reference in open

 - fix error message in some open cases

 - two minor cleanups

* tag '6.11-rc5-server-fixes' of git://git.samba.org/ksmbd:
  smb/server: update misguided comment of smb2_allocate_rsp_buf()
  smb/server: remove useless assignment of 'file_present' in smb2_open()
  smb/server: fix potential null-ptr-deref of lease_ctx_info in smb2_open()
  smb/server: fix return value of smb2_open()
  ksmbd: the buffer of smb2 query dir response has at least 1 byte
2024-08-25 12:15:04 +12:00
Linus Torvalds
48fb4b3d9b s390 updates for 6.11-rc5
- Fix KASLR base offset to account for symbol offsets in the vmlinux
   ELF file, preventing tool breakages like the drgn debugger
 
 - Fix potential memory corruption of physmem_info during kernel physical
   address randomization
 
 - Fix potential memory corruption due to overlap between the relocated
   lowcore and identity mapping by correctly reserving lowcore memory
 
 - Fix performance regression and avoid randomizing identity mapping base
   by default
 
 - Fix unnecessary delay of AP bus binding complete uevent to prevent
   startup lag in KVM guests using AP
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEE3QHqV+H2a8xAv27vjYWKoQLXFBgFAmbJDQYACgkQjYWKoQLX
 FBgTdwf9FNkHvLFhf5JbqlIERrjI9Ax8lQwCrAAJOidWwyKKs5hkFXUbf8JeMO1/
 r/eIWI/hqeeQhm/YXWsdrO1KOi2tS92eHTztelTZjKS7d2nLEkl5EELRtE6lVwWK
 6T/iENQNtBibRnK6zDRb3acb/MGkdQEDfNmvRwI02ZwIvGlv6bQnQEspKc69YJOo
 DiDHb+aqpsSjAY9QlRzM/Dxg3NUknEYOfxoDY6rG9cL1KnZxk+PDfy+z9gno44Tx
 vf+G55lBQ+vunQsV/9YHKYsytsj7kYCECp/W50W1ExrOBPhZRR9zM2S14BVCGuIW
 EdLVD8R1h0oRcgqlCIrKsnxAqatzIQ==
 =RsEC
 -----END PGP SIGNATURE-----

Merge tag 's390-6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

 - Fix KASLR base offset to account for symbol offsets in the vmlinux
   ELF file, preventing tool breakages like the drgn debugger

 - Fix potential memory corruption of physmem_info during kernel
   physical address randomization

 - Fix potential memory corruption due to overlap between the relocated
   lowcore and identity mapping by correctly reserving lowcore memory

 - Fix performance regression and avoid randomizing identity mapping
   base by default

 - Fix unnecessary delay of AP bus binding complete uevent to prevent
   startup lag in KVM guests using AP

* tag 's390-6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/boot: Fix KASLR base offset off by __START_KERNEL bytes
  s390/boot: Avoid possible physmem_info segment corruption
  s390/ap: Refine AP bus bindings complete processing
  s390/mm: Pin identity mapping base to zero
  s390/mm: Prevent lowcore vs identity mapping overlap
2024-08-25 12:05:23 +12:00