<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/gpio, branch tegra-T30.ER5</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>cs5535-gpio: handle GPIO regs where higher (clear) bits are set</title>
<updated>2011-01-07T21:58:40+00:00</updated>
<author>
<name>Andres Salomon</name>
<email>dilinger@queued.net</email>
</author>
<published>2010-12-21T21:04:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2ea51982aef2d656e0ce5f0cf725c1c449730cba'/>
<id>2ea51982aef2d656e0ce5f0cf725c1c449730cba</id>
<content type='text'>
commit 44658a11f312fb9217674cb90b1a11cbe17fd18d upstream.

The default for non-READ_BACK GPIO regs is to have the clear bits set;
this means that our original errata fix was too simplistic.  This
changes it to the following behavior:

 - when setting GPIOs, ignore the higher order bits (they're for
   clearing, we don't need to care about them).

 - when clearing GPIOs, keep all the bits, but unset (via XOR) the
   lower order bit that negates the clear bit that we care about.  That
   is, if we're clearing GPIO 26 (val = 0x04000000), we first XOR what's
   currently in the register with 0x0400 (GPIO 26's SET bit), and then
   OR that with the GPIO 26's CLEAR bit.

Tested-by: Daniel Drake &lt;dsd@laptop.org&gt;
Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 44658a11f312fb9217674cb90b1a11cbe17fd18d upstream.

The default for non-READ_BACK GPIO regs is to have the clear bits set;
this means that our original errata fix was too simplistic.  This
changes it to the following behavior:

 - when setting GPIOs, ignore the higher order bits (they're for
   clearing, we don't need to care about them).

 - when clearing GPIOs, keep all the bits, but unset (via XOR) the
   lower order bit that negates the clear bit that we care about.  That
   is, if we're clearing GPIO 26 (val = 0x04000000), we first XOR what's
   currently in the register with 0x0400 (GPIO 26's SET bit), and then
   OR that with the GPIO 26's CLEAR bit.

Tested-by: Daniel Drake &lt;dsd@laptop.org&gt;
Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cs5535-gpio: don't apply errata #36 to edge detect GPIOs</title>
<updated>2011-01-07T21:58:39+00:00</updated>
<author>
<name>Andres Salomon</name>
<email>dilinger@queued.net</email>
</author>
<published>2010-12-21T21:04:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4403806037a7eba17c715337b4dd59d39b06cf94'/>
<id>4403806037a7eba17c715337b4dd59d39b06cf94</id>
<content type='text'>
commit 001851659354cce436b749a793f3512a53394d80 upstream.

The edge detect status GPIOs function differently from the other atomic
model CS5536 GPIO registers; writing 1 to the high bits clears the GPIO,
but writing 1 to the lower bits also clears the bit.

This means that read-modify-write doesn't actually work for it, so don't
apply the errata here.  If a negative edge status gets lost after
resume..  well, we tried our best!

Tested-by: Daniel Drake &lt;dsd@laptop.org&gt;
Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 001851659354cce436b749a793f3512a53394d80 upstream.

The edge detect status GPIOs function differently from the other atomic
model CS5536 GPIO registers; writing 1 to the high bits clears the GPIO,
but writing 1 to the lower bits also clears the bit.

This means that read-modify-write doesn't actually work for it, so don't
apply the errata here.  If a negative edge status gets lost after
resume..  well, we tried our best!

Tested-by: Daniel Drake &lt;dsd@laptop.org&gt;
Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: Fix null pointer dereference while accessing rdc321x platform_data</title>
<updated>2011-01-07T21:58:38+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>florian@openwrt.org</email>
</author>
<published>2010-11-26T09:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b3e874a07d483cfc8481626e7d812ad59c183c0b'/>
<id>b3e874a07d483cfc8481626e7d812ad59c183c0b</id>
<content type='text'>
commit fa6469cb5b2d16703464c344b943e2c025cb7858 upstream.

rdc321x-gpio currently fetches its driver specific data by using the
platform_device-&gt;platform_data pointer, this is wrong because the mfd
device which registers our platform_device has been added using
mfd_add_device() which sets the platform_device-&gt;driver_data pointer
instead.

Signed-off-by: Florian Fainelli &lt;florian@openwrt.org&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit fa6469cb5b2d16703464c344b943e2c025cb7858 upstream.

rdc321x-gpio currently fetches its driver specific data by using the
platform_device-&gt;platform_data pointer, this is wrong because the mfd
device which registers our platform_device has been added using
mfd_add_device() which sets the platform_device-&gt;driver_data pointer
instead.

Signed-off-by: Florian Fainelli &lt;florian@openwrt.org&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cs5535-gpio: apply CS5536 errata workaround for GPIOs</title>
<updated>2010-12-09T21:33:14+00:00</updated>
<author>
<name>Andres Salomon</name>
<email>dilinger@queued.net</email>
</author>
<published>2010-12-02T22:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e6cc466ac1954e95006d81a17a549b3488dd0556'/>
<id>e6cc466ac1954e95006d81a17a549b3488dd0556</id>
<content type='text'>
commit 853ff88324a248a9f5da6e110850223db353ec07 upstream.

The AMD Geode CS5536 Companion Device Silicon Revision B1 Specification
Update mentions the follow as issue #36:

 "Atomic write transactions to the atomic GPIO High Bank Feature Bit
  registers should only affect the bits selected [...]"

 "after Suspend, an atomic write transaction [...] will clear all
  non-selected bits of the accessed register."

In other words, writing to the high bank for a single GPIO bit will
clear every other GPIO bit (but only sometimes after a suspend).

The workaround described is obvious and simple; do a read-modify-write.
This patch does that, and documents why we're doing it.

Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 853ff88324a248a9f5da6e110850223db353ec07 upstream.

The AMD Geode CS5536 Companion Device Silicon Revision B1 Specification
Update mentions the follow as issue #36:

 "Atomic write transactions to the atomic GPIO High Bank Feature Bit
  registers should only affect the bits selected [...]"

 "after Suspend, an atomic write transaction [...] will clear all
  non-selected bits of the accessed register."

In other words, writing to the high bank for a single GPIO bit will
clear every other GPIO bit (but only sometimes after a suspend).

The workaround described is obvious and simple; do a read-modify-write.
This patch does that, and documents why we're doing it.

Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: sx150x: correct and refine reset-on-probe behavior</title>
<updated>2010-09-10T01:57:24+00:00</updated>
<author>
<name>Gregory Bean</name>
<email>gbean@codeaurora.org</email>
</author>
<published>2010-09-09T23:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5affb607720d734ca572b8a77c5c7d62d3042b6f'/>
<id>5affb607720d734ca572b8a77c5c7d62d3042b6f</id>
<content type='text'>
Replace the arbitrary software-reset call from the device-probe
method, because:

- It is defective.  To work correctly, it should be two byte writes,
  not a single word write.  As it stands, it does nothing.

- Some devices with sx150x expanders installed have their NRESET pins
  ganged on the same line, so resetting one causes the others to reset -
  not a nice thing to do arbitrarily!

- The probe, usually taking place at boot, implies a recent hard-reset,
  so a software reset at this point is just a waste of energy anyway.

Therefore, make it optional, defaulting to off, as this will match the
common case of probing at powerup and also matches the current broken
no-op behavior.

Signed-off-by: Gregory Bean &lt;gbean@codeaurora.org&gt;
Reviewed-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the arbitrary software-reset call from the device-probe
method, because:

- It is defective.  To work correctly, it should be two byte writes,
  not a single word write.  As it stands, it does nothing.

- Some devices with sx150x expanders installed have their NRESET pins
  ganged on the same line, so resetting one causes the others to reset -
  not a nice thing to do arbitrarily!

- The probe, usually taking place at boot, implies a recent hard-reset,
  so a software reset at this point is just a waste of energy anyway.

Therefore, make it optional, defaulting to off, as this will match the
common case of probing at powerup and also matches the current broken
no-op behavior.

Signed-off-by: Gregory Bean &lt;gbean@codeaurora.org&gt;
Reviewed-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: Implement set_debounce for WM831x GPIOs</title>
<updated>2010-08-12T09:27:57+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2010-07-03T13:40:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b12c35e22d102172cd2a69581f939ec9a70a7942'/>
<id>b12c35e22d102172cd2a69581f939ec9a70a7942</id>
<content type='text'>
The debounce times are approximate, they can be selected using the two
input functions.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The debounce times are approximate, they can be selected using the two
input functions.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: Add STMPE GPIO driver</title>
<updated>2010-08-12T09:27:55+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin.vincent@stericsson.com</email>
</author>
<published>2010-07-02T11:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=03f822f5e5f5924f4ad372d3e698855c6a9275e0'/>
<id>03f822f5e5f5924f4ad372d3e698855c6a9275e0</id>
<content type='text'>
Add support for the GPIOs on STMPE I/O Expanders.

[l.fu@pengutronix.de: fix set direction input]
[l.fu@pengutronix.de: set GPIO alternate function while requesting]
Acked-by: Luotao Fu &lt;l.fu@pengutronix.de&gt;
Acked-by: Linus Walleij &lt;linus.walleij@stericsson.com&gt;
Signed-off-by: Rabin Vincent &lt;rabin.vincent@stericsson.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for the GPIOs on STMPE I/O Expanders.

[l.fu@pengutronix.de: fix set direction input]
[l.fu@pengutronix.de: set GPIO alternate function while requesting]
Acked-by: Luotao Fu &lt;l.fu@pengutronix.de&gt;
Acked-by: Linus Walleij &lt;linus.walleij@stericsson.com&gt;
Signed-off-by: Rabin Vincent &lt;rabin.vincent@stericsson.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: sx150x: add Semtech I2C sx150x gpio expander driver</title>
<updated>2010-08-11T15:59:09+00:00</updated>
<author>
<name>Gregory Bean</name>
<email>gbean@codeaurora.org</email>
</author>
<published>2010-08-11T01:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c34f16b70a52e348a62944fe0d5c7c1eb9ad5b72'/>
<id>c34f16b70a52e348a62944fe0d5c7c1eb9ad5b72</id>
<content type='text'>
Add support for Semtech SX150-series I2C GPIO expanders.  Compatible
models include:

8 bits:  sx1508q
16 bits: sx1509q

Signed-off-by: Gregory Bean &lt;gbean@codeaurora.org&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Trilok Soni &lt;tsoni@codeaurora.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for Semtech SX150-series I2C GPIO expanders.  Compatible
models include:

8 bits:  sx1508q
16 bits: sx1509q

Signed-off-by: Gregory Bean &lt;gbean@codeaurora.org&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Trilok Soni &lt;tsoni@codeaurora.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: allow nested threaded irqs for poll(2)</title>
<updated>2010-08-11T15:59:09+00:00</updated>
<author>
<name>Daniel Gl?ckner</name>
<email>dg@emlix.com</email>
</author>
<published>2010-08-11T01:02:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=364fadb32b67695cec610f5cd03df2514ef0f2b0'/>
<id>364fadb32b67695cec610f5cd03df2514ef0f2b0</id>
<content type='text'>
The pca953x driver requires the use of threaded irqs as its irq
demultiplexer can sleep.  Our irq handler can be called from any context,
so use request_any_context_irq to allow threaded irqs as well.

Signed-off-by: Daniel Gl?ckner &lt;dg@emlix.com&gt;
Reported-by: Ian Jeffray &lt;ian@jeffray.co.uk&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pca953x driver requires the use of threaded irqs as its irq
demultiplexer can sleep.  Our irq handler can be called from any context,
so use request_any_context_irq to allow threaded irqs as well.

Signed-off-by: Daniel Gl?ckner &lt;dg@emlix.com&gt;
Reported-by: Ian Jeffray &lt;ian@jeffray.co.uk&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpiolib: get rid of struct poll_desc and worklet</title>
<updated>2010-08-11T15:59:08+00:00</updated>
<author>
<name>Daniel Gl?ckner</name>
<email>dg@emlix.com</email>
</author>
<published>2010-08-11T01:02:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5ba1821d1b4a506f8c9be93d962f22b24b6140a5'/>
<id>5ba1821d1b4a506f8c9be93d962f22b24b6140a5</id>
<content type='text'>
As sysfs_notify_dirent has been made irq safe, there is no reason to not
call it directly from irq.  With the work_struct removed, the remaining
element in poll_desc is a sysfs_dirent pointer which may not be NULL.  We
can therefore store it directly in the idr and pass it as context to the
irq handler.

Most part of the patch deals with renaming defines and variables to
reflect their new use without functional change.

I also took the opportunity to initialize the idr statically.

Signed-off-by: Daniel Gl?ckner &lt;dg@emlix.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As sysfs_notify_dirent has been made irq safe, there is no reason to not
call it directly from irq.  With the work_struct removed, the remaining
element in poll_desc is a sysfs_dirent pointer which may not be NULL.  We
can therefore store it directly in the idr and pass it as context to the
irq handler.

Most part of the patch deals with renaming defines and variables to
reflect their new use without functional change.

I also took the opportunity to initialize the idr statically.

Signed-off-by: Daniel Gl?ckner &lt;dg@emlix.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
