Home | History | Annotate | Download | only in gpio

Lines Matching refs:regs

24 	struct gpio_regs *regs;
29 struct gpio_regs *regs;
32 static int imx_rgpio2p_is_output(struct gpio_regs *regs, int offset)
36 val = readl(&regs->gpio_pddr);
41 static void imx_rgpio2p_bank_direction(struct gpio_regs *regs, int offset,
46 l = readl(&regs->gpio_pddr);
55 writel(l, &regs->gpio_pddr);
58 static void imx_rgpio2p_bank_set_value(struct gpio_regs *regs, int offset,
62 writel((1 << offset), &regs->gpio_psor);
64 writel((1 << offset), &regs->gpio_pcor);
67 static int imx_rgpio2p_bank_get_value(struct gpio_regs *regs, int offset)
69 return (readl(&regs->gpio_pdir) >> offset) & 0x01;
77 imx_rgpio2p_bank_direction(bank->regs, offset, IMX_RGPIO2P_DIRECTION_IN);
88 imx_rgpio2p_bank_set_value(bank->regs, offset, value);
91 imx_rgpio2p_bank_direction(bank->regs, offset, IMX_RGPIO2P_DIRECTION_OUT);
100 return imx_rgpio2p_bank_get_value(bank->regs, offset);
108 imx_rgpio2p_bank_set_value(bank->regs, offset, value);
118 if (imx_rgpio2p_is_output(bank->regs, offset))
147 bank->regs = plat->regs;
185 plat->regs = (struct gpio_regs *)addr;