Re: [PATCH v9 11/15] spi: dw: Add support for AMD Pensando Elba SoC

From: Andy Shevchenko
Date: Thu Jan 19 2023 - 04:59:11 EST


On Thu, Jan 19, 2023 at 5:52 AM Brad Larson <blarson@xxxxxxx> wrote:
>
> The AMD Pensando Elba SoC includes a DW apb_ssi v4 controller
> with device specific chip-select control. The Elba SoC
> provides four chip-selects where the native DW IP supports
> two chip-selects. The Elba DW_SPI instance has two native
> CS signals that are always overridden.

...

> +struct dw_spi_elba {
> + struct regmap *syscon;
> +};

Why can't struct regmap be used directly?

...

> +static void dw_spi_elba_override_cs(struct dw_spi_elba *dwselba, int cs, int enable)
> +{
> + regmap_update_bits(dwselba->syscon, ELBA_SPICS_REG, ELBA_SPICS_MASK(cs),
> + ELBA_SPICS_SET(cs, enable));

> +

Redundant blank line.

> +}

...

> + dev_err(&pdev->dev, "failed to find %s\n", syscon_name);
> + return -ENODEV;

return dev_err_probe();

...

> + dev_err(&pdev->dev, "syscon regmap lookup failed\n");
> + return PTR_ERR(regmap);

Ditto.

--
With Best Regards,
Andy Shevchenko