Skip to content

Commit 78b2a23

Browse files
committed
Merge tag 'gpio-fixes-for-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski: - fix interrupt support in gpio-pca953x - fix configfs attribute locking in gpio-sim - limit the visibility of the GPIO_GRGPIO Kconfig symbol to OF systems only - update MAINTAINERS * tag 'gpio-fixes-for-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: MAINTAINERS: Use my kernel.org address for ACPI GPIO work gpio: GPIO_GRGPIO should depend on OF gpio: sim: lock hog configfs items if present gpio: pca953x: Improve interrupt support
2 parents 8c67da5 + 59ff204 commit 78b2a23

File tree

4 files changed

+10
-25
lines changed

4 files changed

+10
-25
lines changed

MAINTAINERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -9878,7 +9878,7 @@ S: Maintained
98789878
F: drivers/staging/gpib/
98799879

98809880
GPIO ACPI SUPPORT
9881-
M: Mika Westerberg <[email protected]>
9881+
M: Mika Westerberg <[email protected]>
98829882
M: Andy Shevchenko <[email protected]>
98839883
98849884

drivers/gpio/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ config GPIO_GRANITERAPIDS
338338

339339
config GPIO_GRGPIO
340340
tristate "Aeroflex Gaisler GRGPIO support"
341+
depends on OF || COMPILE_TEST
341342
select GPIO_GENERIC
342343
select IRQ_DOMAIN
343344
help

drivers/gpio/gpio-pca953x.c

-19
Original file line numberDiff line numberDiff line change
@@ -841,25 +841,6 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, unsigned long *pendin
841841
DECLARE_BITMAP(trigger, MAX_LINE);
842842
int ret;
843843

844-
if (chip->driver_data & PCA_PCAL) {
845-
/* Read the current interrupt status from the device */
846-
ret = pca953x_read_regs(chip, PCAL953X_INT_STAT, trigger);
847-
if (ret)
848-
return false;
849-
850-
/* Check latched inputs and clear interrupt status */
851-
ret = pca953x_read_regs(chip, chip->regs->input, cur_stat);
852-
if (ret)
853-
return false;
854-
855-
/* Apply filter for rising/falling edge selection */
856-
bitmap_replace(new_stat, chip->irq_trig_fall, chip->irq_trig_raise, cur_stat, gc->ngpio);
857-
858-
bitmap_and(pending, new_stat, trigger, gc->ngpio);
859-
860-
return !bitmap_empty(pending, gc->ngpio);
861-
}
862-
863844
ret = pca953x_read_regs(chip, chip->regs->input, cur_stat);
864845
if (ret)
865846
return false;

drivers/gpio/gpio-sim.c

+8-5
Original file line numberDiff line numberDiff line change
@@ -1028,20 +1028,23 @@ gpio_sim_device_lockup_configfs(struct gpio_sim_device *dev, bool lock)
10281028
struct configfs_subsystem *subsys = dev->group.cg_subsys;
10291029
struct gpio_sim_bank *bank;
10301030
struct gpio_sim_line *line;
1031+
struct config_item *item;
10311032

10321033
/*
1033-
* The device only needs to depend on leaf line entries. This is
1034+
* The device only needs to depend on leaf entries. This is
10341035
* sufficient to lock up all the configfs entries that the
10351036
* instantiated, alive device depends on.
10361037
*/
10371038
list_for_each_entry(bank, &dev->bank_list, siblings) {
10381039
list_for_each_entry(line, &bank->line_list, siblings) {
1040+
item = line->hog ? &line->hog->item
1041+
: &line->group.cg_item;
1042+
10391043
if (lock)
1040-
WARN_ON(configfs_depend_item_unlocked(
1041-
subsys, &line->group.cg_item));
1044+
WARN_ON(configfs_depend_item_unlocked(subsys,
1045+
item));
10421046
else
1043-
configfs_undepend_item_unlocked(
1044-
&line->group.cg_item);
1047+
configfs_undepend_item_unlocked(item);
10451048
}
10461049
}
10471050
}

0 commit comments

Comments
 (0)