alistair23-linux/drivers/pinctrl
Barry Song 8daeffb058 pinctrl: sirf: use only one irq_domain for the whole device node
in sirfsoc gpio probe(), we create 5 irq_domains for 5 gpio banks. but
in irq_create_of_mapping() of irqchip core level, irq_find_host() can
only return the 1st irq_domain attached the pinctrl dt device node as
we can see from the codes:

unsigned int irq_create_of_mapping(struct device_node *controller,
				   const u32 *intspec, unsigned int intsize)
{
	struct irq_domain *domain;
	...
	domain = controller ? irq_find_host(controller) : irq_default_domain;
}

struct irq_domain *irq_find_host(struct device_node *node)
{
	struct irq_domain *h, *found = NULL;
	int rc;

	/* We might want to match the legacy controller last since
	 * it might potentially be set to match all interrupts in
	 * the absence of a device node. This isn't a problem so far
	 * yet though...
	 */
	mutex_lock(&irq_domain_mutex);
	list_for_each_entry(h, &irq_domain_list, link) {
		if (h->ops->match)
			rc = h->ops->match(h, node);
		else
			rc = (h->of_node != NULL) && (h->of_node == node);

		if (rc) {
			found = h;
			break;
		}
	}
	mutex_unlock(&irq_domain_mutex);
	return found;
}

for sirfsoc, the 1st irq_domain attached to the device_node(controller) only
can do linear for the 1st 32 gpios. so for devices who use gpio hwirq above
32 and put the information in dt like:
                                tangoc-ts@5c{
                                        compatible = "pixcir,tangoc-ts";
+                                       interrupt-parent = <&gpio>;
+                                       interrupts = <34 0>;
                                };

we will fail to get the virq for these devices as hwirq will be bigger than
domain->revmap_data.linear.size in:
unsigned int irq_linear_revmap(struct irq_domain *domain,
			       irq_hw_number_t hwirq)
{

	/* Check revmap bounds; complain if exceeded */
	if (WARN_ON(hwirq >= domain->revmap_data.linear.size))
		return 0;

	return domain->revmap_data.linear.revmap[hwirq];
}

this patch drops redundant irq_domain and keep only one to fix the problem.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-01-15 09:07:56 +01:00
..
mvebu pinctrl: mvebu: remove redundant of_match_ptr 2013-10-23 10:55:04 +02:00
sh-pfc pinctrl: sh-pfc: r8a7791: Add I2C pins 2014-01-07 16:48:54 +01:00
sirf pinctrl: sirf: use only one irq_domain for the whole device node 2014-01-15 09:07:56 +01:00
spear pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
vt8500 pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
core.c pinctrl/gpio: non-linear GPIO ranges accesible from gpiolib 2013-10-16 15:33:50 +02:00
core.h
devicetree.c
devicetree.h
Kconfig pinctrl: msm: Update Kconfig for PINCTRL_MSM8X74 2013-12-16 10:29:25 +01:00
Makefile pinctrl: tegra: add pinmux controller driver for Tegra124 2013-12-12 22:28:06 +01:00
pinconf-generic.c pinctrl: Adds slew-rate, input-enable/disable 2013-12-16 10:55:03 +01:00
pinconf.c pinctrl: pinconf: remove warning: unused variable 'ops' 2013-12-13 13:55:15 +01:00
pinconf.h
pinctrl-ab8500.c
pinctrl-ab8505.c
pinctrl-ab8540.c
pinctrl-ab9540.c
pinctrl-abx500.c pinctrl: abx500: fix bitwise AND test 2013-08-28 14:32:06 +02:00
pinctrl-abx500.h
pinctrl-adi2-bf54x.c pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-adi2-bf60x.c pinctrl: pinctrl-adi2-bf60x: remove useless and duplicated GPIO definition for PPI2. 2013-09-23 09:45:33 +02:00
pinctrl-adi2.c pinctrl: pinctrl-adi2: disable IRQ when setting value 2013-10-09 13:09:41 +02:00
pinctrl-adi2.h pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x. 2013-09-19 14:37:27 +02:00
pinctrl-as3722.c pinctrl: as3722: Set pin to output mode for some function 2014-01-14 10:34:18 +01:00
pinctrl-at91.c pinctrl: at91: replace clk_prepare + clk_enable by clk_prepare_enable 2013-12-16 14:22:57 +01:00
pinctrl-baytrail.c pinctrl: baytrail: lock IRQs when starting them 2013-12-09 15:16:31 +01:00
pinctrl-bcm2835.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-coh901.c pinctrl: coh901: mark GPIO lines used for IRQ 2013-10-16 09:59:55 +02:00
pinctrl-coh901.h
pinctrl-exynos.c pinctrl: Correct number of pins for s5pv210 2013-09-27 15:50:22 +02:00
pinctrl-exynos.h
pinctrl-exynos5440.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-falcon.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-imx.c pinctrl: imx: fix using pin->input_val wrongly 2013-11-04 13:04:26 +01:00
pinctrl-imx.h pinctrl: imx: Use struct type for pins 2013-08-16 14:43:56 +02:00
pinctrl-imx1-core.c pinctrl: imx1-core populate subdevices 2013-11-25 09:08:30 +01:00
pinctrl-imx1.h pinctrl: imx1 core driver 2013-10-29 06:54:37 -07:00
pinctrl-imx6dl.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx6q.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx6sl.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx23.c
pinctrl-imx25.c pinctrl: pinctrl-imx: add imx25 pinctrl driver 2013-11-25 09:08:30 +01:00
pinctrl-imx27.c pinctrl: imx27: imx27 pincontrol driver 2013-10-29 08:58:06 -07:00
pinctrl-imx28.c
pinctrl-imx35.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx50.c pinctrl: imx50: add pinctrl support code for the IMX50 SoC 2013-11-06 10:06:59 +01:00
pinctrl-imx51.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-imx53.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-msm.c pinctrl: msm: Fix set gpio setting 2013-12-20 10:13:23 +01:00
pinctrl-msm.h pinctrl: Add Qualcomm TLMM driver 2013-12-06 14:58:33 +01:00
pinctrl-msm8x74.c pinctrl-msm: Rename compatible to be more specific 2013-12-16 10:33:42 +01:00
pinctrl-mxs.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-mxs.h
pinctrl-nomadik-db8500.c
pinctrl-nomadik-db8540.c
pinctrl-nomadik-stn8815.c
pinctrl-nomadik.c pinctrl: nomadik: always display IRQ in debugfs 2013-11-25 09:08:30 +01:00
pinctrl-nomadik.h
pinctrl-palmas.c pinctrl: palmas: remove pin config BIAS_PULL_PIN_DEFAULT support 2013-10-08 13:27:27 +02:00
pinctrl-rockchip.c pinctrl: rockchip: emulate both edge triggered interrupts 2013-10-16 15:33:55 +02:00
pinctrl-s3c24xx.c pinctrl: s3c24xx: off by one in s3c24xx_eint_init() 2013-08-28 14:44:25 +02:00
pinctrl-s3c64xx.c
pinctrl-samsung.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-samsung.h pinctrl: Add s5pv210 support to pinctrl-exynos 2013-08-28 15:56:06 +02:00
pinctrl-single.c pinctrl: single: fix infinite loop caused by bad mask 2014-01-15 08:31:53 +01:00
pinctrl-st.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-sunxi-pins.h pinctrl: sunxi: Add Allwinner A20 clock output pin functions 2014-01-08 10:46:28 +01:00
pinctrl-sunxi.c pinctrl: sunxi: Fix off-by-one for valid offset range checking 2013-08-30 10:37:36 +02:00
pinctrl-sunxi.h pinctrl: sunxi: Add spinlocks 2013-08-07 21:57:17 +02:00
pinctrl-tb10x.c pinctrl: tb10x: use module_platform_driver to simplify the code 2013-10-23 10:46:00 +02:00
pinctrl-tegra.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-tegra.h
pinctrl-tegra20.c
pinctrl-tegra30.c
pinctrl-tegra114.c pinctrl: tegra114: Remove MODULE_ALIAS 2013-09-19 14:35:24 +02:00
pinctrl-tegra124.c pinctrl: tegra: add pinmux controller driver for Tegra124 2013-12-12 22:28:06 +01:00
pinctrl-tz1090-pdc.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-tz1090.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-u300.c pinctrl: Pass all configs to driver on pin_config_set() 2013-08-28 13:34:41 +02:00
pinctrl-utils.c pinctrl: utils: include export.h to avoid warnings 2013-08-28 15:50:33 +02:00
pinctrl-utils.h pinctrl: add utility functions for add map/configs 2013-08-14 21:00:41 +02:00
pinctrl-vf610.c pinctrl: remove redundant of_match_ptr 2013-10-08 10:02:25 +02:00
pinctrl-xway.c pinctrl/lantiq: fix typo 2014-01-08 10:13:38 +01:00
pinmux.c pinctrl: remove minor dead code 2013-11-04 13:07:05 +01:00
pinmux.h