Skip to content

Commit 891abe6

Browse files
AaronDotKexyBiscuit
authored andcommitted
FROMGIT: gpio: loongson-64bit: Extend GPIO irq support
Add the interrupt enable register offset (inten_offset) so that GPIO interrupts can be enabled normally on more models. According to the latest interface specifications, the definition of GPIO interrupts in ACPI is similar to that in FDT. The GPIO interrupts are listed one by one according to the GPIO number, and the corresponding interrupt number can be obtained directly through the GPIO number specified by the consumer. Signed-off-by: Xi Ruoyao <[email protected]> Signed-off-by: Binbin Zhou <[email protected]> Reviewed-by: Huacai Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski <[email protected]> (cherry picked from commit 27cb8f7 https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next) Signed-off-by: Kexy Biscuit <[email protected]>
1 parent 448014d commit 891abe6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpio/gpio-loongson-64bit.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data0 = {
222222
.conf_offset = 0x0,
223223
.in_offset = 0xc,
224224
.out_offset = 0x8,
225+
.inten_offset = 0x14,
225226
};
226227

227228
static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data1 = {
@@ -230,6 +231,7 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data1 = {
230231
.conf_offset = 0x0,
231232
.in_offset = 0x20,
232233
.out_offset = 0x10,
234+
.inten_offset = 0x30,
233235
};
234236

235237
static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data2 = {
@@ -246,6 +248,7 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls3a5000_data = {
246248
.conf_offset = 0x0,
247249
.in_offset = 0xc,
248250
.out_offset = 0x8,
251+
.inten_offset = 0x14,
249252
};
250253

251254
static const struct loongson_gpio_chip_data loongson_gpio_ls7a_data = {
@@ -254,6 +257,7 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls7a_data = {
254257
.conf_offset = 0x800,
255258
.in_offset = 0xa00,
256259
.out_offset = 0x900,
260+
.inten_offset = 0xb00,
257261
};
258262

259263
/* LS7A2000 chipset GPIO */
@@ -263,6 +267,7 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls7a2000_data0 = {
263267
.conf_offset = 0x800,
264268
.in_offset = 0xa00,
265269
.out_offset = 0x900,
270+
.inten_offset = 0xb00,
266271
};
267272

268273
/* LS7A2000 ACPI GPIO */
@@ -281,6 +286,7 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls3a6000_data = {
281286
.conf_offset = 0x0,
282287
.in_offset = 0xc,
283288
.out_offset = 0x8,
289+
.inten_offset = 0x14,
284290
};
285291

286292
static const struct of_device_id loongson_gpio_of_match[] = {

0 commit comments

Comments
 (0)