public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Aaron Sierra <asierra@xes-inc.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	linux-i2c@vger.kernel.org,
	Christian Gmeiner <christian.gmeiner@gmail.com>,
	Nate Case <ncase@xes-inc.com>
Subject: Re: [PATCH v5] at24: Support SMBus read/write of 16-bit devices
Date: Thu, 12 Nov 2015 08:53:10 +0100	[thread overview]
Message-ID: <20151112085310.5b7440ad@endymion.delvare> (raw)
In-Reply-To: <1031257086.44697.1447178019547.JavaMail.zimbra@xes-inc.com>

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

      reply	other threads:[~2015-11-12  7:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1708959504.44242.1447177870642.JavaMail.zimbra@xes-inc.com>
2015-11-10 17:53 ` [PATCH v5] at24: Support SMBus read/write of 16-bit devices Aaron Sierra
2015-11-12  7:53   ` Jean Delvare [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151112085310.5b7440ad@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=asierra@xes-inc.com \
    --cc=christian.gmeiner@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=ncase@xes-inc.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox