Re: [PATCH v5] at24: Support SMBus read/write of 16-bit devices

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

 



Hi Aaron,

On Tue, 10 Nov 2015 11:53:39 -0600 (CST), Aaron Sierra wrote:
> +		if ((chip.flags & AT24_FLAG_ADDR16) &&
> +		    i2c_check_functionality(client->adapter,
> +				I2C_FUNC_SMBUS_READ_BYTE |
> +				I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) {
> +			/*
> +			 * We need SMBUS_WRITE_BYTE_DATA and
> +			 * SMBUS_READ_BYTE_DATA to implement byte reads for

It's a minor thing really but I'm afraid you forgot to update this
comment (SMBUS_READ_BYTE not SMBUS_READ_BYTE_DATA.)

> +			 * 16-bit address devices. This will be slow, but
> +			 * better than nothing (e.g. read @ 3.6 KiB/s). It is
> +			 * also unsafe in a multi-master topology.
> +			 */
> +			use_smbus = I2C_SMBUS_BYTE_DATA;
> +		} else if (i2c_check_functionality(client->adapter,
>  				I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {
>  			use_smbus = I2C_SMBUS_I2C_BLOCK_DATA;
>  		} else if (i2c_check_functionality(client->adapter,

Rest looks alright.

-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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