Lines Matching full:plat

46 	struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);  in dwapb_gpio_direction_input()  local
48 clrbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); in dwapb_gpio_direction_input()
55 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_direction_output() local
57 setbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); in dwapb_gpio_direction_output()
60 setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_direction_output()
62 clrbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_direction_output()
69 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_get_value() local
70 return !!(readl(plat->base + GPIO_EXT_PORT(plat->bank)) & (1 << pin)); in dwapb_gpio_get_value()
76 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_set_value() local
79 setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_set_value()
81 clrbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_set_value()
88 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_get_function() local
91 gpio = readl(plat->base + GPIO_SWPORT_DDR(plat->bank)); in dwapb_gpio_get_function()
137 struct gpio_dwapb_platdata *plat = dev->platdata; in gpio_dwapb_probe() local
139 if (!plat) { in gpio_dwapb_probe()
144 priv->gpio_count = plat->pins; in gpio_dwapb_probe()
145 priv->bank_name = plat->name; in gpio_dwapb_probe()
152 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in gpio_dwapb_bind() local
159 if (plat) in gpio_dwapb_bind()
174 plat = devm_kcalloc(dev, 1, sizeof(*plat), GFP_KERNEL); in gpio_dwapb_bind()
175 if (!plat) in gpio_dwapb_bind()
178 plat->base = base; in gpio_dwapb_bind()
179 plat->bank = bank; in gpio_dwapb_bind()
180 plat->pins = fdtdec_get_int(blob, node, "snps,nr-gpios", 0); in gpio_dwapb_bind()
181 plat->name = fdt_stringlist_get(blob, node, "bank-name", 0, in gpio_dwapb_bind()
183 if (!plat->name) { in gpio_dwapb_bind()
188 plat->name = fdt_get_name(blob, node, NULL); in gpio_dwapb_bind()
191 ret = device_bind(dev, dev->driver, plat->name, in gpio_dwapb_bind()
192 plat, -1, &subdev); in gpio_dwapb_bind()
205 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in gpio_dwapb_remove() local
208 if (!plat && priv) in gpio_dwapb_remove()