[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPVz0n0DF6NUBc8BfAyOS7JCwjT0yrCwYgqPyfivA0o_onQzDg@mail.gmail.com>
Date: Fri, 9 May 2025 09:04:44 +0300
From: Svyatoslav Ryhel <clamor95@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Laurent.pinchart@...asonboard.com, airlied@...il.com,
andrzej.hajda@...el.com, conor+dt@...nel.org, devicetree@...r.kernel.org,
dri-devel@...ts.freedesktop.org, jernej.skrabec@...il.com, jonas@...boo.se,
krzk+dt@...nel.org, linux-kernel@...r.kernel.org,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
neil.armstrong@...aro.org, rfoss@...nel.org, robh@...nel.org, simona@...ll.ch,
tzimmermann@...e.de
Subject: Re: [PATCH v5 2/2] drm: bridge: Add support for Solomon SSD2825
RGB/DSI bridge
вт, 6 трав. 2025 р. о 20:49 Christophe JAILLET
<christophe.jaillet@...adoo.fr> пише:
>
> Le 06/05/2025 à 11:33, Svyatoslav Ryhel a écrit :
> > SSD2825 is a cost-effective MIPI Bridge Chip solution targeting mainly
> > smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI
> > interface to drive display modules of up to 800 x 1366, while supporting
> > AMOLED, a-si LCD or LTPS panel technologies for smartphone applications.
>
> Hi,
>
> ...
>
> > +config DRM_SOLOMON_SSD2825
> > + tristate "SSD2825 RGB/DSI bridge"
> > + depends on SPI_MASTER && OF
> > + select DRM_MIPI_DSI
> > + select DRM_KMS_HELPER
> > + select DRM_PANEL
> > + help
> > + Say Y here if you want support for the Solomon SSD2825 RGB/DSI
> > + SPI bridge driver.
> > +
> > + Say M here if you want to support this hardware as a module.
> > + The module will be named "solomon-ssd2825".
>
> Is it "solomon-ssd2825" or just "ssd2825"?
>
> > +
> > config DRM_THINE_THC63LVD1024
> > tristate "Thine THC63LVD1024 LVDS decoder bridge"
> > depends on OF
>
> ...
>
> > +static int ssd2825_read_raw(struct ssd2825_priv *priv, u8 cmd, u16 *data)
> > +{
> > + struct spi_device *spi = priv->spi;
> > + struct spi_message msg;
> > + struct spi_transfer xfer[2];
> > + u8 tx_buf[2];
> > + u8 rx_buf[2];
> > + int ret;
> > +
> > + memset(&xfer, 0, sizeof(xfer));
> > +
> > + tx_buf[1] = (cmd & 0xFF00) >> 8;
> > + tx_buf[0] = (cmd & 0x00FF);
> > +
> > + xfer[0].tx_buf = tx_buf;
> > + xfer[0].bits_per_word = 9;
> > + xfer[0].len = 2;
> > +
> > + xfer[1].rx_buf = rx_buf;
> > + xfer[1].bits_per_word = 16;
> > + xfer[1].len = 2;
> > +
> > + spi_message_init(&msg);
> > + spi_message_add_tail(&xfer[0], &msg);
> > + spi_message_add_tail(&xfer[1], &msg);
> > +
> > + ret = spi_sync(spi, &msg);
> > + if (ret)
> > + dev_err(&spi->dev, "spi_sync_read failed %d\n", ret);
>
> Maybe, just spi_sync in the message?
>
> > +
> > + *data = rx_buf[1] | (rx_buf[0] << 8);
> > +
> > + return 0;
>
> Is it on purpose that ret is never returned?
> Is it safe to update *data if ret is not 0?
>
> > +}
>
Acknowledged, thank you
> ...
>
> CJ
Powered by blists - more mailing lists