Lines Matching full:gpios
44 * of_gpio_named_count() - Count GPIOs for a device
45 * @np: device node to count GPIOs for
48 * The function returns the count of GPIOs specified for a node.
52 * Either number of GPIOs defined in the property, or
53 * * %-EINVAL for an incorrectly formed "gpios" property, or
54 * * %-ENOENT for a missing "gpios" property.
58 * gpios = <0
63 * The above example defines four GPIOs, two of which are not specified.
79 * established "cs-gpios" for chip selects but instead rely on
80 * "gpios" for the chip select lines. If we detect this, we redirect
81 * the counting of "cs-gpios" to count "gpios" transparent to the
85 * Either number of GPIOs defined in the property, or
86 * * %-EINVAL for an incorrectly formed "gpios" property, or
87 * * %-ENOENT for a missing "gpios" property.
100 return of_gpio_named_count(np, "gpios"); in of_gpio_spi_cs_get_count()
187 } gpios[] = { in of_gpio_try_fixup_polarity() local
191 * "gpios-reset" property and also specified wrong in of_gpio_try_fixup_polarity()
194 { "himax,hx8357", "gpios-reset", false }, in of_gpio_try_fixup_polarity()
195 { "himax,hx8369", "gpios-reset", false }, in of_gpio_try_fixup_polarity()
197 * The rb-gpios semantics was undocumented and qi,lb60 (along with in of_gpio_try_fixup_polarity()
204 { "qi,lb60", "rb-gpios", true }, in of_gpio_try_fixup_polarity()
222 { "ti,tsc2005", "reset-gpios", false }, in of_gpio_try_fixup_polarity()
227 for (i = 0; i < ARRAY_SIZE(gpios); i++) { in of_gpio_try_fixup_polarity()
228 if (of_device_is_compatible(np, gpios[i].compatible) && in of_gpio_try_fixup_polarity()
229 !strcmp(propname, gpios[i].propname)) { in of_gpio_try_fixup_polarity()
230 of_gpio_quirk_polarity(np, gpios[i].active_high, flags); in of_gpio_try_fixup_polarity()
246 } gpios[] = { in of_gpio_set_polarity_by_property() local
249 { "fsl,imx25-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
250 { "fsl,imx27-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
251 { "fsl,imx28-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
252 { "fsl,imx6q-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
253 { "fsl,mvf600-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
254 { "fsl,imx6sx-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
255 { "fsl,imx6ul-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
256 { "fsl,imx8mq-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
257 { "fsl,imx8qm-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
258 { "fsl,s32v234-fec", "phy-reset-gpios", "phy-reset-active-high" }, in of_gpio_set_polarity_by_property()
277 { "regulator-fixed", "gpios", "enable-active-high" }, in of_gpio_set_polarity_by_property()
279 { "reg-fixed-voltage", "gpios", "enable-active-high" }, in of_gpio_set_polarity_by_property()
284 { "regulator-gpio", "enable-gpios", "enable-active-high" }, in of_gpio_set_polarity_by_property()
287 { "atmel,hsmci", "cd-gpios", "cd-inverted" }, in of_gpio_set_polarity_by_property()
304 for (i = 0; i < ARRAY_SIZE(gpios); i++) { in of_gpio_set_polarity_by_property()
305 if (of_device_is_compatible(np_compat, gpios[i].compatible) && in of_gpio_set_polarity_by_property()
306 !strcmp(propname, gpios[i].gpio_propname)) { in of_gpio_set_polarity_by_property()
308 gpios[i].polarity_propname); in of_gpio_set_polarity_by_property()
336 * property named "cs-gpios" we need to inspect the child node in of_gpio_flags_quirks()
339 if (IS_ENABLED(CONFIG_SPI_MASTER) && !strcmp(propname, "cs-gpios") && in of_gpio_flags_quirks()
340 of_property_present(np, "cs-gpios")) { in of_gpio_flags_quirks()
501 } gpios[] = { in of_find_gpio_rename() local
503 /* Himax LCD controllers used "gpios-reset" */ in of_find_gpio_rename()
504 { "reset", "gpios-reset", "himax,hx8357" }, in of_find_gpio_rename()
505 { "reset", "gpios-reset", "himax,hx8369" }, in of_find_gpio_rename()
533 * "foo-gpios" so we have this special kludge for them. in of_find_gpio_rename()
561 * "foo-gpios" so we have this special kludge for them. in of_find_gpio_rename()
569 * The old Freescale bindings use simply "gpios" as name in of_find_gpio_rename()
570 * for the chip select lines rather than "cs-gpios" like in of_find_gpio_rename()
575 { "cs", "gpios", "fsl,spi" }, in of_find_gpio_rename()
576 { "cs", "gpios", "aeroflexgaisler,spictrl" }, in of_find_gpio_rename()
579 { "cs", "gpios", "ibm,ppc4xx-spi" }, in of_find_gpio_rename()
585 * property without the compulsory "-gpios" suffix. in of_find_gpio_rename()
597 for (i = 0; i < ARRAY_SIZE(gpios); i++) { in of_find_gpio_rename()
598 if (strcmp(con_id, gpios[i].con_id)) in of_find_gpio_rename()
601 if (gpios[i].compatible && in of_find_gpio_rename()
602 !of_device_is_compatible(np, gpios[i].compatible)) in of_find_gpio_rename()
605 legacy_id = gpios[i].legacy_id ?: gpios[i].con_id; in of_find_gpio_rename()
608 pr_info("%s uses legacy gpio name '%s' instead of '%s-gpios'\n", in of_find_gpio_rename()
643 pr_info("%s is using legacy gpio name '%s' instead of '%s-gpios'\n", in of_find_mt2701_gpio()
653 * we allow looking something up that is not named "foo-gpios".
695 /* Try GPIO property "foo-gpios" and "foo-gpio" */ in of_find_gpio()
758 ret = of_property_read_u32_index(np, "gpios", idx * tmp + i, in of_parse_own_gpio()
991 * to manage GPIOs from the callbacks.