Lines Matching refs:offset
76 static int nca9539_gpio_get_direction(struct udevice *dev, unsigned int offset) in nca9539_gpio_get_direction() argument
78 unsigned int port = offset / NCA9539_BANK_SZ; in nca9539_gpio_get_direction()
79 unsigned int pin = offset % NCA9539_BANK_SZ; in nca9539_gpio_get_direction()
83 dev_dbg(dev, "%s offset(%d)\n", __func__, offset); in nca9539_gpio_get_direction()
87 offset); in nca9539_gpio_get_direction()
98 unsigned int offset) in nca9539_gpio_direction_input() argument
100 unsigned int port = offset / NCA9539_BANK_SZ; in nca9539_gpio_direction_input()
101 unsigned int pin = offset % NCA9539_BANK_SZ; in nca9539_gpio_direction_input()
105 dev_dbg(dev, "%s offset(%d)\n", __func__, offset); in nca9539_gpio_direction_input()
117 offset); in nca9539_gpio_direction_input()
124 unsigned int offset, int val) in nca9539_gpio_direction_output() argument
126 unsigned int port = offset / NCA9539_BANK_SZ; in nca9539_gpio_direction_output()
127 unsigned int pin = offset % NCA9539_BANK_SZ; in nca9539_gpio_direction_output()
131 dev_dbg(dev, "%s offset(%d) val(%d)\n", __func__, offset, val); in nca9539_gpio_direction_output()
141 offset); in nca9539_gpio_direction_output()
154 __func__, offset, val); in nca9539_gpio_direction_output()
160 static int nca9539_gpio_get(struct udevice *dev, unsigned int offset) in nca9539_gpio_get() argument
162 unsigned int port = offset / NCA9539_BANK_SZ; in nca9539_gpio_get()
163 unsigned int pin = offset % NCA9539_BANK_SZ; in nca9539_gpio_get()
168 dev_dbg(dev, "%s offset(%d)\n", __func__, offset); in nca9539_gpio_get()
172 offset); in nca9539_gpio_get()
182 offset); in nca9539_gpio_get()
189 static int nca9539_gpio_set(struct udevice *dev, unsigned int offset, int val) in nca9539_gpio_set() argument
191 unsigned int port = offset / NCA9539_BANK_SZ; in nca9539_gpio_set()
192 unsigned int pin = offset % NCA9539_BANK_SZ; in nca9539_gpio_set()
196 dev_dbg(dev, "%s offset(%d) val(%d)\n", __func__, offset, val); in nca9539_gpio_set()
200 __func__, offset, val); in nca9539_gpio_set()
213 __func__, offset, val); in nca9539_gpio_set()
219 static int nca9539_get_function(struct udevice *dev, unsigned offset) in nca9539_get_function() argument
221 return nca9539_gpio_get_direction(dev, offset); in nca9539_get_function()
227 desc->offset = args->args[0]; in nca9539_xlate()