[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <15fbe245-e031-4bf5-9d17-2ee807081e18@ideasonboard.com>
Date: Fri, 24 Jan 2025 15:29:43 +0200
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, Devarsh Thakkar <devarsht@...com>,
Jai Luthra <jai.luthra@...asonboard.com>
Subject: Re: [PATCH 18/19] media: i2c: ds90ub960: Configure serializer using
back-channel
Hi,
On 15/01/2025 16:29, Sakari Ailus wrote:
> Moi,
>
> On Fri, Jan 10, 2025 at 11:14:18AM +0200, Tomi Valkeinen wrote:
>> @@ -2956,6 +3033,36 @@ static int ub960_init_rx_ports_ub9702(struct ub960_data *priv)
>> if (ret)
>> return ret;
>>
>> + for_each_active_rxport(priv) {
>> + if (it.rxport->ser.addr >= 0) {
>> + /*
>> + * Set serializer's I2C address if set in the dts file,
>> + * and freeze it to prevent updates from the FC.
>> + */
>> + ub960_rxport_write(priv, it.nport, UB960_RR_SER_ID,
>> + it.rxport->ser.addr << 1 |
>> + UB960_RR_SER_ID_FREEZE_DEVICE_ID,
>> + &ret);
>> + }
>> +
>> + /* Set serializer I2C alias with auto-ack */
>> + ub960_rxport_write(priv, it.nport, UB960_RR_SER_ALIAS_ID,
>> + it.rxport->ser.alias << 1 |
>> + UB960_RR_SER_ALIAS_ID_AUTO_ACK, &ret);
>> +
>> + if (ret)
>> + return ret;
>> + }
>> +
>> + for_each_active_rxport(priv) {
>> + if (fwnode_device_is_compatible(it.rxport->ser.fwnode,
>> + "ti,ds90ub971-q1")) {
>
> I guess one instance is fine but consider using match data instead.
This is checking the model of the (remote) serializer, not the
deserializer (which this driver deals with).
Unfortunately we need to do some early configuration before the
serializer driver probes, and that configuration depends on the
serializer model.
We could, perhaps, get the serializer models once and store it in the
rxport data for later use.
Tomi
Powered by blists - more mailing lists