Add support to parse DT property "gpio-suspend-to-sfio" from
DT node of device which convert the pins in GPIO mode to
SFIO mode.
bug
1650903
Change-Id: Ia12e37de37f0dd1e376a7c1d840b3efc5a85dd00
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/785377
if (!ret)
chip->direction_output(chip, pval, 1);
}
+
+ count = of_property_count_u32(child, "gpio-suspend-to-sfio");
+ for (i = 0; i < count; ++i) {
+ found = true;
+ ret = of_property_read_u32_index(child,
+ "gpio-suspend-to-sfio", i, &pval);
+ if (!ret) {
+ if (chip->request)
+ chip->request(chip, pval);
+ if (chip->free)
+ chip->free(chip, pval);
+ }
+ }
+
if (found) {
statename = NULL;
/* Determine whether gpio-init-names property names the state */