lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6CMKqFkx59ZCy8i@kekkonen.localdomain>
Date: Mon, 3 Feb 2025 09:28:10 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.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

On Fri, Jan 24, 2025 at 03:29:43PM +0200, Tomi Valkeinen wrote:
> 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.

Ack.

-- 
Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ