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-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
"Two GPIO fixes for the v3.9 series:
- Fix erroneous return value in the ICH driver
- Make the STMPE driver proper properly on device tree boots"

* tag 'gpio-fixes-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
gpio: stmpe: pass DT node to irqdomain
gpio-ich: Fix value returned by ichx_gpio_request

+12 -5
+1 -1
drivers/gpio/gpio-ich.c
··· 214 214 * If it can't be trusted, assume that the pin can be used as a GPIO. 215 215 */ 216 216 if (ichx_priv.desc->use_sel_ignore[nr / 32] & (1 << (nr & 0x1f))) 217 - return 1; 217 + return 0; 218 218 219 219 return ichx_read_bit(GPIO_USE_SEL, nr) ? 0 : -ENODEV; 220 220 }
+11 -4
drivers/gpio/gpio-stmpe.c
··· 307 307 .xlate = irq_domain_xlate_twocell, 308 308 }; 309 309 310 - static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio) 310 + static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio, 311 + struct device_node *np) 311 312 { 312 - int base = stmpe_gpio->irq_base; 313 + int base = 0; 313 314 314 - stmpe_gpio->domain = irq_domain_add_simple(NULL, 315 + if (!np) 316 + base = stmpe_gpio->irq_base; 317 + 318 + stmpe_gpio->domain = irq_domain_add_simple(np, 315 319 stmpe_gpio->chip.ngpio, base, 316 320 &stmpe_gpio_irq_simple_ops, stmpe_gpio); 317 321 if (!stmpe_gpio->domain) { ··· 350 346 stmpe_gpio->chip = template_chip; 351 347 stmpe_gpio->chip.ngpio = stmpe->num_gpios; 352 348 stmpe_gpio->chip.dev = &pdev->dev; 349 + #ifdef CONFIG_OF 350 + stmpe_gpio->chip.of_node = np; 351 + #endif 353 352 stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1; 354 353 355 354 if (pdata) ··· 373 366 goto out_free; 374 367 375 368 if (irq >= 0) { 376 - ret = stmpe_gpio_irq_init(stmpe_gpio); 369 + ret = stmpe_gpio_irq_init(stmpe_gpio, np); 377 370 if (ret) 378 371 goto out_disable; 379 372