Lines Matching full:plat
46 static u32 reg_offs(struct mediatek_gpio_platdata *plat, int reg) in reg_offs() argument
48 return (reg * 0x10) + (plat->bank * 0x4); in reg_offs()
53 struct mediatek_gpio_platdata *plat = dev_get_platdata(dev); in mediatek_gpio_get_value() local
56 reg_offs(plat, GPIO_REG_DATA)) & BIT(offset)); in mediatek_gpio_get_value()
62 struct mediatek_gpio_platdata *plat = dev_get_platdata(dev); in mediatek_gpio_set_value() local
65 reg_offs(plat, value ? GPIO_REG_DSET : GPIO_REG_DCLR)); in mediatek_gpio_set_value()
72 struct mediatek_gpio_platdata *plat = dev_get_platdata(dev); in mediatek_gpio_direction_input() local
74 clrbits_le32(mediatek_gpio_membase + reg_offs(plat, GPIO_REG_CTRL), in mediatek_gpio_direction_input()
83 struct mediatek_gpio_platdata *plat = dev_get_platdata(dev); in mediatek_gpio_direction_output() local
85 setbits_le32(mediatek_gpio_membase + reg_offs(plat, GPIO_REG_CTRL), in mediatek_gpio_direction_output()
94 struct mediatek_gpio_platdata *plat = dev_get_platdata(dev); in mediatek_gpio_get_function() local
97 t = ioread32(mediatek_gpio_membase + reg_offs(plat, GPIO_REG_CTRL)); in mediatek_gpio_get_function()
114 struct mediatek_gpio_platdata *plat = dev_get_platdata(dev); in gpio_mediatek_probe() local
118 if (plat) { in gpio_mediatek_probe()
119 uc_priv->gpio_count = plat->gpio_count; in gpio_mediatek_probe()
120 uc_priv->bank_name = plat->bank_name; in gpio_mediatek_probe()
132 struct mediatek_gpio_platdata *plat = parent->platdata; in gpio_mediatek_bind() local
138 if (plat) in gpio_mediatek_bind()
147 struct mediatek_gpio_platdata *plat; in gpio_mediatek_bind() local
150 plat = calloc(1, sizeof(*plat)); in gpio_mediatek_bind()
151 if (!plat) in gpio_mediatek_bind()
153 plat->bank_name[0] = 'P'; in gpio_mediatek_bind()
154 plat->bank_name[1] = 'A' + bank; in gpio_mediatek_bind()
155 plat->bank_name[2] = '\0'; in gpio_mediatek_bind()
156 plat->gpio_count = MTK_BANK_WIDTH; in gpio_mediatek_bind()
157 plat->bank = bank; in gpio_mediatek_bind()
160 plat->bank_name, plat, -1, &dev); in gpio_mediatek_bind()