Lines Matching defs:port
89 #define NR_GPIO_MAX 32 /* Maximum pins per port */
117 int port;
127 if (!ofw_bus_is_compatible(dev, "snps,dw-apb-gpio-port"))
149 if ((OF_getencprop(sc->node, "reg", &sc->port, sizeof(sc->port))) <= 0)
152 printf("port %d\n", sc->port);
160 nr_pins = (cfg2 >> ENCODED_ID_PWIDTH_S(sc->port)) & \
168 (READ4(sc, GPIO_SWPORT_DDR(sc->port)) & (1 << i)) ?
286 *val = (READ4(sc, GPIO_EXT_PORT(sc->port)) & (1 << i)) ? 1 : 0;
309 reg = READ4(sc, GPIO_SWPORT_DR(sc->port));
314 WRITE4(sc, GPIO_SWPORT_DR(sc->port), reg);
333 reg = READ4(sc, GPIO_SWPORT_DDR(sc->port));
345 WRITE4(sc, GPIO_SWPORT_DDR(sc->port), reg);
388 reg = READ4(sc, GPIO_SWPORT_DR(sc->port));
393 WRITE4(sc, GPIO_SWPORT_DR(sc->port), reg);