Lines Matching refs:dr
68 static int gpio_read_bit(struct pinmux_data_reg *dr, in gpio_read_bit() argument
74 pos = dr->reg_width - (in_pos + 1); in gpio_read_bit()
77 dr->reg + offset, pos, dr->reg_width); in gpio_read_bit()
79 return (gpio_read_raw_reg(dr->mapped_reg + offset, in gpio_read_bit()
80 dr->reg_width) >> pos) & 1; in gpio_read_bit()
83 static void gpio_write_bit(struct pinmux_data_reg *dr, in gpio_write_bit() argument
88 pos = dr->reg_width - (in_pos + 1); in gpio_write_bit()
92 dr->reg, !!value, pos, dr->reg_width); in gpio_write_bit()
95 __set_bit(pos, &dr->reg_shadow); in gpio_write_bit()
97 __clear_bit(pos, &dr->reg_shadow); in gpio_write_bit()
99 gpio_write_raw_reg(dr->mapped_reg, dr->reg_width, dr->reg_shadow); in gpio_write_bit()
545 struct pinmux_data_reg *dr = NULL; in sh_gpio_set_value() local
548 if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0) in sh_gpio_set_value()
551 gpio_write_bit(dr, bit, value); in sh_gpio_set_value()
562 struct pinmux_data_reg *dr = NULL; in sh_gpio_get_value() local
565 if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0) in sh_gpio_get_value()
572 return gpio_read_bit(dr, offset, bit); in sh_gpio_get_value()