Re: [PATCH v6 08/11] input: raspberrypi-ts: Release firmware handle when not needed

2020-12-11 Thread Florian Fainelli
On 12/11/20 8:47 AM, Nicolas Saenz Julienne wrote: > There is no use for the firmware interface after getting the touch > buffer address, so release it. > > Signed-off-by: Nicolas Saenz Julienne > Acked-by: Dmitry Torokhov Reviewed-by: Florian Fainelli -- Florian smime.p7s Description:

[PATCH] Staging: rtl8723bs/core: fix braces coding style issues

2020-12-11 Thread Brother Matthew De Angelis
Fix all the braces coding style issues found by checkpatch.pl in rtw_security.c. Signed-off-by: Brother Matthew De Angelis --- drivers/staging/rtl8723bs/core/rtw_security.c | 24 +++ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git

[PATCH v6 01/11] firmware: raspberrypi: Keep count of all consumers

2020-12-11 Thread Nicolas Saenz Julienne
When unbinding the firmware device we need to make sure it has no consumers left. Otherwise we'd leave them with a firmware handle pointing at freed memory. Keep a reference count of all consumers and introduce rpi_firmware_put() which will permit automatically decrease the reference count upon

[PATCH v6 00/11] Raspberry Pi PoE HAT fan support

2020-12-11 Thread Nicolas Saenz Julienne
The aim of this series is to add support to the fan found on RPi's PoE HAT. Some commentary on the design can be found below. But the imporant part to the people CC'd here not involved with PWM is that, in order to achieve this properly, we also have to fix the firmware interface the driver uses

[PATCH v6 04/11] gpio: raspberrypi-exp: Release firmware handle on unbind

2020-12-11 Thread Nicolas Saenz Julienne
Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Acked-by: Bartosz Golaszewski --- drivers/gpio/gpio-raspberrypi-exp.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v6 05/11] reset: raspberrypi: Release firmware handle on unbind

2020-12-11 Thread Nicolas Saenz Julienne
Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- drivers/reset/reset-raspberrypi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v6 02/11] firmware: raspberrypi: Introduce devm_rpi_firmware_get()

2020-12-11 Thread Nicolas Saenz Julienne
It'll simplify the firmware handling for most consumers. Suggested-by: Bartosz Golaszewski Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- Changes since v4: - Rearrange function calls for clarity, same functionality Changes since v2: - Create devm_rpi_firmware_get()

[PATCH v3 00/15] Allwinner MIPI CSI-2 support for A31/V3s/A83T

2020-12-11 Thread Paul Kocialkowski
This series introduces support for MIPI CSI-2, with the A31 controller that is found on most SoCs (A31, V3s and probably V5) as well as the A83T-specific controller. While the former uses the same MIPI D-PHY that is already supported for DSI, the latter embeds its own D-PHY. In order to

[PATCH v3 11/15] MAINTAINERS: Add entry for the Allwinner A31 MIPI CSI-2 bridge

2020-12-11 Thread Paul Kocialkowski
Add myself as maintainer of the A31 MIPI CSI-2 bridge media driver. Signed-off-by: Paul Kocialkowski --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0644128640fb..a1352171778b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -709,6

[PATCH v3 14/15] ARM: dts: sun8i: a83t: Add MIPI CSI-2 controller node

2020-12-11 Thread Paul Kocialkowski
MIPI CSI-2 is supported on the A83T with a dedicated controller that covers both the protocol and D-PHY. It can be connected to the CSI interface as a V4L2 subdev through the fwnode graph. This is not done by default since connecting the bridge without a subdev attached to it will cause a failure

[PATCH v3 13/15] media: sunxi: Add support for the A83T MIPI CSI-2 controller

2020-12-11 Thread Paul Kocialkowski
The A83T supports MIPI CSI-2 with a composite controller, covering both the protocol logic and the D-PHY implementation. This controller seems to be found on the A83T only and probably was abandoned since. This implementation splits the protocol and D-PHY registers and uses the PHY framework

[PATCH v3 09/15] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-12-11 Thread Paul Kocialkowski
The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 bridge found on Allwinner SoCs such as the A31 and V3/V3s. It is a standalone block, connected to the CSI controller on one side and to the MIPI D-PHY block on the other. It has a dedicated address space, interrupt line and clock. It is

[PATCH v3 15/15] MAINTAINERS: Add entry for the Allwinner A83T MIPI CSI-2 bridge

2020-12-11 Thread Paul Kocialkowski
Add myself as maintainer of the A83T MIPI CSI-2 bridge media driver. Signed-off-by: Paul Kocialkowski --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a1352171778b..3b48612657b6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -717,6

[PATCH v3 12/15] dt-bindings: media: Add A83T MIPI CSI-2 bindings documentation

2020-12-11 Thread Paul Kocialkowski
This introduces YAML bindings documentation for the A83T MIPI CSI-2 controller. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring --- .../media/allwinner,sun8i-a83t-mipi-csi2.yaml | 147 ++ 1 file changed, 147 insertions(+) create mode 100644

[PATCH v3 10/15] ARM: dts: sun8i: v3s: Add nodes for MIPI CSI-2 support

2020-12-11 Thread Paul Kocialkowski
MIPI CSI-2 is supported on the V3s with an A31-based MIPI CSI-2 bridge controller. The controller uses a separate D-PHY, which is the same that is otherwise used for MIPI DSI, but used in Rx mode. On the V3s, the CSI0 controller is dedicated to MIPI CSI-2 as it does not have access to any

[PATCH v3 08/15] dt-bindings: media: Add A31 MIPI CSI-2 bindings documentation

2020-12-11 Thread Paul Kocialkowski
This introduces YAML bindings documentation for the A31 MIPI CSI-2 controller. Signed-off-by: Paul Kocialkowski --- .../media/allwinner,sun6i-a31-mipi-csi2.yaml | 149 ++ 1 file changed, 149 insertions(+) create mode 100644

[PATCH v3 04/15] media: sun6i-csi: Use common V4L2 format info for storage bpp

2020-12-11 Thread Paul Kocialkowski
V4L2 has a common helper which can be used for calculating the number of stored bits per pixels of a given (stored) image format. Use the helper-returned structure instead of our own switch/case list. Note that a few formats are not in that list so we keep them as special cases. The custom

[PATCH v6 11/11] pwm: Add Raspberry Pi Firmware based PWM bus

2020-12-11 Thread Nicolas Saenz Julienne
Adds support to control the PWM bus available in official Raspberry Pi PoE HAT. Only RPi's co-processor has access to it, so commands have to be sent through RPi's firmware mailbox interface. Signed-off-by: Nicolas Saenz Julienne --- Changes since v3: - Rename compatible string to be more

[PATCH v6 06/11] soc: bcm: raspberrypi-power: Release firmware handle on unbind

2020-12-11 Thread Nicolas Saenz Julienne
Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- drivers/soc/bcm/raspberrypi-power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v6 08/11] input: raspberrypi-ts: Release firmware handle when not needed

2020-12-11 Thread Nicolas Saenz Julienne
There is no use for the firmware interface after getting the touch buffer address, so release it. Signed-off-by: Nicolas Saenz Julienne Acked-by: Dmitry Torokhov --- Changes since v5: - Correct commit message Changes since v3: - Release firmware handle in probe function Changes since v2:

[PATCH v6 03/11] clk: bcm: rpi: Release firmware handle on unbind

2020-12-11 Thread Nicolas Saenz Julienne
Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- drivers/clk/bcm/clk-raspberrypi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v6 10/11] DO NOT MERGE: ARM: dts: Add RPi's official PoE hat support

2020-12-11 Thread Nicolas Saenz Julienne
This is an example on how to enable the fan on top of RPi's official PoE hat. Signed-off-by: Nicolas Saenz Julienne --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 54 +++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts

[PATCH v6 09/11] dt-bindings: pwm: Add binding for RPi firmware PWM bus

2020-12-11 Thread Nicolas Saenz Julienne
The PWM bus controlling the fan in RPi's official PoE hat can only be controlled by the board's co-processor. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring --- Changes since v4: - Rename compatible string to be more explicit with the bus' limitations Changes since v3: - Fix

[PATCH v6 07/11] staging: vchiq: Release firmware handle on unbind

2020-12-11 Thread Nicolas Saenz Julienne
Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 06/15] dt-bindings: media: sun6i-a31-csi: Add MIPI CSI-2 input port

2020-12-11 Thread Paul Kocialkowski
The A31 CSI controller supports two distinct input interfaces: parallel and an external MIPI CSI-2 bridge. The parallel interface is often connected to a set of hardware pins while the MIPI CSI-2 bridge is an internal FIFO-ish link. As a result, these two inputs are distinguished as two different

[PATCH v3 07/15] media: sun6i-csi: Add support for MIPI CSI-2 bridge input

2020-12-11 Thread Paul Kocialkowski
The A31 CSI controller supports a MIPI CSI-2 bridge input, which has its own dedicated port in the fwnode graph. Support for this input is added with this change: - two pads are defined for the media entity instead of one and only one needs to be connected at a time; - the pads currently match

[PATCH v3 02/15] phy: Distinguish between Rx and Tx for MIPI D-PHY with submodes

2020-12-11 Thread Paul Kocialkowski
As some D-PHY controllers support both Rx and Tx mode, we need a way for users to explicitly request one or the other. For instance, Rx mode can be used along with MIPI CSI-2 while Tx mode can be used with MIPI DSI. Introduce new MIPI D-PHY PHY submodes to use with PHY_MODE_MIPI_DPHY. The default

[PATCH v3 01/15] docs: phy: Add a part about PHY mode and submode

2020-12-11 Thread Paul Kocialkowski
Besides giving pointers to the relevant functions for PHY mode and submode configuration, this clarifies the need to set them before powering on the PHY. Signed-off-by: Paul Kocialkowski Reviewed-by: Maxime Ripard --- Documentation/driver-api/phy/phy.rst | 18 ++ 1 file

[PATCH v3 03/15] phy: allwinner: phy-sun6i-mipi-dphy: Support D-PHY Rx mode for MIPI CSI-2

2020-12-11 Thread Paul Kocialkowski
The Allwinner A31 D-PHY supports both Rx and Tx modes. While the latter is already supported and used for MIPI DSI this adds support for the former, to be used with MIPI CSI-2. This implementation is inspired by Allwinner's V3s Linux SDK implementation, which was used as a documentation base.

[PATCH v3 05/15] media: sun6i-csi: Only configure the interface data width for parallel

2020-12-11 Thread Paul Kocialkowski
Bits related to the interface data width are only applicable to the parallel interface and are irrelevant when the CSI controller is taking input from the MIPI CSI-2 controller. In prevision of adding support for this case, set these bits conditionally so there is no ambiguity. The conditional