<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/of/of_i2c.c, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>i2c: move OF helpers into the core</title>
<updated>2013-08-23T08:22:20+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2013-07-11T11:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=687b81d083c082bc1e853032e3a2a54f8c251d27'/>
<id>687b81d083c082bc1e853032e3a2a54f8c251d27</id>
<content type='text'>
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
that it is much cleaner to have this in the core. This also removes a
circular dependency between the helpers and the core, and so we can
finally register child nodes in the core instead of doing this manually
in each driver. So, fix the drivers and documentation, too.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
that it is much cleaner to have this in the core. This also removes a
circular dependency between the helpers and the core, and so we can
finally register child nodes in the core instead of doing this manually
in each driver. So, fix the drivers and documentation, too.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of_i2c: Honour "status=disabled" property of device</title>
<updated>2012-11-29T17:28:08+00:00</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@sysgo.com</email>
</author>
<published>2012-11-28T14:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4447ca1280c39265c29475fb6940daa5b867466d'/>
<id>4447ca1280c39265c29475fb6940daa5b867466d</id>
<content type='text'>
Currently of_i2c_register_devices() function registers all i2c devices,
independently from their status property in device tree. According to
"ePAPR 1.1" spec, device should only be registered if there is no
"status" property, or it has "ok" (or "okay") value (see
of_device_is_available()). In case of "platform devices",
of_platform_device_create_pdata() checks for "status" and ensures
that disabled devices are not populated. But such check for i2c buses
was missing until now. Fix it.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@sysgo.com&gt;
Acked-by: Rob Herring &lt;robherring2@gmail.com&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Reviewed-by: Barry Song &lt;Baohua.Song@csr.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently of_i2c_register_devices() function registers all i2c devices,
independently from their status property in device tree. According to
"ePAPR 1.1" spec, device should only be registered if there is no
"status" property, or it has "ok" (or "okay") value (see
of_device_is_available()). In case of "platform devices",
of_platform_device_create_pdata() checks for "status" and ensures
that disabled devices are not populated. But such check for i2c buses
was missing until now. Fix it.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@sysgo.com&gt;
Acked-by: Rob Herring &lt;robherring2@gmail.com&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Reviewed-by: Barry Song &lt;Baohua.Song@csr.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: i2c: add support for wakeup-source property</title>
<updated>2012-09-07T20:30:14+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2012-07-21T18:47:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ee67016fcc58998c44a9c99b0721568b3d2edc6e'/>
<id>ee67016fcc58998c44a9c99b0721568b3d2edc6e</id>
<content type='text'>
Add support for specifying a generic "wakeup-source" property on i2c
clients, which will set the I2C_CLIENT_WAKE flag, thus configuring the
device to wake the system from suspend (via IRQ).

This obviously doesn't make sense on devices lacking IRQ, but since we
still allow that in the i2c_board_info case, I don't see a reason to
restrict it here.

Note: Since the generic i2c bindings aren't documented in the kernel,
I didn't find a good place to add documentation for this binding
extension. I still think it makes sense to have a generic property
instead of having each device do its own binding for the same.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for specifying a generic "wakeup-source" property on i2c
clients, which will set the I2C_CLIENT_WAKE flag, thus configuring the
device to wake the system from suspend (via IRQ).

This obviously doesn't make sense on devices lacking IRQ, but since we
still allow that in the i2c_board_info case, I don't see a reason to
restrict it here.

Note: Since the generic i2c bindings aren't documented in the kernel,
I didn't find a good place to add documentation for this binding
extension. I still think it makes sense to have a generic property
instead of having each device do its own binding for the same.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/i2c: implement of_find_i2c_adapter_by_node</title>
<updated>2012-05-12T12:28:17+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-04-17T18:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0938643e533cc80ef0cdfdd2e260c4910d0f8bc7'/>
<id>0938643e533cc80ef0cdfdd2e260c4910d0f8bc7</id>
<content type='text'>
This finds the struct i2c_adapter * for a given device tree node. Just
like of_find_i2c_device_by_node.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This finds the struct i2c_adapter * for a given device tree node. Just
like of_find_i2c_device_by_node.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/i2c: call i2c_verify_client from of_find_i2c_device_by_node</title>
<updated>2012-05-12T12:28:15+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2012-04-17T18:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d9afca37dea077d11ed67fc7f93b95c003e58819'/>
<id>d9afca37dea077d11ed67fc7f93b95c003e58819</id>
<content type='text'>
i2c_bus_type may contain both I2C clients and I2C adapters. Fix
of_find_i2c_device_by_node to call i2c_verify_client to ensure that it
only returns non-NULL of I2C clients.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
i2c_bus_type may contain both I2C clients and I2C adapters. Fix
of_find_i2c_device_by_node to call i2c_verify_client to ensure that it
only returns non-NULL of I2C clients.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/i2c: Fix request module by alias</title>
<updated>2010-12-24T08:28:54+00:00</updated>
<author>
<name>David Daney</name>
<email>ddaney@caviumnetworks.com</email>
</author>
<published>2010-11-16T22:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=020862648445d7c1b12ea213c152f27def703f3b'/>
<id>020862648445d7c1b12ea213c152f27def703f3b</id>
<content type='text'>
If we are registering an i2c device that has a device tree node like
this real-world example:

      rtc@68 {
        compatible = "dallas,ds1337";
        reg = &lt;0x68&gt;;
      };

of_i2c_register_devices() will try to load a module called ds1337.ko.
There is no such module, so it will fail.  If we look in modules.alias
we will find entries like these:

.
.
.
alias i2c:ds1339 rtc_ds1307
alias i2c:ds1338 rtc_ds1307
alias i2c:ds1337 rtc_ds1307
alias i2c:ds1307 rtc_ds1307
alias i2c:ds1374 rtc_ds1374
.
.
.

The module we want is really called rtc_ds1307.ko.  If we request a
module called "i2c:ds1337", the userspace module loader will do the
right thing (unless it is busybox) and load rtc_ds1307.ko.  So we add
the I2C_MODULE_PREFIX to the request_module() string.

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we are registering an i2c device that has a device tree node like
this real-world example:

      rtc@68 {
        compatible = "dallas,ds1337";
        reg = &lt;0x68&gt;;
      };

of_i2c_register_devices() will try to load a module called ds1337.ko.
There is no such module, so it will fail.  If we look in modules.alias
we will find entries like these:

.
.
.
alias i2c:ds1339 rtc_ds1307
alias i2c:ds1338 rtc_ds1307
alias i2c:ds1337 rtc_ds1307
alias i2c:ds1307 rtc_ds1307
alias i2c:ds1374 rtc_ds1374
.
.
.

The module we want is really called rtc_ds1307.ko.  If we request a
module called "i2c:ds1337", the userspace module loader will do the
right thing (unless it is busybox) and load rtc_ds1307.ko.  So we add
the I2C_MODULE_PREFIX to the request_module() string.

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/mips: Cleanup some include directives/files.</title>
<updated>2010-10-21T17:10:11+00:00</updated>
<author>
<name>David Daney</name>
<email>ddaney@caviumnetworks.com</email>
</author>
<published>2010-10-19T22:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4c60071c1ea3e204b9dc25c7519f7beef355d47f'/>
<id>4c60071c1ea3e204b9dc25c7519f7beef355d47f</id>
<content type='text'>
The __init directives should go on the definitions of things, not the
declaration, also __init is meaningless for inline functions, so
remove it from prom.h.  This allows us to get rid of a useless
#include, but most of the rest of them are useless too, so kill them
as well.

If of_i2c.c needs irq definitions, it should include linux/irq.h
directly, not assume indirect inclusion via asm/prom.h.

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Acked-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The __init directives should go on the definitions of things, not the
declaration, also __init is meaningless for inline functions, so
remove it from prom.h.  This allows us to get rid of a useless
#include, but most of the rest of them are useless too, so kill them
as well.

If of_i2c.c needs irq definitions, it should include linux/irq.h
directly, not assume indirect inclusion via asm/prom.h.

Signed-off-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Acked-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/i2c: Generalize OF support</title>
<updated>2010-07-05T22:14:52+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9fd049927ccba1c1d0343239b82f28c4e07fb95d'/>
<id>9fd049927ccba1c1d0343239b82f28c4e07fb95d</id>
<content type='text'>
This patch cleans up the i2c OF support code to make it selectable by
all architectures and allow for automatic registration of i2c devices.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch cleans up the i2c OF support code to make it selectable by
all architectures and allow for automatic registration of i2c devices.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: eliminate of_device-&gt;node and dev_archdata-&gt;{of,prom}_node</title>
<updated>2010-05-18T22:10:45+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-04-13T23:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=58f9b0b02414062eaff46716bc04b47d7e79add5'/>
<id>58f9b0b02414062eaff46716bc04b47d7e79add5</id>
<content type='text'>
This patch eliminates the node pointer from struct of_device and the
of_node (or prom_node) pointer from struct dev_archdata since the node
pointer is now part of struct device proper when CONFIG_OF is set, and
all users of the old pointer locations have already been converted over
to use device-&gt;of_node.

Also remove dev_archdata_{get,set}_node() as it is no longer used by
anything.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch eliminates the node pointer from struct of_device and the
of_node (or prom_node) pointer from struct dev_archdata since the node
pointer is now part of struct device proper when CONFIG_OF is set, and
all users of the old pointer locations have already been converted over
to use device-&gt;of_node.

Also remove dev_archdata_{get,set}_node() as it is no longer used by
anything.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Always use 'struct device.of_node' to get device node pointer.</title>
<updated>2010-05-18T22:10:44+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-04-13T23:12:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=61c7a080a5a061c976988fd4b844dfb468dda255'/>
<id>61c7a080a5a061c976988fd4b844dfb468dda255</id>
<content type='text'>
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated.  This patch
makes all readers of these elements use device.of_node instead.

(struct of_device *)-&gt;node
(struct dev_archdata *)-&gt;prom_node (sparc)
(struct dev_archdata *)-&gt;of_node (powerpc &amp; microblaze)

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated.  This patch
makes all readers of these elements use device.of_node instead.

(struct of_device *)-&gt;node
(struct dev_archdata *)-&gt;prom_node (sparc)
(struct dev_archdata *)-&gt;of_node (powerpc &amp; microblaze)

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
</feed>
