Lines Matching refs:pin_data
655 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_set_enable() local
662 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_enable()
663 val &= ~(NS2_PIN_SRC_MASK << pin_data->pin_conf.input_en); in ns2_pin_set_enable()
666 val |= NS2_PIN_INPUT_EN_MASK << pin_data->pin_conf.input_en; in ns2_pin_set_enable()
668 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_enable()
678 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_get_enable() local
683 enable = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_enable()
684 enable = (enable >> pin_data->pin_conf.input_en) & in ns2_pin_get_enable()
701 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_set_slew() local
708 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_slew()
709 val &= ~(NS2_PIN_SRC_MASK << pin_data->pin_conf.src_shift); in ns2_pin_set_slew()
712 val |= NS2_PIN_SRC_MASK << pin_data->pin_conf.src_shift; in ns2_pin_set_slew()
714 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_slew()
725 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_get_slew() local
730 val = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_slew()
731 *slew = (val >> pin_data->pin_conf.src_shift) & NS2_PIN_SRC_MASK; in ns2_pin_get_slew()
742 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_set_pull() local
749 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_pull()
750 val &= ~(NS2_PIN_PULL_MASK << pin_data->pin_conf.pull_shift); in ns2_pin_set_pull()
753 val |= NS2_PIN_PULL_UP << pin_data->pin_conf.pull_shift; in ns2_pin_set_pull()
755 val |= NS2_PIN_PULL_DOWN << pin_data->pin_conf.pull_shift; in ns2_pin_set_pull()
756 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_pull()
769 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_get_pull() local
774 val = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_pull()
775 val = (val >> pin_data->pin_conf.pull_shift) & NS2_PIN_PULL_MASK; in ns2_pin_get_pull()
791 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_set_strength() local
802 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_strength()
803 val &= ~(NS2_PIN_DRIVE_STRENGTH_MASK << pin_data->pin_conf.drive_shift); in ns2_pin_set_strength()
804 val |= ((strength / 2) - 1) << pin_data->pin_conf.drive_shift; in ns2_pin_set_strength()
805 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_strength()
817 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_get_strength() local
822 val = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_strength()
823 *strength = (val >> pin_data->pin_conf.drive_shift) & in ns2_pin_get_strength()
836 struct ns2_pin *pin_data = pctldev->desc->pins[pin].drv_data; in ns2_pin_config_get() local
842 if (pin_data->pin_conf.base == -1) in ns2_pin_config_get()
896 struct ns2_pin *pin_data = pctrldev->desc->pins[pin].drv_data; in ns2_pin_config_set() local
902 if (pin_data->pin_conf.base == -1) in ns2_pin_config_set()