Lines Matching refs:tc3589x_gpio

27 struct tc3589x_gpio {  struct
39 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); in tc3589x_gpio_get() argument
40 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_get()
54 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); in tc3589x_gpio_set() local
55 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_set()
66 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); in tc3589x_gpio_direction_output() local
67 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_direction_output()
79 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); in tc3589x_gpio_direction_input() local
80 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_direction_input()
90 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); in tc3589x_gpio_get_direction() local
91 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_get_direction()
109 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); in tc3589x_gpio_set_config() local
110 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_set_config()
160 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc); in tc3589x_gpio_irq_set_type() local
166 tc3589x_gpio->regs[REG_IBE][regoffset] |= mask; in tc3589x_gpio_irq_set_type()
170 tc3589x_gpio->regs[REG_IBE][regoffset] &= ~mask; in tc3589x_gpio_irq_set_type()
173 tc3589x_gpio->regs[REG_IS][regoffset] |= mask; in tc3589x_gpio_irq_set_type()
175 tc3589x_gpio->regs[REG_IS][regoffset] &= ~mask; in tc3589x_gpio_irq_set_type()
178 tc3589x_gpio->regs[REG_IEV][regoffset] |= mask; in tc3589x_gpio_irq_set_type()
180 tc3589x_gpio->regs[REG_IEV][regoffset] &= ~mask; in tc3589x_gpio_irq_set_type()
188 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc); in tc3589x_gpio_irq_lock() local
190 mutex_lock(&tc3589x_gpio->irq_lock); in tc3589x_gpio_irq_lock()
196 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc); in tc3589x_gpio_irq_sync_unlock() local
197 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_irq_sync_unlock()
209 u8 old = tc3589x_gpio->oldregs[i][j]; in tc3589x_gpio_irq_sync_unlock()
210 u8 new = tc3589x_gpio->regs[i][j]; in tc3589x_gpio_irq_sync_unlock()
215 tc3589x_gpio->oldregs[i][j] = new; in tc3589x_gpio_irq_sync_unlock()
220 mutex_unlock(&tc3589x_gpio->irq_lock); in tc3589x_gpio_irq_sync_unlock()
226 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc); in tc3589x_gpio_irq_mask() local
231 tc3589x_gpio->regs[REG_IE][regoffset] &= ~mask; in tc3589x_gpio_irq_mask()
232 tc3589x_gpio->regs[REG_DIRECT][regoffset] |= mask; in tc3589x_gpio_irq_mask()
238 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(gc); in tc3589x_gpio_irq_unmask() local
243 tc3589x_gpio->regs[REG_IE][regoffset] |= mask; in tc3589x_gpio_irq_unmask()
244 tc3589x_gpio->regs[REG_DIRECT][regoffset] &= ~mask; in tc3589x_gpio_irq_unmask()
258 struct tc3589x_gpio *tc3589x_gpio = dev; in tc3589x_gpio_irq() local
259 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; in tc3589x_gpio_irq()
277 int irq = irq_find_mapping(tc3589x_gpio->chip.irq.domain, in tc3589x_gpio_irq()
294 struct tc3589x_gpio *tc3589x_gpio; in tc3589x_gpio_probe() local
308 tc3589x_gpio = devm_kzalloc(&pdev->dev, sizeof(struct tc3589x_gpio), in tc3589x_gpio_probe()
310 if (!tc3589x_gpio) in tc3589x_gpio_probe()
313 mutex_init(&tc3589x_gpio->irq_lock); in tc3589x_gpio_probe()
315 tc3589x_gpio->dev = &pdev->dev; in tc3589x_gpio_probe()
316 tc3589x_gpio->tc3589x = tc3589x; in tc3589x_gpio_probe()
318 tc3589x_gpio->chip = template_chip; in tc3589x_gpio_probe()
319 tc3589x_gpio->chip.ngpio = tc3589x->num_gpio; in tc3589x_gpio_probe()
320 tc3589x_gpio->chip.parent = &pdev->dev; in tc3589x_gpio_probe()
321 tc3589x_gpio->chip.base = -1; in tc3589x_gpio_probe()
322 tc3589x_gpio->chip.of_node = np; in tc3589x_gpio_probe()
324 girq = &tc3589x_gpio->chip.irq; in tc3589x_gpio_probe()
354 tc3589x_gpio); in tc3589x_gpio_probe()
360 ret = devm_gpiochip_add_data(&pdev->dev, &tc3589x_gpio->chip, in tc3589x_gpio_probe()
361 tc3589x_gpio); in tc3589x_gpio_probe()
367 platform_set_drvdata(pdev, tc3589x_gpio); in tc3589x_gpio_probe()