Lines Matching refs:offset

41 static int rcar_gpio_get_value(struct udevice *dev, unsigned offset)  in rcar_gpio_get_value()  argument
44 const u32 bit = BIT(offset); in rcar_gpio_get_value()
56 static int rcar_gpio_set_value(struct udevice *dev, unsigned offset, in rcar_gpio_set_value() argument
62 setbits_le32(priv->regs + GPIO_OUTDT, BIT(offset)); in rcar_gpio_set_value()
64 clrbits_le32(priv->regs + GPIO_OUTDT, BIT(offset)); in rcar_gpio_set_value()
69 static void rcar_gpio_set_direction(void __iomem *regs, unsigned offset, in rcar_gpio_set_direction() argument
79 clrbits_le32(regs + GPIO_POSNEG, BIT(offset)); in rcar_gpio_set_direction()
82 clrbits_le32(regs + GPIO_IOINTSEL, BIT(offset)); in rcar_gpio_set_direction()
86 setbits_le32(regs + GPIO_INOUTSEL, BIT(offset)); in rcar_gpio_set_direction()
88 clrbits_le32(regs + GPIO_INOUTSEL, BIT(offset)); in rcar_gpio_set_direction()
91 static int rcar_gpio_direction_input(struct udevice *dev, unsigned offset) in rcar_gpio_direction_input() argument
95 rcar_gpio_set_direction(priv->regs, offset, false); in rcar_gpio_direction_input()
100 static int rcar_gpio_direction_output(struct udevice *dev, unsigned offset, in rcar_gpio_direction_output() argument
106 rcar_gpio_set_value(dev, offset, value); in rcar_gpio_direction_output()
107 rcar_gpio_set_direction(priv->regs, offset, true); in rcar_gpio_direction_output()
112 static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) in rcar_gpio_get_function() argument
116 if (readl(priv->regs + GPIO_INOUTSEL) & BIT(offset)) in rcar_gpio_get_function()
122 static int rcar_gpio_request(struct udevice *dev, unsigned offset, in rcar_gpio_request() argument
125 return pinctrl_gpio_request(dev, offset); in rcar_gpio_request()
128 static int rcar_gpio_free(struct udevice *dev, unsigned offset) in rcar_gpio_free() argument
130 return pinctrl_gpio_free(dev, offset); in rcar_gpio_free()