GPIO fixes for v4.18:

- OF flag fix for special regulator flags.
 - Fix up the Uniphier IRQ callback.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJbXLz9AAoJEEEQszewGV1zVkQP+gNNAXmivj2Pd1faLHrInz68
 Dc5e45V4NAHUNFBo69H8I5oF3PesoftMEOBOtr+FAbxkvjxGLzQrILCSp8r2TOoj
 nAabeGv0DVyjgW6tLgjhYclNXcifvA4ICTDg7XdbfATthESoSVUbhvT35CGuUbOu
 +sGybPVDnZ6TVeNUToA1fGnSQpvsx5NgsDZ2nWbSIrtDTgx+2Nx7Ht7hDVn6hw8I
 uYP/CQkiF+oFvdlLVHzz9e1rZx5/E91Okvv+g//kK7pCFdkmhp7AbYCr8sHhVNeQ
 FcYLYoPPfyyxJWFAHWrjdTYCZelgEa+mRVV7gC0sIADYGpfTLhaXVr/ywPdtAakB
 IZXQ8Of9CtI+9k7cOBsrRdNclpfsH0YKXd4THyjJOGlJqeoTmu0H0cya933cz1De
 96PG+7lVlzSGcj2AxYjrQTIrg78vfRw3pcoc87x74J+YNzuYtYFdeYHKua/Rhax3
 WZOs+BeYZT12zsGmEky/CrdPppHs0j6wUrsIRa4k+a650G/hDoVo4+Lgv7J589NQ
 zEz7fnESXvaLPZsvDyehfIm+KgQ2tvMLahyes2F+SDg2mceNKiXFbpGP6pIeuu/V
 X5l2qBD7PyHGihKFOTZ8JC/RzJwSwEGPeDZiB9nuKd94NloUaMlXJjUwyfcU4VPf
 McTwzqK05zmaOcgH2XHO
 =ksOs
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Just a smallish OF fix and a driver fix:

   - OF flag fix for special regulator flags

   - fix up the Uniphier IRQ callback"

* tag 'gpio-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: uniphier: set legitimate irq trigger type in .to_irq hook
  gpio: of: Handle fixed regulator flags properly
This commit is contained in:
Linus Torvalds 2018-07-28 15:43:14 -07:00
commit 2ffb57dfa7
2 changed files with 7 additions and 2 deletions

View file

@ -181,7 +181,11 @@ static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
fwspec.fwnode = of_node_to_fwnode(chip->parent->of_node);
fwspec.param_count = 2;
fwspec.param[0] = offset - UNIPHIER_GPIO_IRQ_OFFSET;
fwspec.param[1] = IRQ_TYPE_NONE;
/*
* IRQ_TYPE_NONE is rejected by the parent irq domain. Set LEVEL_HIGH
* temporarily. Anyway, ->irq_set_type() will override it later.
*/
fwspec.param[1] = IRQ_TYPE_LEVEL_HIGH;
return irq_create_fwspec_mapping(&fwspec);
}

View file

@ -64,7 +64,8 @@ static void of_gpio_flags_quirks(struct device_node *np,
* Note that active low is the default.
*/
if (IS_ENABLED(CONFIG_REGULATOR) &&
(of_device_is_compatible(np, "reg-fixed-voltage") ||
(of_device_is_compatible(np, "regulator-fixed") ||
of_device_is_compatible(np, "reg-fixed-voltage") ||
of_device_is_compatible(np, "regulator-gpio"))) {
/*
* The regulator GPIO handles are specified such that the