<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/w1/slaves, branch v3.6.1</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>1-Wire: Add support for the maxim ds1825 temperature sensor</title>
<updated>2012-08-16T19:33:59+00:00</updated>
<author>
<name>Raphael Assenat</name>
<email>raph@8d.com</email>
</author>
<published>2012-08-16T16:56:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3261dfb5538e2ff0264fde3050dbd4e922fa296'/>
<id>f3261dfb5538e2ff0264fde3050dbd4e922fa296</id>
<content type='text'>
This patch adds support for maxim ds1825 based 1-wire temperature sensors.

Signed-off-by: Raphael Assenat &lt;raph@8d.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for maxim ds1825 based 1-wire temperature sensors.

Signed-off-by: Raphael Assenat &lt;raph@8d.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>w1: Add 1-wire slave device driver for DS28E04-100</title>
<updated>2012-06-13T23:47:10+00:00</updated>
<author>
<name>Markus Franke</name>
<email>franm@hrz.tu-chemnitz.de</email>
</author>
<published>2012-05-25T22:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fbf7f7b4e2ae40f790828c86d31beff2d49e9ac8'/>
<id>fbf7f7b4e2ae40f790828c86d31beff2d49e9ac8</id>
<content type='text'>
Signed-off-by: Markus Franke &lt;franm@hrz.tu-chemnitz.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Markus Franke &lt;franm@hrz.tu-chemnitz.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>W1: split master mutex to avoid deadlocks.</title>
<updated>2012-06-13T23:38:40+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-18T05:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b02f8bede217a4b145ecc16d3940c78d83941147'/>
<id>b02f8bede217a4b145ecc16d3940c78d83941147</id>
<content type='text'>
The 'mutex' in struct w1_master is use for two very different
purposes.

Firstly it protects various data structures such as the list of all
slaves.

Secondly it protects the w1 buss against concurrent accesses.

This can lead to deadlocks when the -&gt;probe code called while adding a
slave needs to talk on the bus, as is the case for power_supply
devices.
ds2780 and ds2781 drivers contain a work around to track which
process hold the lock simply to avoid this deadlock.  bq27000 doesn't
have that work around and so deadlocks.

There are other possible deadlocks involving sysfs.
When removing a device the sysfs s_active lock is held, so the lock
that protects the slave list must take precedence over s_active.
However when access power_supply attributes via sysfs, the s_active
lock must take precedence over the lock that protects accesses to
the bus.

So to avoid deadlocks between w1 slaves and sysfs, these must be
two separate locks.  Making them separate means that the work around
in ds2780 and ds2781 can be removed.

So this patch:
 - adds a new mutex: "bus_mutex" which serialises access to the bus.
 - takes in mutex in w1_search and ds1wm_search while they access
   the bus for searching.  The mutex is dropped before calling the
   callback which adds the slave.
 - changes all slaves to use bus_mutex instead of mutex to
   protect access to the bus
 - removes w1_ds2790_io_nolock and w1_ds2781_io_nolock, and the
   related code from drivers/power/ds278[01]_battery.c which
   calls them.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'mutex' in struct w1_master is use for two very different
purposes.

Firstly it protects various data structures such as the list of all
slaves.

Secondly it protects the w1 buss against concurrent accesses.

This can lead to deadlocks when the -&gt;probe code called while adding a
slave needs to talk on the bus, as is the case for power_supply
devices.
ds2780 and ds2781 drivers contain a work around to track which
process hold the lock simply to avoid this deadlock.  bq27000 doesn't
have that work around and so deadlocks.

There are other possible deadlocks involving sysfs.
When removing a device the sysfs s_active lock is held, so the lock
that protects the slave list must take precedence over s_active.
However when access power_supply attributes via sysfs, the s_active
lock must take precedence over the lock that protects accesses to
the bus.

So to avoid deadlocks between w1 slaves and sysfs, these must be
two separate locks.  Making them separate means that the work around
in ds2780 and ds2781 can be removed.

So this patch:
 - adds a new mutex: "bus_mutex" which serialises access to the bus.
 - takes in mutex in w1_search and ds1wm_search while they access
   the bus for searching.  The mutex is dropped before calling the
   callback which adds the slave.
 - changes all slaves to use bus_mutex instead of mutex to
   protect access to the bus
 - removes w1_ds2790_io_nolock and w1_ds2781_io_nolock, and the
   related code from drivers/power/ds278[01]_battery.c which
   calls them.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "w1: introduce a slave mutex for serializing IO"</title>
<updated>2012-06-13T23:33:54+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-06-13T23:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dd0aa67cd7cf3f4a3ca52ecc1d6b82f3fad1352b'/>
<id>dd0aa67cd7cf3f4a3ca52ecc1d6b82f3fad1352b</id>
<content type='text'>
This reverts commit 59d4467be405316916a4087d5b02d99196eeef04.

Turns out it was the wrong version, will apply the correct version after
this.

Reported-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 59d4467be405316916a4087d5b02d99196eeef04.

Turns out it was the wrong version, will apply the correct version after
this.

Reported-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>w1: introduce a slave mutex for serializing IO</title>
<updated>2012-06-12T22:27:32+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-05-01T18:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59d4467be405316916a4087d5b02d99196eeef04'/>
<id>59d4467be405316916a4087d5b02d99196eeef04</id>
<content type='text'>
w1 devices need a mutex to serial IO.  Most use master-&gt;mutex.
However that is used for other purposes and they can conflict.

In particular master-&gt;mutex is held while w1_attach_slave_device is
called.

For bq27000, this registers a 'powersupply' device which tries to read the
current status.  The attempt to read will cause a deadlock on
master-&gt;mutex.

So create a new per-slave mutex and use that for serializing IO for
bq27000.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
w1 devices need a mutex to serial IO.  Most use master-&gt;mutex.
However that is used for other purposes and they can conflict.

In particular master-&gt;mutex is held while w1_attach_slave_device is
called.

For bq27000, this registers a 'powersupply' device which tries to read the
current status.  The attempt to read will cause a deadlock on
master-&gt;mutex.

So create a new per-slave mutex and use that for serializing IO for
bq27000.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>w1: w1_ds2408.c: quite sparse noise about using plaing integer as NULL pointer</title>
<updated>2012-05-04T23:25:30+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2012-05-03T00:02:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ae68e7345b0d5d49e1c2c7583d15a3c177f8a2f'/>
<id>4ae68e7345b0d5d49e1c2c7583d15a3c177f8a2f</id>
<content type='text'>
NULL not 0 should be used with pointers. Just remove the offending
lines since they will default to NULL anyway.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NULL not 0 should be used with pointers. Just remove the offending
lines since they will default to NULL anyway.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "w1: Add 1-wire slave device driver for DS28E04-100"</title>
<updated>2012-04-30T02:12:08+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-04-30T02:12:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c0a6720977f89c50473366af965ae28cd8fce923'/>
<id>c0a6720977f89c50473366af965ae28cd8fce923</id>
<content type='text'>
This reverts commit f19420c1acb0b573c88a12deb2d42035e22d4a17.

It contained lots of errors and warnings and shouldn't have ever been
applied, that was my fault, sorry.

Cc: Markus Franke &lt;markus.franke@s2002.tu-chemnitz.de&gt;
Cc: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;,
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit f19420c1acb0b573c88a12deb2d42035e22d4a17.

It contained lots of errors and warnings and shouldn't have ever been
applied, that was my fault, sorry.

Cc: Markus Franke &lt;markus.franke@s2002.tu-chemnitz.de&gt;
Cc: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;,
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>w1: w1_ds28e04: unlock on error path in w1_f1C_write_pio()</title>
<updated>2012-04-18T22:37:35+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-04-13T13:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eda70f1dfc9e5165b9413dbf1ccb5c108f26a18c'/>
<id>eda70f1dfc9e5165b9413dbf1ccb5c108f26a18c</id>
<content type='text'>
We should unlock here before returning.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should unlock here before returning.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>w1: Add 1-wire slave device driver for DS28E04-100</title>
<updated>2012-04-11T23:44:10+00:00</updated>
<author>
<name>Markus Franke</name>
<email>markus.franke@s2002.tu-chemnitz.de</email>
</author>
<published>2012-04-11T22:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f19420c1acb0b573c88a12deb2d42035e22d4a17'/>
<id>f19420c1acb0b573c88a12deb2d42035e22d4a17</id>
<content type='text'>
This patch adds a 1-wire slave device driver for the DS28E04-100.

Signed-off-by: Markus Franke &lt;franm@hrz.tu-chemnitz.de&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a 1-wire slave device driver for the DS28E04-100.

Signed-off-by: Markus Franke &lt;franm@hrz.tu-chemnitz.de&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers</title>
<updated>2012-03-08T19:15:33+00:00</updated>
<author>
<name>Renata Sayakhova</name>
<email>rsayakhova@gmail.com</email>
</author>
<published>2012-02-29T13:58:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fef37e9a47b9927ce2817fe1a0fa8cf40f6eefb6'/>
<id>fef37e9a47b9927ce2817fe1a0fa8cf40f6eefb6</id>
<content type='text'>
Signed-off-by: Renata Sayakhova &lt;rsayakhova@gmail.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Renata Sayakhova &lt;rsayakhova@gmail.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
