lkml.org 
[lkml]   [2013]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] gpio: interrupt consistency check for OF GPIO IRQs
On 2013-08-21 15:38, Lars Poeschel wrote:
> +static void of_gpio_scan_irq_lines(const struct device_node *const node,
> + struct device_node *const gcn,
> + struct irq_domain *const irq_domain,
> + const u32 intsize,
> + const struct gpio_chip * const gc,
> + bool request)
> +{
> + struct device_node *child;
> + struct device_node *irq_parent;
> + const __be32 *intspec;
> + u32 intlen;
> + int ret;
> + int i;
> + irq_hw_number_t hwirq;
> + unsigned int type;
> +
> + if (node == NULL)
> + return;
> +
> + for_each_child_of_node(node, child) {
> + of_gpio_scan_irq_lines(child, gcn, irq_domain, intsize, gc,
> + request);
> + /* Check if we have an IRQ parent, else continue */
> + irq_parent = of_irq_find_parent(child);

Hi!

This call to of_irq_find_parent breaks gpiolib-of for SPARC due to the
fact that the function is undefined when !defined(CONFIG_OF_IRQ) &&
defined(CONFIG_OF).

Defining the empty of_irq_find_parent in include/linux/of_irq.h when
!defined(CONFIG_OF_IRQ) instead of the current case when
!defined(CONFIG_OF) would solve the immediate compilation problem.

However, when !defined(CONFIG_OF_IRQ) (i.e. SPARC in this case) the
whole tree walking will never accomplish anything, so it would be good
if of_gpiochip_reserve_irq_lines is just an empty dummy or something
like that when !defined(CONFIG_OF_IRQ).

Cheers,
Andreas Larsson



\
 
 \ /
  Last update: 2013-08-22 16:01    [W:0.100 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site