Lines Matching refs:plat
44 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_direction_input() local
46 clrbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); in dwapb_gpio_direction_input()
53 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_direction_output() local
55 setbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); in dwapb_gpio_direction_output()
58 setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_direction_output()
60 clrbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_direction_output()
67 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_get_value() local
68 return !!(readl(plat->base + GPIO_EXT_PORT(plat->bank)) & (1 << pin)); in dwapb_gpio_get_value()
74 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_set_value() local
77 setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_set_value()
79 clrbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_set_value()
86 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in dwapb_gpio_get_function() local
89 gpio = readl(plat->base + GPIO_SWPORT_DDR(plat->bank)); in dwapb_gpio_get_function()
135 struct gpio_dwapb_platdata *plat = dev->platdata; in gpio_dwapb_probe() local
137 if (!plat) { in gpio_dwapb_probe()
142 priv->gpio_count = plat->pins; in gpio_dwapb_probe()
143 priv->bank_name = plat->name; in gpio_dwapb_probe()
150 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in gpio_dwapb_bind() local
157 if (plat) in gpio_dwapb_bind()
171 plat = devm_kcalloc(dev, 1, sizeof(*plat), GFP_KERNEL); in gpio_dwapb_bind()
172 if (!plat) in gpio_dwapb_bind()
175 plat->base = base; in gpio_dwapb_bind()
176 plat->bank = bank; in gpio_dwapb_bind()
177 plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0); in gpio_dwapb_bind()
180 &plat->name)) { in gpio_dwapb_bind()
185 plat->name = ofnode_get_name(node); in gpio_dwapb_bind()
188 ret = device_bind_ofnode(dev, dev->driver, plat->name, in gpio_dwapb_bind()
189 plat, node, &subdev); in gpio_dwapb_bind()
201 struct gpio_dwapb_platdata *plat = dev_get_platdata(dev); in gpio_dwapb_remove() local
204 if (!plat && priv) in gpio_dwapb_remove()