Lines Matching refs:idx
30 int idx = 0; in stm32_offset_to_index() local
35 if (idx == offset) in stm32_offset_to_index()
36 return idx; in stm32_offset_to_index()
37 idx++; in stm32_offset_to_index()
50 int idx; in stm32_gpio_direction_input() local
52 idx = stm32_offset_to_index(dev, offset); in stm32_gpio_direction_input()
53 if (idx < 0) in stm32_gpio_direction_input()
54 return idx; in stm32_gpio_direction_input()
56 bits_index = MODE_BITS(idx); in stm32_gpio_direction_input()
71 int idx; in stm32_gpio_direction_output() local
73 idx = stm32_offset_to_index(dev, offset); in stm32_gpio_direction_output()
74 if (idx < 0) in stm32_gpio_direction_output()
75 return idx; in stm32_gpio_direction_output()
77 bits_index = MODE_BITS(idx); in stm32_gpio_direction_output()
82 writel(BSRR_BIT(idx, value), ®s->bsrr); in stm32_gpio_direction_output()
91 int idx; in stm32_gpio_get_value() local
93 idx = stm32_offset_to_index(dev, offset); in stm32_gpio_get_value()
94 if (idx < 0) in stm32_gpio_get_value()
95 return idx; in stm32_gpio_get_value()
97 return readl(®s->idr) & BIT(idx) ? 1 : 0; in stm32_gpio_get_value()
104 int idx; in stm32_gpio_set_value() local
106 idx = stm32_offset_to_index(dev, offset); in stm32_gpio_set_value()
107 if (idx < 0) in stm32_gpio_set_value()
108 return idx; in stm32_gpio_set_value()
110 writel(BSRR_BIT(idx, value), ®s->bsrr); in stm32_gpio_set_value()
121 int idx; in stm32_gpio_get_function() local
124 idx = stm32_offset_to_index(dev, offset); in stm32_gpio_get_function()
125 if (idx < 0) in stm32_gpio_get_function()
126 return idx; in stm32_gpio_get_function()
128 bits_index = MODE_BITS(idx); in stm32_gpio_get_function()