<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/i2c.h, branch v2.6.32.9</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>i2c: Add an interface to lock/unlock an I2C bus segment</title>
<updated>2009-11-07T12:10:46+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-11-07T12:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=afa08974fe80c198b8650f73ed8ab59135ca10d0'/>
<id>afa08974fe80c198b8650f73ed8ab59135ca10d0</id>
<content type='text'>
Some drivers need to be able to prevent access to an I2C bus segment
for a specific period of time. Add an interface for them to do so
without twiddling with i2c-core internals.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some drivers need to be able to prevent access to an I2C bus segment
for a specific period of time. Add an interface for them to do so
without twiddling with i2c-core internals.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Drop unused i2c_driver.id field</title>
<updated>2009-09-18T20:45:43+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-09-18T20:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a891a3111fe701517bb31c2204304724c7299c8'/>
<id>6a891a3111fe701517bb31c2204304724c7299c8</id>
<content type='text'>
Nobody is using i2c_driver.id any longer, so we can drop that field.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nobody is using i2c_driver.id any longer, so we can drop that field.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: New macro to initialize i2c address lists on the fly</title>
<updated>2009-06-19T14:58:21+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2009-06-19T14:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c70366732f67dbdb32f7fe9c6aa59299b76feca6'/>
<id>c70366732f67dbdb32f7fe9c6aa59299b76feca6</id>
<content type='text'>
For video4linux we sometimes need to probe for a single i2c address.
Normally you would do it like this:

static const unsigned short addrs[] = {
	addr, I2C_CLIENT_END
};

client = i2c_new_probed_device(adapter, &amp;info, addrs);

This is a bit awkward and I came up with this macro:

#define V4L2_I2C_ADDRS(addr, addrs...) \
	((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END })

This can construct a list of one or more i2c addresses on the fly. But
this is something that really belongs in i2c.h, renamed to I2C_ADDRS.

With this macro we can just do:

client = i2c_new_probed_device(adapter, &amp;info, I2C_ADDRS(addr));

Note that this can also be used to initialize an array:

static const unsigned short addrs[] = I2C_ADDRS(0x2a, 0x2c);

Whether you want to is another matter, but it works. This functionality is 
also available in the oldest supported gcc (3.2).

Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For video4linux we sometimes need to probe for a single i2c address.
Normally you would do it like this:

static const unsigned short addrs[] = {
	addr, I2C_CLIENT_END
};

client = i2c_new_probed_device(adapter, &amp;info, addrs);

This is a bit awkward and I came up with this macro:

#define V4L2_I2C_ADDRS(addr, addrs...) \
	((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END })

This can construct a list of one or more i2c addresses on the fly. But
this is something that really belongs in i2c.h, renamed to I2C_ADDRS.

With this macro we can just do:

client = i2c_new_probed_device(adapter, &amp;info, I2C_ADDRS(addr));

Note that this can also be used to initialize an array:

static const unsigned short addrs[] = I2C_ADDRS(0x2a, 0x2c);

Whether you want to is another matter, but it works. This functionality is 
also available in the oldest supported gcc (3.2).

Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Don't advertise i2c functions when not available</title>
<updated>2009-06-19T14:58:20+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-06-19T14:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=23af8400571ac4431fac0caefeac18f8aef490df'/>
<id>23af8400571ac4431fac0caefeac18f8aef490df</id>
<content type='text'>
Surround i2c function declarations with ifdefs, so that they aren't
advertised when i2c-core isn't actually built. That way, drivers using
these functions unconditionally will result in an immediate build
failure, rather than a late linking failure which is harder to figure
out.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Surround i2c function declarations with ifdefs, so that they aren't
advertised when i2c-core isn't actually built. That way, drivers using
these functions unconditionally will result in an immediate build
failure, rather than a late linking failure which is harder to figure
out.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Add a sysfs interface to instantiate devices</title>
<updated>2009-06-19T14:58:20+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-06-19T14:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=99cd8e25875a109455b709b5a41d4891b8d8e58e'/>
<id>99cd8e25875a109455b709b5a41d4891b8d8e58e</id>
<content type='text'>
Add a sysfs interface to instantiate and delete I2C devices. This is
primarily a replacement of the force_* module parameters implemented
by some i2c drivers. These module parameters were implemented
internally by the I2C_CLIENT_INSMOD* macros, which don't scale well.

This can also be used when developing a driver on a self-soldered
board which doesn't yet have proper I2C device declaration at the
platform level, and presumably for various debugging situations.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a sysfs interface to instantiate and delete I2C devices. This is
primarily a replacement of the force_* module parameters implemented
by some i2c drivers. These module parameters were implemented
internally by the I2C_CLIENT_INSMOD* macros, which don't scale well.

This can also be used when developing a driver on a self-soldered
board which doesn't yet have proper I2C device declaration at the
platform level, and presumably for various debugging situations.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Kill the redundant client list</title>
<updated>2009-06-19T14:58:19+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-06-19T14:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e549c2b54dd90a056d6824b885d438b7437874f0'/>
<id>e549c2b54dd90a056d6824b885d438b7437874f0</id>
<content type='text'>
We used to maintain our own per-adapter list of i2c clients, but this
is redundant with what the driver core does, and no longer needed.
Just drop the redundant list.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We used to maintain our own per-adapter list of i2c clients, but this
is redundant with what the driver core does, and no longer needed.
Just drop the redundant list.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Kill is_newstyle_driver</title>
<updated>2009-06-19T14:58:19+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-06-19T14:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1e40ac12dab22d98d0178e87364cf4e36862809c'/>
<id>1e40ac12dab22d98d0178e87364cf4e36862809c</id>
<content type='text'>
Legacy i2c drivers are gone, all drivers are new-style now, so there
is no point to check.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Legacy i2c drivers are gone, all drivers are new-style now, so there
is no point to check.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Drop i2c_probe function</title>
<updated>2009-06-19T14:58:18+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-06-19T14:58:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=36789b5ea52bba961122b45f4383f553ec3b5a6c'/>
<id>36789b5ea52bba961122b45f4383f553ec3b5a6c</id>
<content type='text'>
The legacy i2c_probe() function has no users left, get rid of it.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The legacy i2c_probe() function has no users left, get rid of it.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Get rid of the legacy binding model</title>
<updated>2009-06-19T14:58:18+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-06-19T14:58:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=729d6dd571464954f625e6b80950d9e4e3bd94f7'/>
<id>729d6dd571464954f625e6b80950d9e4e3bd94f7</id>
<content type='text'>
We converted all the legacy i2c drivers so we can finally get rid of
the legacy binding model. Hooray!

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We converted all the legacy i2c drivers so we can finally get rid of
the legacy binding model. Hooray!

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Kill client_register and client_unregister methods</title>
<updated>2009-06-19T14:58:17+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-06-19T14:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=352da9820e5506e3b8496e6052a2ad9c488efae8'/>
<id>352da9820e5506e3b8496e6052a2ad9c488efae8</id>
<content type='text'>
These methods were useful in the legacy binding model but no longer in
the new (standard) binding model. There are no users left so we can
drop them.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These methods were useful in the legacy binding model but no longer in
the new (standard) binding model. There are no users left so we can
drop them.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
