Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-fixes-for-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

- correct the ACPI GPIO access mode in gpio-loongson-64bit

- only obtain the interrupt for a single instance of the chip
controlled by gpio-mlxbf3

- fix an invalid value return from probe() in gpio-pca953x

- add missing MODULE_DEVICE_TABLE() to gpio-spacemit

- update the HiSilicon GPIO driver maintainer entry

* tag 'gpio-fixes-for-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio: mlxbf3: only get IRQ for device instance 0
gpio: pca953x: fix wrong error probe return value
gpio: spacemit: Add missing MODULE_DEVICE_TABLE
gpio: loongson-64bit: Correct Loongson-7A2000 ACPI GPIO access mode
MAINTAINERS: Update HiSilicon GPIO driver maintainer

+38 -21
+1 -1
MAINTAINERS
··· 10839 10839 F: drivers/dma/hisi_dma.c 10840 10840 10841 10841 HISILICON GPIO DRIVER 10842 - M: Jay Fang <f.fangjian@huawei.com> 10842 + M: Yang Shen <shenyang39@huawei.com> 10843 10843 L: linux-gpio@vger.kernel.org 10844 10844 S: Maintained 10845 10845 F: Documentation/devicetree/bindings/gpio/hisilicon,ascend910-gpio.yaml
+1 -1
drivers/gpio/gpio-loongson-64bit.c
··· 268 268 /* LS7A2000 ACPI GPIO */ 269 269 static const struct loongson_gpio_chip_data loongson_gpio_ls7a2000_data1 = { 270 270 .label = "ls7a2000_gpio", 271 - .mode = BYTE_CTRL_MODE, 271 + .mode = BIT_CTRL_MODE, 272 272 .conf_offset = 0x4, 273 273 .in_offset = 0x8, 274 274 .out_offset = 0x0,
+34 -18
drivers/gpio/gpio-mlxbf3.c
··· 190 190 struct mlxbf3_gpio_context *gs; 191 191 struct gpio_irq_chip *girq; 192 192 struct gpio_chip *gc; 193 + char *colon_ptr; 193 194 int ret, irq; 195 + long num; 194 196 195 197 gs = devm_kzalloc(dev, sizeof(*gs), GFP_KERNEL); 196 198 if (!gs) ··· 229 227 gc->owner = THIS_MODULE; 230 228 gc->add_pin_ranges = mlxbf3_gpio_add_pin_ranges; 231 229 232 - irq = platform_get_irq(pdev, 0); 233 - if (irq >= 0) { 234 - girq = &gs->gc.irq; 235 - gpio_irq_chip_set_chip(girq, &gpio_mlxbf3_irqchip); 236 - girq->default_type = IRQ_TYPE_NONE; 237 - /* This will let us handle the parent IRQ in the driver */ 238 - girq->num_parents = 0; 239 - girq->parents = NULL; 240 - girq->parent_handler = NULL; 241 - girq->handler = handle_bad_irq; 230 + colon_ptr = strchr(dev_name(dev), ':'); 231 + if (!colon_ptr) { 232 + dev_err(dev, "invalid device name format\n"); 233 + return -EINVAL; 234 + } 242 235 243 - /* 244 - * Directly request the irq here instead of passing 245 - * a flow-handler because the irq is shared. 246 - */ 247 - ret = devm_request_irq(dev, irq, mlxbf3_gpio_irq_handler, 248 - IRQF_SHARED, dev_name(dev), gs); 249 - if (ret) 250 - return dev_err_probe(dev, ret, "failed to request IRQ"); 236 + ret = kstrtol(++colon_ptr, 16, &num); 237 + if (ret) { 238 + dev_err(dev, "invalid device instance\n"); 239 + return ret; 240 + } 241 + 242 + if (!num) { 243 + irq = platform_get_irq(pdev, 0); 244 + if (irq >= 0) { 245 + girq = &gs->gc.irq; 246 + gpio_irq_chip_set_chip(girq, &gpio_mlxbf3_irqchip); 247 + girq->default_type = IRQ_TYPE_NONE; 248 + /* This will let us handle the parent IRQ in the driver */ 249 + girq->num_parents = 0; 250 + girq->parents = NULL; 251 + girq->parent_handler = NULL; 252 + girq->handler = handle_bad_irq; 253 + 254 + /* 255 + * Directly request the irq here instead of passing 256 + * a flow-handler because the irq is shared. 257 + */ 258 + ret = devm_request_irq(dev, irq, mlxbf3_gpio_irq_handler, 259 + IRQF_SHARED, dev_name(dev), gs); 260 + if (ret) 261 + return dev_err_probe(dev, ret, "failed to request IRQ"); 262 + } 251 263 } 252 264 253 265 platform_set_drvdata(pdev, gs);
+1 -1
drivers/gpio/gpio-pca953x.c
··· 974 974 IRQF_ONESHOT | IRQF_SHARED, dev_name(dev), 975 975 chip); 976 976 if (ret) 977 - return dev_err_probe(dev, client->irq, "failed to request irq\n"); 977 + return dev_err_probe(dev, ret, "failed to request irq\n"); 978 978 979 979 return 0; 980 980 }
+1
drivers/gpio/gpio-spacemit-k1.c
··· 278 278 { .compatible = "spacemit,k1-gpio" }, 279 279 { /* sentinel */ } 280 280 }; 281 + MODULE_DEVICE_TABLE(of, spacemit_gpio_dt_ids); 281 282 282 283 static struct platform_driver spacemit_gpio_driver = { 283 284 .probe = spacemit_gpio_probe,