Lines Matching refs:offset
26 static int omnia_gpio_get_function(struct udevice *dev, uint offset)
30 switch (offset) {
33 switch (offset) {
62 static int omnia_gpio_get_value(struct udevice *dev, uint offset)
69 switch (offset) {
77 return !!(le16_to_cpu(val16) & BIT(offset));
89 return !!(le32_to_cpu(val32) & BIT(offset - 16));
103 return !!(le16_to_cpu(val16) & BIT(offset - 16 - 32));
110 static int omnia_gpio_set_value(struct udevice *dev, uint offset, int value)
116 switch (offset) {
119 switch (offset) {
148 valmask16[1] = cpu_to_le16(BIT(offset - 16 - 32));
159 static int omnia_gpio_direction_input(struct udevice *dev, uint offset)
163 ret = omnia_gpio_get_function(dev, offset);
172 static int omnia_gpio_direction_output(struct udevice *dev, uint offset, int value)
176 ret = omnia_gpio_get_function(dev, offset);
182 return omnia_gpio_set_value(dev, offset, value);
188 uint bank, gpio, flags, offset;
202 offset = gpio;
207 offset = 16 + gpio;
212 offset = 16 + 32 + gpio;
218 ret = omnia_gpio_get_function(dev, offset);
222 desc->offset = offset;