<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpio, branch v3.11.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/gpio?h=v3.11.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/gpio?h=v3.11.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-11-04T12:35:19Z</updated>
<entry>
<title>gpio/lynxpoint: check if the interrupt is enabled in IRQ handler</title>
<updated>2013-11-04T12:35:19Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2013-10-01T14:35:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a4e22a835e37fd78fb3bd91efb29b26d0281f264'/>
<id>urn:sha1:a4e22a835e37fd78fb3bd91efb29b26d0281f264</id>
<content type='text'>
commit 03d152d5582abc8a1c19cb107164c3724bbd4be4 upstream.

Checking LP_INT_STAT is not enough in the interrupt handler because its
contents get updated regardless of whether the pin has interrupt enabled or
not. This causes the driver to loop forever for GPIOs that are pulled up.

Fix this by checking the interrupt enable bit for the pin as well.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gpio/omap: auto-setup a GPIO when used as an IRQ</title>
<updated>2013-10-14T01:14:27Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2013-09-25T00:36:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e64141c1c311b840235d99baf17a3620cd35cb19'/>
<id>urn:sha1:e64141c1c311b840235d99baf17a3620cd35cb19</id>
<content type='text'>
commit fac7fa162a19100298d5d91359960037dc5bfca9 upstream.

The OMAP GPIO controller HW requires a pin to be configured in GPIO
input mode in order to operate as an interrupt input. Since drivers
should not be aware of whether an interrupt pin is also a GPIO or not,
the HW should be fully configured/enabled as an IRQ if a driver solely
uses IRQ APIs such as request_irq(), and never calls any GPIO-related
APIs. As such, add the missing HW setup to the OMAP GPIO controller's
irq_chip driver.

Since this bypasses the GPIO subsystem we have to ensure that another
driver won't be able to request the same GPIO pin that is used as an
IRQ and set its direction as output. Requesting the GPIO and setting
its direction as input is allowed though.

This fixes smsc911x ethernet support for tobi and igep OMAP3 boards
and OMAP4 SDP SPI based ethernet that use a GPIO as an interrupt line.

Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: George Cherian &lt;george.cherian@ti.com&gt;
Tested-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Tested-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Reviewed-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Tested-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Acked-by: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gpio/omap: maintain GPIO and IRQ usage separately</title>
<updated>2013-10-14T01:14:27Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2013-09-25T00:36:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=80bd2ccb14f0b09d4daa8a87d5668d91e8f3702d'/>
<id>urn:sha1:80bd2ccb14f0b09d4daa8a87d5668d91e8f3702d</id>
<content type='text'>
commit fa365e4d729065b5e85165df3dc9699ed47489cc upstream.

The GPIO OMAP controller pins can be used as IRQ and GPIO
independently so is necessary to keep track GPIO pins and
IRQ lines usage separately to make sure that the bank will
always be enabled while being used.

Also move gpio_is_input() definition in preparation for the
next patch that setups the controller's irq_chip driver when
a caller requests an interrupt line.

Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: George Cherian &lt;george.cherian@ti.com&gt;
Tested-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Tested-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Reviewed-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Tested-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Acked-by: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gpio_msm: Fix build error due to missing err.h</title>
<updated>2013-07-30T22:34:31Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-07-24T20:20:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=011b2039dfd46fa030138b2e2ed3c55c8341151d'/>
<id>urn:sha1:011b2039dfd46fa030138b2e2ed3c55c8341151d</id>
<content type='text'>
drivers/gpio/gpio-msm-v1.c: In function 'gpio_msm_v1_probe':
drivers/gpio/gpio-msm-v1.c:656:2:
error: implicit declaration of function 'IS_ERR'
[-Werror=implicit-function-declaration]
drivers/gpio/gpio-msm-v1.c:657:3:
error: implicit declaration of function 'PTR_ERR'
[-Werror=implicit-function-declaration]

This driver failed to compile after commit 68515bb
(gpio_msm: Convert to use devm_ioremap_resource,
2013-06-10).

Acked-by: Tushar Behera &lt;tushar.behera@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "gpio/omap: don't create an IRQ mapping for every GPIO on DT"</title>
<updated>2013-07-30T22:34:31Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-07-29T09:49:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=253403b035ac55ddd00282ab2dc8e948facc0da6'/>
<id>urn:sha1:253403b035ac55ddd00282ab2dc8e948facc0da6</id>
<content type='text'>
This reverts commit 0e970cec05635adbe7b686063e2548a8e4afb8f4.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "gpio/omap: auto request GPIO as input if used as IRQ via DT"</title>
<updated>2013-07-30T22:34:31Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-07-29T09:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c119fee06309a5b6969992b6fe2593299c803c81'/>
<id>urn:sha1:c119fee06309a5b6969992b6fe2593299c803c81</id>
<content type='text'>
This reverts commit b4419e1a15905191661ffe75ba2f9e649f5d565e.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "gpio/omap: fix build error when OF_GPIO is not defined."</title>
<updated>2013-07-30T22:34:30Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2013-07-29T09:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=27d470c1ab555a1c0b87099c242dc479e19076af'/>
<id>urn:sha1:27d470c1ab555a1c0b87099c242dc479e19076af</id>
<content type='text'>
This reverts commit 949eb1a4d29dc75e0b5b16b03747886b52ecf854.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>drivers: gpio: msm: Fix the error condition for reading ngpio</title>
<updated>2013-07-20T21:33:33Z</updated>
<author>
<name>Rohit Vaswani</name>
<email>rvaswani@codeaurora.org</email>
</author>
<published>2013-07-18T20:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=afe8ce9b29c487ea7f62faa936b6abb84e0b8815'/>
<id>urn:sha1:afe8ce9b29c487ea7f62faa936b6abb84e0b8815</id>
<content type='text'>
of_property_read_u32 return 0 on success. The check was using a ! to
return error. Fix the if condition.

Signed-off-by: Rohit Vaswani &lt;rvaswani@codeaurora.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Pankaj Jangra  &lt;jangra.pankaj9@gmail.com&gt;
Cc: "Bird, Tim" &lt;Tim.Bird@sonymobile.com&gt;
Signed-off-by: David Brown &lt;davidb@codeaurora.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio/omap: fix build error when OF_GPIO is not defined.</title>
<updated>2013-07-20T16:57:28Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2013-07-02T19:46:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=949eb1a4d29dc75e0b5b16b03747886b52ecf854'/>
<id>urn:sha1:949eb1a4d29dc75e0b5b16b03747886b52ecf854</id>
<content type='text'>
The OMAP GPIO driver check if the chip has an associated
Device Tree node using the struct gpio_chip of_node member.

But this is only build if CONFIG_OF_GPIO is defined which
leads to the following error when using omap1_defconfig:

linux/drivers/gpio/gpio-omap.c: In function 'omap_gpio_chip_init':
linux/drivers/gpio/gpio-omap.c:1080:17: error: 'struct gpio_chip' has no member named 'of_node'
linux/drivers/gpio/gpio-omap.c: In function 'omap_gpio_irq_map':
linux/drivers/gpio/gpio-omap.c:1116:16: error: 'struct gpio_chip' has no member named 'of_node'

Reported-by: Kevin Hilman &lt;khilman@linaro.org&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio/omap: auto request GPIO as input if used as IRQ via DT</title>
<updated>2013-07-20T16:57:28Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2013-06-28T15:27:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b4419e1a15905191661ffe75ba2f9e649f5d565e'/>
<id>urn:sha1:b4419e1a15905191661ffe75ba2f9e649f5d565e</id>
<content type='text'>
When an OMAP GPIO is used as an IRQ line, a call to gpio_request()
has to be made to initialize the OMAP GPIO bank before a driver
request the IRQ. Otherwise the call to request_irq() fails.

Drives should not be aware of this neither care wether an IRQ line
is a GPIO or not. They should just request the IRQ and this has to
be handled by the irq_chip driver.

With the current OMAP GPIO DT binding, if we define:

    gpio6: gpio@49058000 {
    	   compatible = "ti,omap3-gpio";
	   reg = &lt;0x49058000 0x200&gt;;
	   interrupts = &lt;34&gt;;
	   ti,hwmods = "gpio6";
	   gpio-controller;
	   #gpio-cells = &lt;2&gt;;
	   interrupt-controller;
	   #interrupt-cells = &lt;2&gt;;
    };

	   interrupt-parent = &lt;&amp;gpio6&gt;;
           interrupts = &lt;16 8&gt;;

The GPIO is correctly mapped as an IRQ but a call to gpio_request()
is never made. Since a call to the custom IRQ domain .map function
handler is made for each GPIO used as an IRQ, the GPIO can be setup
and configured as input there automatically.

Changes since v3:
  - Use bank-&gt;chip.of_node instead of_have_populated_dt() to check
    DT or legacy boot as suggested by Jean-Christophe PLAGNIOL-VILLARD
  - Add a comment that this is just a temporary solution until and
    that it has to be removed once is handled by the IRQ core.

Changes since v2:
 - Only make the call to gpio_request_one() conditional in the DT
   case as suggested by Grant Likely.

Changes since v1:
  - Split the irq domain mapping function handler and the GPIO
    request in two different patches.

Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Tested-by: Enric Balletbo i Serra &lt;eballetbo@gmail.com&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Acked-by: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
