public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jordan Crouse" <jordan.crouse@amd.com>
To: "Jean Delvare" <khali@linux-fr.org>
Cc: "Alexander Atanasov" <alex@ssi.bg>, linux-kernel@vger.kernel.org
Subject: Re: I2C block read
Date: Wed, 7 Jun 2006 13:53:21 -0600	[thread overview]
Message-ID: <20060607195321.GK5250@cosmic.amd.com> (raw)
In-Reply-To: <20060607205025.b2529800.khali@linux-fr.org>

On 07/06/06 20:50 +0200, Jean Delvare wrote:
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> ---
>  drivers/i2c/busses/scx200_acb.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> --- linux-2.6.17-rc6.orig/drivers/i2c/busses/scx200_acb.c	2006-06-07 18:13:53.000000000 +0200
> +++ linux-2.6.17-rc6/drivers/i2c/busses/scx200_acb.c	2006-06-07 20:29:27.000000000 +0200
> @@ -308,6 +308,12 @@
>  		break;
>  
>  	case I2C_SMBUS_BLOCK_DATA:
> +		/* Sanity check */
> +		if (rw == I2C_SMBUS_READ) {
> +			dev_warn(&adapter->dev, "SMBus block read is not "
> +				 "supported!\n");
> +			return -EINVAL;
> +		}
>  		len = data->block[0];
>  		buffer = &data->block[1];
>  		break;
> @@ -372,7 +378,7 @@
>  {
>  	return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
>  	       I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
> -	       I2C_FUNC_SMBUS_BLOCK_DATA;
> +	       I2C_FUNC_SMBUS_WRITE_BLOCK_DATA;
>  }
>  
>  /* For now, we only handle combined mode (smbus) */
> 

ACKed (if my opinion matters).  It will take some more thinking to handle
block reads, and they're really not very interesting anyway.  At the very
least, this will keep implementations from freaking out, and thats a 
Good Thing (TM).

Jordan

--
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>


  reply	other threads:[~2006-06-07 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-07 17:33 [PATCH] I2C block read Alexander Atanasov
2006-06-07 17:49 ` Jean Delvare
2006-06-07 18:06   ` Alexander Atanasov
2006-06-07 18:50     ` Jean Delvare
2006-06-07 19:53       ` Jordan Crouse [this message]
2006-06-08 13:29       ` Alexander Atanasov
2006-06-11 13:30         ` Jean Delvare
2006-06-12 14:16           ` Alexander Atanasov

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=20060607195321.GK5250@cosmic.amd.com \
    --to=jordan.crouse@amd.com \
    --cc=alex@ssi.bg \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    /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