Lines Matching refs:value
37 static int adnp_read(struct adnp *adnp, unsigned offset, uint8_t *value) in adnp_read() argument
48 *value = err; in adnp_read()
52 static int adnp_write(struct adnp *adnp, unsigned offset, uint8_t value) in adnp_write() argument
56 err = i2c_smbus_write_byte_data(adnp->client, offset, value); in adnp_write()
71 u8 value; in adnp_gpio_get() local
74 err = adnp_read(adnp, GPIO_PLR(adnp) + reg, &value); in adnp_gpio_get()
78 return (value & BIT(pos)) ? 1 : 0; in adnp_gpio_get()
81 static void __adnp_gpio_set(struct adnp *adnp, unsigned offset, int value) in __adnp_gpio_set() argument
92 if (value) in __adnp_gpio_set()
100 static void adnp_gpio_set(struct gpio_chip *chip, unsigned offset, int value) in adnp_gpio_set() argument
105 __adnp_gpio_set(adnp, offset, value); in adnp_gpio_set()
114 u8 value; in adnp_gpio_direction_input() local
119 err = adnp_read(adnp, GPIO_DDR(adnp) + reg, &value); in adnp_gpio_direction_input()
123 value &= ~BIT(pos); in adnp_gpio_direction_input()
125 err = adnp_write(adnp, GPIO_DDR(adnp) + reg, value); in adnp_gpio_direction_input()
129 err = adnp_read(adnp, GPIO_DDR(adnp) + reg, &value); in adnp_gpio_direction_input()
133 if (value & BIT(pos)) { in adnp_gpio_direction_input()
146 int value) in adnp_gpio_direction_output() argument
175 __adnp_gpio_set(adnp, offset, value); in adnp_gpio_direction_output()