Lines Matching +full:push +full:- +full:pull
1 // SPDX-License-Identifier: GPL-2.0+
145 return -EBUSY; in winbond_sio_enter()
206 * struct winbond_gpio_port_conflict - possibly conflicting device information
209 * is located (or WB_SIO_DEV_NONE - don't select any
226 * struct winbond_gpio_info - information about a particular GPIO port (device)
232 * @outputppbit: index of a push-pull output driver mode bit
361 *gpio_num -= 8; in winbond_gpio_get_info()
395 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_get()
397 val = winbond_sio_reg_btest(*base, info->datareg, offset); in winbond_gpio_get()
398 if (winbond_sio_reg_btest(*base, info->invreg, offset)) in winbond_gpio_get()
413 return -EACCES; in winbond_gpio_direction_in()
419 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_direction_in()
421 winbond_sio_reg_bset(*base, info->ioreg, offset); in winbond_gpio_direction_in()
437 return -EACCES; in winbond_gpio_direction_out()
443 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_direction_out()
445 winbond_sio_reg_bclear(*base, info->ioreg, offset); in winbond_gpio_direction_out()
447 if (winbond_sio_reg_btest(*base, info->invreg, offset)) in winbond_gpio_direction_out()
451 winbond_sio_reg_bset(*base, info->datareg, offset); in winbond_gpio_direction_out()
453 winbond_sio_reg_bclear(*base, info->datareg, offset); in winbond_gpio_direction_out()
472 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_set()
474 if (winbond_sio_reg_btest(*base, info->invreg, offset)) in winbond_gpio_set()
478 winbond_sio_reg_bset(*base, info->datareg, offset); in winbond_gpio_set()
480 winbond_sio_reg_bclear(*base, info->datareg, offset); in winbond_gpio_set()
486 .base = -1,
524 const struct winbond_gpio_port_conflict *conflict = &info->conflict; in winbond_gpio_configure_port()
527 if (conflict->name != NULL) { in winbond_gpio_configure_port()
528 if (conflict->dev != WB_SIO_DEV_NONE) in winbond_gpio_configure_port()
529 winbond_sio_select_logical(base, conflict->dev); in winbond_gpio_configure_port()
531 if (winbond_sio_reg_btest(base, conflict->testreg, in winbond_gpio_configure_port()
532 conflict->testbit)) { in winbond_gpio_configure_port()
533 if (conflict->warnonly) in winbond_gpio_configure_port()
535 idx + 1, conflict->name); in winbond_gpio_configure_port()
538 idx + 1, conflict->name); in winbond_gpio_configure_port()
550 winbond_sio_select_logical(base, info->dev); in winbond_gpio_configure_port()
552 winbond_sio_reg_bset(base, info->enablereg, info->enablebit); in winbond_gpio_configure_port()
555 winbond_sio_reg_bset(base, info->outputreg, in winbond_gpio_configure_port()
556 info->outputppbit); in winbond_gpio_configure_port()
558 winbond_sio_reg_bclear(base, info->outputreg, in winbond_gpio_configure_port()
559 info->outputppbit); in winbond_gpio_configure_port()
562 winbond_sio_reg_btest(base, info->outputreg, in winbond_gpio_configure_port()
563 info->outputppbit) ? in winbond_gpio_configure_port()
564 "push-pull" : in winbond_gpio_configure_port()
580 return -EINVAL; in winbond_gpio_configure()
603 ret = -ENODEV; in winbond_gpio_check_chip()
616 gpios_rem = params.gpios & ~GENMASK(ARRAY_SIZE(winbond_gpio_infos) - 1, in winbond_gpio_imatch()
625 pr_err("some GPIO ports are set both to push-pull and open drain mode at the same time\n"); in winbond_gpio_imatch()
640 if (ret != -ENODEV && ret != -EBUSY) in winbond_gpio_imatch()
652 return -EINVAL; in winbond_gpio_iprobe()
677 winbond_gpio_chip.ngpio -= (8 - 5); in winbond_gpio_iprobe()
696 "I/O port base (when unset - probe chip default ones)");
701 "bitmask of GPIO ports to enable (bit 0 - GPIO1, bit 1 - GPIO2, etc.");
705 * It can't be a one bitmask since we need three values per port: push-pull,
706 * open-drain and keep as-is (this is the default).
710 "bitmask of GPIO ports to set to push-pull mode (bit 0 - GPIO1, bit 1 - GPIO2, etc.");
714 "bitmask of GPIO ports to set to open drain mode (bit 0 - GPIO1, bit 1 - GPIO2, etc.");