<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cmd_i2c.c, branch v2015.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>dm: i2c: Add a command to adjust the offset length</title>
<updated>2015-08-31T13:57:28+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-08-23T00:31:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c10c8e313c836eb193f49c6f782a2e5a6e2f21d0'/>
<id>c10c8e313c836eb193f49c6f782a2e5a6e2f21d0</id>
<content type='text'>
I2C chips can support a register offset, with registers accessible by
sending this offset as the first part of any read or write transaction.
Most I2C chips have a single byte offset, thus the offset length is 1.
This provides access for up 256 registers.

However other offset lengths are supported, including 0.

Add a command to provide access to the offset length from the command
line. This allows the offset length to be read or written.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Christophe Ricard&lt;christophe-h.ricard@st.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I2C chips can support a register offset, with registers accessible by
sending this offset as the first part of any read or write transaction.
Most I2C chips have a single byte offset, thus the offset length is 1.
This provides access for up 256 registers.

However other offset lengths are supported, including 0.

Add a command to provide access to the offset length from the command
line. This allows the offset length to be read or written.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Christophe Ricard&lt;christophe-h.ricard@st.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: i2c: Implement 'i2c bus' command for driver model</title>
<updated>2015-05-15T00:49:33+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-05-04T17:30:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=59aa9df383b85a7701cefbe997d242d79b452e3b'/>
<id>59aa9df383b85a7701cefbe997d242d79b452e3b</id>
<content type='text'>
This command was missed in the conversion. Add it back for driver model.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This command was missed in the conversion. Add it back for driver model.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_i2c: Provide option for bulk 'i2c write' in one transaction</title>
<updated>2015-02-19T08:03:40+00:00</updated>
<author>
<name>Lubomir Popov</name>
<email>lpopov@mm-sol.com</email>
</author>
<published>2015-01-30T17:56:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ed16f14689b98c1ec98c9f30b92b8edea9d2d60c'/>
<id>ed16f14689b98c1ec98c9f30b92b8edea9d2d60c</id>
<content type='text'>
I2C chips do exist that require a write of some multi-byte data to occur in
a single bus transaction (aka atomic transfer), otherwise either the write
does not come into effect at all, or normal operation of internal circuitry
cannot be guaranteed. The current implementation of the 'i2c write' command
(transfer of multiple bytes from a memory buffer) in fact performs a separate
transaction for each byte to be written and thus cannot support such types of
I2C slave devices.

This patch provides an alternative by allowing 'i2c write' to execute the
write transfer of the given number of bytes in a single bus transaction if
the '-s' option is specified as a final command argument. Else the current
re-addressing method is used.

Signed-off-by: Lubomir Popov &lt;l-popov@ti.com&gt;

hs: adapt to CONFIG_DM_I2C
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I2C chips do exist that require a write of some multi-byte data to occur in
a single bus transaction (aka atomic transfer), otherwise either the write
does not come into effect at all, or normal operation of internal circuitry
cannot be guaranteed. The current implementation of the 'i2c write' command
(transfer of multiple bytes from a memory buffer) in fact performs a separate
transaction for each byte to be written and thus cannot support such types of
I2C slave devices.

This patch provides an alternative by allowing 'i2c write' to execute the
write transfer of the given number of bytes in a single bus transaction if
the '-s' option is specified as a final command argument. Else the current
re-addressing method is used.

Signed-off-by: Lubomir Popov &lt;l-popov@ti.com&gt;

hs: adapt to CONFIG_DM_I2C
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_i2c: quit I2C commands immediately on error</title>
<updated>2015-02-19T07:44:21+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2015-02-05T04:50:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9e533cb0462a7d28ec14a816ea627d38ce48dbf3'/>
<id>9e533cb0462a7d28ec14a816ea627d38ce48dbf3</id>
<content type='text'>
If the i2c driver returns an error status, error out immediately.
Continuing the loop just results in printing error messages
again and again.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the i2c driver returns an error status, error out immediately.
Continuing the loop just results in printing error messages
again and again.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: i2c: Add a dm_ prefix to driver model bus speed functions</title>
<updated>2015-02-12T17:35:33+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-02-06T04:41:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ca88b9b93916f66c6737527aa955d2c1b4758080'/>
<id>ca88b9b93916f66c6737527aa955d2c1b4758080</id>
<content type='text'>
As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model
versions of these functions to avoid conflicts.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model
versions of these functions to avoid conflicts.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: i2c: Provide an offset length parameter where needed</title>
<updated>2015-01-30T00:09:53+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:26:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=25ab4b0303f2df5e6b94ed92e37875a7c98f4de3'/>
<id>25ab4b0303f2df5e6b94ed92e37875a7c98f4de3</id>
<content type='text'>
Rather than assuming that the chip offset length is 1, allow it to be
provided. This allows chips that don't use the default offset length to
be used (at present they are only supported by the command line 'i2c'
command which sets the offset length explicitly).

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than assuming that the chip offset length is 1, allow it to be
provided. This allows chips that don't use the default offset length to
be used (at present they are only supported by the command line 'i2c'
command which sets the offset length explicitly).

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: i2c: Rename driver model I2C functions to permit compatibility</title>
<updated>2015-01-30T00:09:53+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-13T01:02:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f9a4c2da72d04e13b05deecb800f232d2948eb85'/>
<id>f9a4c2da72d04e13b05deecb800f232d2948eb85</id>
<content type='text'>
Add a dm_ prefix to driver model I2C functions so that we can keep the old
ones around.

This is a little unfortunate, but on reflection it is too difficult to
change the API. We can undo this rename when most boards and drivers are
converted to use driver model for I2C.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a dm_ prefix to driver model I2C functions so that we can keep the old
ones around.

This is a little unfortunate, but on reflection it is too difficult to
change the API. We can undo this rename when most boards and drivers are
converted to use driver model for I2C.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_i2c: change variable type for 10bit addressing support</title>
<updated>2015-01-30T00:09:49+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-12-19T18:34:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5468461d1ea05ff99cf206939293480cc86fd2ec'/>
<id>5468461d1ea05ff99cf206939293480cc86fd2ec</id>
<content type='text'>
To store 10bit chip address, the variable type should not be uchar,
but uint.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher&lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To store 10bit chip address, the variable type should not be uchar,
but uint.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher&lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: i2c: Implement driver model support in the i2c command</title>
<updated>2014-12-11T20:18:42+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2014-12-10T15:55:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=63656b762e50b2f11e228d94fdbb025a84900c71'/>
<id>63656b762e50b2f11e228d94fdbb025a84900c71</id>
<content type='text'>
The concept of a 'current bus' is now implemented in the command line
rather than in the uclass. Also the address length does not need to
be specified with each command - really we should consider dropping
this from most commands but it works OK for now.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The concept of a 'current bus' is now implemented in the command line
rather than in the uclass. Also the address length does not need to
be specified with each command - really we should consider dropping
this from most commands but it works OK for now.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: i2c: Move error reporting into a common function</title>
<updated>2014-11-21T07:14:54+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2014-11-11T17:46:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c1a6f371ae65f1a3709e872e08bed51321e292fc'/>
<id>c1a6f371ae65f1a3709e872e08bed51321e292fc</id>
<content type='text'>
Factor out the common code to make it easier to adjust it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@ti.com&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Factor out the common code to make it easier to adjust it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@ti.com&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
