Re: [PATCH 18/19] media: i2c: ds90ub960: Configure serializer using back-channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> +			ret = ub960_rxport_bc_ser_config(it.rxport);
> +			if (ret)
> +				return ret;
> +		}
> +	}
> +
>  	if (ub960_enable_sscg) {
>  		ret = ub960_enable_sscg_ub9702(priv);
>  		if (ret)

-- 
Terveisin,

Sakari Ailus




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux