Thread (46 messages) 46 messages, 7 authors, 2013-06-12

[PATCH 3/5] gpio/omap: Add DT support to GPIO driver

From: Linus Walleij <hidden>
Date: 2013-06-12 09:43:23
Also in: linux-devicetree, linux-omap

Possibly related (same subject, not in this thread)

On Tue, Jun 11, 2013 at 11:25 PM, Grant Likely
[off-list ref] wrote:
On Fri, 26 Apr 2013 16:31:24 -0500, Jon Hunter [off-list ref] wrote:
quoted
On 04/26/2013 02:31 AM, Linus Walleij wrote:
quoted
On Wed, Apr 17, 2013 at 2:41 AM, Javier Martinez Canillas
[off-list ref] wrote:

So:
quoted
+static int omap_gpio_irq_domain_xlate(struct irq_domain *d,
+                                     struct device_node *ctrlr,
+                                     const u32 *intspec, unsigned int intsize,
+                                     irq_hw_number_t *out_hwirq,
+                                     unsigned int *out_type)
+{
+       int ret;
+       struct gpio_bank *bank = d->host_data;
+       int gpio = bank->chip.base + intspec[0];
+
+       if (WARN_ON(intsize < 2))
+               return -EINVAL;
+
+       ret = gpio_request_one(gpio, GPIOF_IN, ctrlr->full_name);
+       if (ret)
+               return ret;
So how to figure out if a device is already requesting this GPIO
on some orthogonal axis?
I really don't think that is necessary. Hopefully, my other email [1]
elaborates on why. Let me know if this makes sense.
I would agree here. If the irq specified happens to be a GPIO; then the
onus is on the GPIO/IRQ controller driver to make sure that GPIO is
actually set up to work as an IRQ.
Hm, re-reading this I guess the gpio_request_one() will block
others from using the pin for anything else.

Isn't that the answer to my actual question...?

It seems more like I was asking a pretty stupid question
actually.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help