Skip to content

Commit 4136e45

Browse files
committed
Merge branch 'ib-qcom-spmi' into devel
2 parents b0c3e54 + e7dc6af commit 4136e45

File tree

11 files changed

+225
-156
lines changed

11 files changed

+225
-156
lines changed

Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PMIC's from Qualcomm.
1919
"qcom,pm8998-gpio"
2020
"qcom,pma8084-gpio"
2121
"qcom,pmi8994-gpio"
22+
"qcom,pmi8998-gpio"
2223
"qcom,pms405-gpio"
2324

2425
And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio"

arch/arm/boot/dts/qcom-pm8941.dtsi

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -64,42 +64,8 @@
6464
reg = <0xc000>;
6565
gpio-controller;
6666
#gpio-cells = <2>;
67-
interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
68-
<0 0xc1 0 IRQ_TYPE_NONE>,
69-
<0 0xc2 0 IRQ_TYPE_NONE>,
70-
<0 0xc3 0 IRQ_TYPE_NONE>,
71-
<0 0xc4 0 IRQ_TYPE_NONE>,
72-
<0 0xc5 0 IRQ_TYPE_NONE>,
73-
<0 0xc6 0 IRQ_TYPE_NONE>,
74-
<0 0xc7 0 IRQ_TYPE_NONE>,
75-
<0 0xc8 0 IRQ_TYPE_NONE>,
76-
<0 0xc9 0 IRQ_TYPE_NONE>,
77-
<0 0xca 0 IRQ_TYPE_NONE>,
78-
<0 0xcb 0 IRQ_TYPE_NONE>,
79-
<0 0xcc 0 IRQ_TYPE_NONE>,
80-
<0 0xcd 0 IRQ_TYPE_NONE>,
81-
<0 0xce 0 IRQ_TYPE_NONE>,
82-
<0 0xcf 0 IRQ_TYPE_NONE>,
83-
<0 0xd0 0 IRQ_TYPE_NONE>,
84-
<0 0xd1 0 IRQ_TYPE_NONE>,
85-
<0 0xd2 0 IRQ_TYPE_NONE>,
86-
<0 0xd3 0 IRQ_TYPE_NONE>,
87-
<0 0xd4 0 IRQ_TYPE_NONE>,
88-
<0 0xd5 0 IRQ_TYPE_NONE>,
89-
<0 0xd6 0 IRQ_TYPE_NONE>,
90-
<0 0xd7 0 IRQ_TYPE_NONE>,
91-
<0 0xd8 0 IRQ_TYPE_NONE>,
92-
<0 0xd9 0 IRQ_TYPE_NONE>,
93-
<0 0xda 0 IRQ_TYPE_NONE>,
94-
<0 0xdb 0 IRQ_TYPE_NONE>,
95-
<0 0xdc 0 IRQ_TYPE_NONE>,
96-
<0 0xdd 0 IRQ_TYPE_NONE>,
97-
<0 0xde 0 IRQ_TYPE_NONE>,
98-
<0 0xdf 0 IRQ_TYPE_NONE>,
99-
<0 0xe0 0 IRQ_TYPE_NONE>,
100-
<0 0xe1 0 IRQ_TYPE_NONE>,
101-
<0 0xe2 0 IRQ_TYPE_NONE>,
102-
<0 0xe3 0 IRQ_TYPE_NONE>;
67+
interrupt-controller;
68+
#interrupt-cells = <2>;
10369

10470
boost_bypass_n_pin: boost-bypass {
10571
pins = "gpio21";

arch/arm/boot/dts/qcom-pma8084.dtsi

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,8 @@
3232
reg = <0xc000>;
3333
gpio-controller;
3434
#gpio-cells = <2>;
35-
interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
36-
<0 0xc1 0 IRQ_TYPE_NONE>,
37-
<0 0xc2 0 IRQ_TYPE_NONE>,
38-
<0 0xc3 0 IRQ_TYPE_NONE>,
39-
<0 0xc4 0 IRQ_TYPE_NONE>,
40-
<0 0xc5 0 IRQ_TYPE_NONE>,
41-
<0 0xc6 0 IRQ_TYPE_NONE>,
42-
<0 0xc7 0 IRQ_TYPE_NONE>,
43-
<0 0xc8 0 IRQ_TYPE_NONE>,
44-
<0 0xc9 0 IRQ_TYPE_NONE>,
45-
<0 0xca 0 IRQ_TYPE_NONE>,
46-
<0 0xcb 0 IRQ_TYPE_NONE>,
47-
<0 0xcc 0 IRQ_TYPE_NONE>,
48-
<0 0xcd 0 IRQ_TYPE_NONE>,
49-
<0 0xce 0 IRQ_TYPE_NONE>,
50-
<0 0xcf 0 IRQ_TYPE_NONE>,
51-
<0 0xd0 0 IRQ_TYPE_NONE>,
52-
<0 0xd1 0 IRQ_TYPE_NONE>,
53-
<0 0xd2 0 IRQ_TYPE_NONE>,
54-
<0 0xd3 0 IRQ_TYPE_NONE>,
55-
<0 0xd4 0 IRQ_TYPE_NONE>,
56-
<0 0xd5 0 IRQ_TYPE_NONE>;
35+
interrupt-controller;
36+
#interrupt-cells = <2>;
5737
};
5838

5939
pma8084_mpps: mpps@a000 {

arch/arm64/boot/dts/qcom/pm8005.dtsi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
reg = <0xc000>;
1717
gpio-controller;
1818
#gpio-cells = <2>;
19-
interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
20-
<0 0xc1 0 IRQ_TYPE_NONE>,
21-
<0 0xc2 0 IRQ_TYPE_NONE>,
22-
<0 0xc3 0 IRQ_TYPE_NONE>;
19+
interrupt-controller;
20+
#interrupt-cells = <2>;
2321
};
2422

2523
};

arch/arm64/boot/dts/qcom/pm8998.dtsi

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -94,32 +94,8 @@
9494
reg = <0xc000>;
9595
gpio-controller;
9696
#gpio-cells = <2>;
97-
interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
98-
<0 0xc1 0 IRQ_TYPE_NONE>,
99-
<0 0xc2 0 IRQ_TYPE_NONE>,
100-
<0 0xc3 0 IRQ_TYPE_NONE>,
101-
<0 0xc4 0 IRQ_TYPE_NONE>,
102-
<0 0xc5 0 IRQ_TYPE_NONE>,
103-
<0 0xc6 0 IRQ_TYPE_NONE>,
104-
<0 0xc7 0 IRQ_TYPE_NONE>,
105-
<0 0xc8 0 IRQ_TYPE_NONE>,
106-
<0 0xc9 0 IRQ_TYPE_NONE>,
107-
<0 0xca 0 IRQ_TYPE_NONE>,
108-
<0 0xcb 0 IRQ_TYPE_NONE>,
109-
<0 0xcc 0 IRQ_TYPE_NONE>,
110-
<0 0xcd 0 IRQ_TYPE_NONE>,
111-
<0 0xce 0 IRQ_TYPE_NONE>,
112-
<0 0xcf 0 IRQ_TYPE_NONE>,
113-
<0 0xd0 0 IRQ_TYPE_NONE>,
114-
<0 0xd1 0 IRQ_TYPE_NONE>,
115-
<0 0xd2 0 IRQ_TYPE_NONE>,
116-
<0 0xd3 0 IRQ_TYPE_NONE>,
117-
<0 0xd4 0 IRQ_TYPE_NONE>,
118-
<0 0xd5 0 IRQ_TYPE_NONE>,
119-
<0 0xd6 0 IRQ_TYPE_NONE>,
120-
<0 0xd7 0 IRQ_TYPE_NONE>,
121-
<0 0xd8 0 IRQ_TYPE_NONE>,
122-
<0 0xd9 0 IRQ_TYPE_NONE>;
97+
interrupt-controller;
98+
#interrupt-cells = <2>;
12399
};
124100

125101
};

arch/arm64/boot/dts/qcom/pmi8994.dtsi

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,8 @@
1515
reg = <0xc000>;
1616
gpio-controller;
1717
#gpio-cells = <2>;
18-
interrupts = <2 0xc0 0 IRQ_TYPE_NONE>,
19-
<2 0xc1 0 IRQ_TYPE_NONE>,
20-
<2 0xc2 0 IRQ_TYPE_NONE>,
21-
<2 0xc3 0 IRQ_TYPE_NONE>,
22-
<2 0xc4 0 IRQ_TYPE_NONE>,
23-
<2 0xc5 0 IRQ_TYPE_NONE>,
24-
<2 0xc6 0 IRQ_TYPE_NONE>,
25-
<2 0xc7 0 IRQ_TYPE_NONE>,
26-
<2 0xc8 0 IRQ_TYPE_NONE>,
27-
<2 0xc9 0 IRQ_TYPE_NONE>;
18+
interrupt-controller;
19+
#interrupt-cells = <2>;
2820
};
2921
};
3022

arch/arm64/boot/dts/qcom/pmi8998.dtsi

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,8 @@
1414
reg = <0xc000>;
1515
gpio-controller;
1616
#gpio-cells = <2>;
17-
interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
18-
<0 0xc1 0 IRQ_TYPE_NONE>,
19-
<0 0xc2 0 IRQ_TYPE_NONE>,
20-
<0 0xc3 0 IRQ_TYPE_NONE>,
21-
<0 0xc4 0 IRQ_TYPE_NONE>,
22-
<0 0xc5 0 IRQ_TYPE_NONE>,
23-
<0 0xc6 0 IRQ_TYPE_NONE>,
24-
<0 0xc7 0 IRQ_TYPE_NONE>,
25-
<0 0xc8 0 IRQ_TYPE_NONE>,
26-
<0 0xc9 0 IRQ_TYPE_NONE>,
27-
<0 0xca 0 IRQ_TYPE_NONE>,
28-
<0 0xcb 0 IRQ_TYPE_NONE>,
29-
<0 0xcc 0 IRQ_TYPE_NONE>,
30-
<0 0xcd 0 IRQ_TYPE_NONE>;
17+
interrupt-controller;
18+
#interrupt-cells = <2>;
3119
};
3220
};
3321

drivers/gpio/gpiolib.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,43 @@ static const struct irq_domain_ops gpiochip_domain_ops = {
17751775
.xlate = irq_domain_xlate_twocell,
17761776
};
17771777

1778+
/**
1779+
* gpiochip_irq_domain_activate() - Lock a GPIO to be used as an IRQ
1780+
* @domain: The IRQ domain used by this IRQ chip
1781+
* @data: Outermost irq_data associated with the IRQ
1782+
* @reserve: If set, only reserve an interrupt vector instead of assigning one
1783+
*
1784+
* This function is a wrapper that calls gpiochip_lock_as_irq() and is to be
1785+
* used as the activate function for the &struct irq_domain_ops. The host_data
1786+
* for the IRQ domain must be the &struct gpio_chip.
1787+
*/
1788+
int gpiochip_irq_domain_activate(struct irq_domain *domain,
1789+
struct irq_data *data, bool reserve)
1790+
{
1791+
struct gpio_chip *chip = domain->host_data;
1792+
1793+
return gpiochip_lock_as_irq(chip, data->hwirq);
1794+
}
1795+
EXPORT_SYMBOL_GPL(gpiochip_irq_domain_activate);
1796+
1797+
/**
1798+
* gpiochip_irq_domain_deactivate() - Unlock a GPIO used as an IRQ
1799+
* @domain: The IRQ domain used by this IRQ chip
1800+
* @data: Outermost irq_data associated with the IRQ
1801+
*
1802+
* This function is a wrapper that will call gpiochip_unlock_as_irq() and is to
1803+
* be used as the deactivate function for the &struct irq_domain_ops. The
1804+
* host_data for the IRQ domain must be the &struct gpio_chip.
1805+
*/
1806+
void gpiochip_irq_domain_deactivate(struct irq_domain *domain,
1807+
struct irq_data *data)
1808+
{
1809+
struct gpio_chip *chip = domain->host_data;
1810+
1811+
return gpiochip_unlock_as_irq(chip, data->hwirq);
1812+
}
1813+
EXPORT_SYMBOL_GPL(gpiochip_irq_domain_deactivate);
1814+
17781815
static int gpiochip_to_irq(struct gpio_chip *chip, unsigned offset)
17791816
{
17801817
if (!gpiochip_irqchip_irq_valid(chip, offset))

0 commit comments

Comments
 (0)