Lines Matching +full:co +full:- +full:located
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
211 * @testreg: register number where the testbit bit is located
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()
396 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_get()
398 val = winbond_sio_reg_btest(*base, info->datareg, offset); in winbond_gpio_get()
399 if (winbond_sio_reg_btest(*base, info->invreg, offset)) in winbond_gpio_get()
414 return -EACCES; in winbond_gpio_direction_in()
420 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_direction_in()
422 winbond_sio_reg_bset(*base, info->ioreg, offset); in winbond_gpio_direction_in()
438 return -EACCES; in winbond_gpio_direction_out()
444 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_direction_out()
446 winbond_sio_reg_bclear(*base, info->ioreg, offset); in winbond_gpio_direction_out()
448 if (winbond_sio_reg_btest(*base, info->invreg, offset)) in winbond_gpio_direction_out()
452 winbond_sio_reg_bset(*base, info->datareg, offset); in winbond_gpio_direction_out()
454 winbond_sio_reg_bclear(*base, info->datareg, offset); in winbond_gpio_direction_out()
473 winbond_sio_select_logical(*base, info->dev); in winbond_gpio_set()
475 if (winbond_sio_reg_btest(*base, info->invreg, offset)) in winbond_gpio_set()
479 winbond_sio_reg_bset(*base, info->datareg, offset); in winbond_gpio_set()
481 winbond_sio_reg_bclear(*base, info->datareg, offset); in winbond_gpio_set()
487 .base = -1,
525 const struct winbond_gpio_port_conflict *conflict = &info->conflict; in winbond_gpio_configure_port()
528 if (conflict->name != NULL) { in winbond_gpio_configure_port()
529 if (conflict->dev != WB_SIO_DEV_NONE) in winbond_gpio_configure_port()
530 winbond_sio_select_logical(base, conflict->dev); in winbond_gpio_configure_port()
532 if (winbond_sio_reg_btest(base, conflict->testreg, in winbond_gpio_configure_port()
533 conflict->testbit)) { in winbond_gpio_configure_port()
534 if (conflict->warnonly) in winbond_gpio_configure_port()
536 idx + 1, conflict->name); in winbond_gpio_configure_port()
539 idx + 1, conflict->name); in winbond_gpio_configure_port()
551 winbond_sio_select_logical(base, info->dev); in winbond_gpio_configure_port()
553 winbond_sio_reg_bset(base, info->enablereg, info->enablebit); in winbond_gpio_configure_port()
556 winbond_sio_reg_bset(base, info->outputreg, in winbond_gpio_configure_port()
557 info->outputppbit); in winbond_gpio_configure_port()
559 winbond_sio_reg_bclear(base, info->outputreg, in winbond_gpio_configure_port()
560 info->outputppbit); in winbond_gpio_configure_port()
563 winbond_sio_reg_btest(base, info->outputreg, in winbond_gpio_configure_port()
564 info->outputppbit) ? in winbond_gpio_configure_port()
565 "push-pull" : in winbond_gpio_configure_port()
581 return -EINVAL; in winbond_gpio_configure()
604 ret = -ENODEV; in winbond_gpio_check_chip()
617 gpios_rem = params.gpios & ~GENMASK(ARRAY_SIZE(winbond_gpio_infos) - 1, in winbond_gpio_imatch()
626 pr_err("some GPIO ports are set both to push-pull and open drain mode at the same time\n"); in winbond_gpio_imatch()
641 if (ret != -ENODEV && ret != -EBUSY) in winbond_gpio_imatch()
653 return -EINVAL; in winbond_gpio_iprobe()
669 * winbond_gpio_configure() & co. due to, for example, a pin conflict). in winbond_gpio_iprobe()
678 winbond_gpio_chip.ngpio -= (8 - 5); in winbond_gpio_iprobe()
697 "I/O port base (when unset - probe chip default ones)");
702 "bitmask of GPIO ports to enable (bit 0 - GPIO1, bit 1 - GPIO2, etc.");
706 * It can't be a one bitmask since we need three values per port: push-pull,
707 * open-drain and keep as-is (this is the default).
711 "bitmask of GPIO ports to set to push-pull mode (bit 0 - GPIO1, bit 1 - GPIO2, etc.");
715 "bitmask of GPIO ports to set to open drain mode (bit 0 - GPIO1, bit 1 - GPIO2, etc.");