[PATCH v1 2/3] drm/panel: st7701: Add support for SPI for configuration

Krzysztof Kozlowski krzk at kernel.org
Tue Jun 18 09:20:20 UTC 2024


On 18/06/2024 10:15, Hironori KIKUCHI wrote:
> The ST7701 supports not only MIPI DSI, but also SPI as an interface
> for configuration. To support a panel connected via RGB parallel
> interface, add support for SPI using MIPI DBI helpers.
> 
> Signed-off-by: Hironori KIKUCHI <kikuchan98 at gmail.com>


...

> +
> +static int st7701_spi_probe(struct spi_device *spi)
> +{
> +	struct st7701 *st7701;
> +	struct gpio_desc *dc;
> +	int err;
> +
> +	err = st7701_probe(&spi->dev, DRM_MODE_CONNECTOR_DPI);
> +	if (err)
> +		return err;
> +
> +	st7701 = dev_get_drvdata(&spi->dev);
> +	st7701->write_command = st7701_dbi_write;
> +
> +	dc = devm_gpiod_get_optional(&spi->dev, "dc", GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE);

Nope, you cannot use GPIOD_FLAGS_BIT_NONEXCLUSIVE outside of regulators.
I don't see any code for ensuring proper simultaneus access.

Best regards,
Krzysztof



More information about the dri-devel mailing list