linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Curt Brune <curt-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: at24: writing with SMBUS and no I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
Date: Wed, 5 Mar 2014 21:15:53 +0100	[thread overview]
Message-ID: <20140305201553.GA2571@katana> (raw)
In-Reply-To: <20140305183305.GS27140-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]


> The notion of "slow" seems a bit arbitrary to me.  Is there some other
> technical reason or gotcha hiding here that you know of?

$ git show 7aeb96642f70139a194d685b132605836f6f8dbb

commit 7aeb96642f70139a194d685b132605836f6f8dbb
Author: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Date:   Fri May 21 18:40:57 2010 +0200

    at24: Fall back to byte or word reads if needed
    
    Increase the portability of the at24 driver by letting it read from
    EEPROM chips connected to cheap SMBus controllers that support neither
    raw I2C messages nor even I2C block reads. All SMBus controllers
    should support either word reads or byte reads, so read support
    becomes universal, much like with the legacy "eeprom" driver.
    
    Obviously, this only works with EEPROM chips up to AT24C16, that use
    8-bit offset addressing. 16-bit offset addressing is almost impossible
    to support on SMBus controllers.
    
    I did not add universal support for writes, as I had no immediate need
    for this, but it could be added later if needed (with the same
    performance issue as byte and word reads have, of course.)
    
    Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
    Reviewed-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
    Cc: Konstantin Lazarev <klazarev-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org>

> Would a nicely written patch that adds write support for this case be
> acceptable?  I have not written it yet, but would like to.

Yes, it would.

All the best,

   Wolfram


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      parent reply	other threads:[~2014-03-05 20:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 18:33 at24: writing with SMBUS and no I2C_FUNC_SMBUS_WRITE_I2C_BLOCK Curt Brune
     [not found] ` <20140305183305.GS27140-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-03-05 20:15   ` Wolfram Sang [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=20140305201553.GA2571@katana \
    --to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
    --cc=curt-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).