RE: [PATCH v1 1/1] i2c: mlxbf: Use readl_poll_timeout_atomic() for polling

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

 



LGTM besides the small comment below:

> -	/* Check whether the HW is idle */
> -	if (WARN_ON(!mlxbf_i2c_smbus_master_wait_for_idle(priv))) {
> +	/*
> +	 * SW must make sure that the SMBus Master GW is idle before
> starting
> +	 * a transaction. Accordingly, this call polls the Master FSM stop bit;
> +	 * it returns 0 when the bit is asserted, -ETIMEDOUT if not.

It returns 0 when the bit is cleared, -ETIMEDOUT if not.

> +	 */
> +	ret = readl_poll_timeout_atomic(priv->mst->io + priv->chip-
> >smbus_master_fsm_off,
> +					bits, !(bits &
> MLXBF_I2C_SMBUS_MASTER_FSM_STOP_MASK),
> +					MLXBF_I2C_POLL_FREQ_IN_USEC,
> MLXBF_I2C_SMBUS_TIMEOUT);
> +	if (WARN_ON(ret)) {
>  		ret = -EBUSY;
>  		goto out_unlock;





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux