mbox series

[v2,0/2] Add optional reset control for Cadence SPI

Message ID 20240502104800.3030486-1-jisheng.teoh@starfivetech.com
Headers show
Series Add optional reset control for Cadence SPI | expand

Message

Ji Sheng Teoh May 2, 2024, 10:47 a.m. UTC
The first patch adds optional reset control to support assertion and
deassertion of reset signal to properly bring the SPI device into an
operating condition.
The second patch documents the optional reset control into dt-bindings.

Changes since v1:
 - Dropped resets description and added reset-names property in dt-bindings.
 - Specified "spi" as reset control name instead of using NULL in
   devm_reset_control_get_optional_exclusive().
 - Included reset.h in spi-cadence.c missing in v1.

Ji Sheng Teoh (2):
  spi: spi-cadence: Add optional reset control support
  dt-bindings: spi: spi-cadence: Add optional reset control

 .../devicetree/bindings/spi/spi-cadence.yaml        |  7 +++++++
 drivers/spi/spi-cadence.c                           | 13 +++++++++++++
 2 files changed, 20 insertions(+)

Comments

Krzysztof Kozlowski May 2, 2024, 12:21 p.m. UTC | #1
On 02/05/2024 12:48, Ji Sheng Teoh wrote:
> Document the optional reset control to SPI.
> 
> Signed-off-by: Eng Lee Teh <englee.teh@starfivetech.com>
> Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
> Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>

Who is the author here? What are these three SoBs expressing? Rob asked
for this last time.

Best regards,
Krzysztof
Ji Sheng Teoh May 3, 2024, 1:20 a.m. UTC | #2
> On 02/05/2024 12:47, Ji Sheng Teoh wrote:
> >
> >  /* Macros for the SPI controller read/write */ @@ -588,6 +591,16 @@
> > static int cdns_spi_probe(struct platform_device *pdev)
> >  		goto remove_ctlr;
> >  	}
> >
> > +	xspi->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, "spi");
> > +	if (IS_ERR(xspi->rstc)) {
> > +		ret = PTR_ERR(xspi->rstc);
> > +		dev_err(&pdev->dev, "Cannot get SPI reset.\n");
> 
> Please switch to:
> ret = dev_err_probe()

Ok, will switch to that. Thanks.