1. Aug 11, 2020
  2. Aug 05, 2020
  3. Aug 03, 2020
    • Lukas Wunner's avatar
      spi: Prevent adding devices below an unregistering controller · ddf75be4
      Lukas Wunner authored
      CONFIG_OF_DYNAMIC and CONFIG_ACPI allow adding SPI devices at runtime
      using a DeviceTree overlay or DSDT patch.  CONFIG_SPI_SLAVE allows the
      same via sysfs.
      
      But there are no precautions to prevent adding a device below a
      controller that's being removed.  Such a device is unusable and may not
      even be able to unbind cleanly as it becomes inaccessible once the
      controller has been torn down.  E.g. it is then impossible to quiesce
      the device's interrupt.
      
      of_spi_notify() and acpi_spi_notify() do hold a ref on the controller,
      but otherwise run lockless against spi_unregister_controller().
      
      Fix by holding the spi_add_lock in spi_unregister_controller() and
      bailing out of spi_add_device() if the controller has been unregistered
      concurrently.
      
      Fixes: ce79d54a
      
       ("spi/of: Add OF notifier handler")
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: stable@vger.kernel.org # v3.19+
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: Octavian Purdila <octavian.purdila@intel.com>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Link: https://lore.kernel.org/r/a8c3205088a969dc8410eec1eba9aface60f36af.1596451035.git.lukas@wunner.de
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ddf75be4
  4. Jul 29, 2020
  5. Jul 27, 2020
  6. Jul 22, 2020
  7. Jul 17, 2020
    • Mark Brown's avatar
      Merge series "Add support for... · 2b2d441d
      Mark Brown authored
      Merge series "Add support for [H]SCIF/TMU/CMT/THS/SDHI/MSIOF/CAN[FD]/I2C/IIC/RWDT on R8A774E1" from Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>:
      
      Hi All,
      
      This patch series enables support for following on RZ/G2H SoC,
      * CPU OPP
      * THS
      * CMT/TMU
      * I2C/IIC
      * MSIOF
      * RWDT
      * SDHI
      * SCIF/HSCIF
      * CAN/CANFD
      
      Cheers,
      Prabhakar
      
      Lad Prabhakar (14):
        dt-bindings: thermal: rcar-gen3-thermal: Add r8a774e1 support
        dt-bindings: timer: renesas,cmt: Document r8a774e1 CMT support
        arm64: dts: renesas: r8a774e1: Add SCIF and HSCIF nodes
        arm64: dts: renesas: r8a774e1: Add SDHI nodes
        dt-bindings: i2c: renesas,i2c: Document r8a774e1 support
        dt-bindings: i2c: renesas,iic: Document r8a774e1 support
        arm64: dts: renesas: r8a774e1: Add I2C and IIC-DVFS support
        dt-bindings: spi: renesas,sh-msiof: Add r8a774e1 support
        arm64: dts: renesas: r8a774e1: Add MSIOF nodes
        dt-bindings: watchdog: renesas,wdt: Document r8a774e1 support
        arm64: dts: renesas: r8a774e1: Add RWDT node
        dt-bindings: can: rcar_can: Document r8a774e1 support
        dt-bindings: can: rcar_canfd: Document r8a774e1 support
        arm64: dts: renesas: r8a774e1: Add CAN[FD] support
      
      Marian-Cristian Rotariu (6):
        arm64: dts: renesas: r8a774e1: Add operating points
        thermal: rcar_gen3_thermal: Add r8a774e1 support
        arm64: dts: renesas: r8a774e1: Add RZ/G2H thermal support
        arm64: dts: renesas: r8a774e1: Add CMT device nodes
        dt-bindings: timer: renesas,tmu: Document r8a774e1 bindings
        arm64: dts: renesas: r8a774e1: Add TMU device nodes
      
       .../devicetree/bindings/i2c/renesas,i2c.txt   |   1 +
       .../devicetree/bindings/i2c/renesas,iic.txt   |   1 +
       .../devicetree/bindings/net/can/rcar_can.txt  |   1 +
       .../bindings/net/can/rcar_canfd.txt           |   1 +
       .../bindings/spi/renesas,sh-msiof.yaml        |   1 +
       .../bindings/thermal/rcar-gen3-thermal.yaml   |   1 +
       .../bindings/timer/renesas,cmt.yaml           |   2 +
       .../devicetree/bindings/timer/renesas,tmu.txt |   1 +
       .../bindings/watchdog/renesas,wdt.yaml        |   1 +
       arch/arm64/boot/dts/renesas/r8a774e1.dtsi     | 713 +++++++++++++++++-
       drivers/thermal/rcar_gen3_thermal.c           |   4 +
       11 files changed, 715 insertions(+), 12 deletions(-)
      
      --
      2.17.1
      2b2d441d
    • Lee Jones's avatar
      spi: spi-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI · 85ed0f63
      Lee Jones authored
      
      
      Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
      struct 'spi_acpi_match' becomes defined but unused.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/spi/spi-amd.c:297:36: warning: ‘spi_acpi_match’ defined but not used [-Wunused-const-variable=]
       297 | static const struct acpi_device_id spi_acpi_match[] = {
       | ^~~~~~~~~~~~~~
      
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Cc: Sanjay R Mehta <sanju.mehta@amd.com>
      Link: https://lore.kernel.org/r/20200717135424.2442271-15-lee.jones@linaro.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      85ed0f63
    • Lee Jones's avatar
      spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when !CONFIG_ACPI · 9b2d6119
      Lee Jones authored
      
      
      Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
      struct 'pxa2xx_spi_acpi_match' becomes defined but unused.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/spi/spi-pxa2xx.c:1435:36: warning: ‘pxa2xx_spi_acpi_match’ defined but not used [-Wunused-const-variable=]
       1435 | static const struct acpi_device_id pxa2xx_spi_acpi_match[] = {
       | ^~~~~~~~~~~~~~~~~~~~~
      
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Cc: Daniel Mack <daniel@zonque.org>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Link: https://lore.kernel.org/r/20200717135424.2442271-14-lee.jones@linaro.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      9b2d6119
    • Lee Jones's avatar
      spi: spi-at91-usart: Remove unused OF table 'struct of_device_id' · c894c265
      Lee Jones authored
      
      
      The only way this driver can be probed by MFD via its parent device.
      
      No other reference to 'microchip,at91sam9g45-usart-spi' exists in the kernel.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/spi/spi-at91-usart.c:684:34: warning: ‘at91_usart_spi_dt_ids’ defined but not used [-Wunused-const-variable=]
       684 | static const struct of_device_id at91_usart_spi_dt_ids[] = {
       | ^~~~~~~~~~~~~~~~~~~~~
      
      Suggested-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
      Link: https://lore.kernel.org/r/20200717135424.2442271-13-lee.jones@linaro.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      c894c265