tech-kern archive

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

Adding SMBus block transfers to iic(4)



There are apparently some devices out there that really need to have i2c block-mode transfers, and it appears that none of our current drivers (at least, none of the "mainstream" pci drivers) supports this.

At first glance, it might appear that we could simply check the transfer
requested byte-count, and automatically operate in block mode if the count is greater than 2; the implication is that we could fall back to byte or word transfers for smaller byte counts. But it looks like at least one device out there [1] doesn't support this.

So I propose adding a new flag bit that can be passed to iic_exec() to request block-transfer protocols. In src/sys/dev/i2c/i2c_io.h

        #define I2C_F_BLOCK     0x20

Comments?  Suggestions?  Alternatives?



[1] http://eeepc-linux.googlecode.com/files/9LPR426A.pdf

-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index