Lines Matching refs:bit
73 unsigned bit = ADP5588_BIT(off); in adp5588_gpio_get_value() local
78 if (dev->dir[bank] & bit) in adp5588_gpio_get_value()
85 return !!(val & bit); in adp5588_gpio_get_value()
91 unsigned bank, bit; in adp5588_gpio_set_value() local
96 bit = ADP5588_BIT(off); in adp5588_gpio_set_value()
100 dev->dat_out[bank] |= bit; in adp5588_gpio_set_value()
102 dev->dat_out[bank] &= ~bit; in adp5588_gpio_set_value()
130 unsigned bank, bit; in adp5588_gpio_direction_output() local
135 bit = ADP5588_BIT(off); in adp5588_gpio_direction_output()
138 dev->dir[bank] |= bit; in adp5588_gpio_direction_output()
141 dev->dat_out[bank] |= bit; in adp5588_gpio_direction_output()
143 dev->dat_out[bank] &= ~bit; in adp5588_gpio_direction_output()
228 unsigned bank, bit; in adp5588_irq_set_type() local
237 bit = ADP5588_BIT(gpio); in adp5588_irq_set_type()
240 dev->int_lvl[bank] |= bit; in adp5588_irq_set_type()
242 dev->int_lvl[bank] &= ~bit; in adp5588_irq_set_type()
246 dev->int_input_en[bank] |= bit; in adp5588_irq_set_type()
273 unsigned status, bank, bit, pending; in adp5588_irq_handler() local
282 for (bank = 0, bit = 0; bank <= ADP5588_BANK(ADP5588_MAXGPIO); in adp5588_irq_handler()
283 bank++, bit = 0) { in adp5588_irq_handler()
287 if (pending & (1 << bit)) { in adp5588_irq_handler()
289 (bank << 3) + bit); in adp5588_irq_handler()
290 pending &= ~(1 << bit); in adp5588_irq_handler()
293 bit++; in adp5588_irq_handler()