Lines Matching refs:pin_conf
161 struct ns2_pinconf pin_conf; member
168 .pin_conf = { \
664 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_enable()
665 val &= ~(NS2_PIN_SRC_MASK << pin_data->pin_conf.input_en); in ns2_pin_set_enable()
668 val |= NS2_PIN_INPUT_EN_MASK << pin_data->pin_conf.input_en; in ns2_pin_set_enable()
670 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_enable()
685 enable = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_enable()
686 enable = (enable >> pin_data->pin_conf.input_en) & in ns2_pin_get_enable()
710 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_slew()
711 val &= ~(NS2_PIN_SRC_MASK << pin_data->pin_conf.src_shift); in ns2_pin_set_slew()
714 val |= NS2_PIN_SRC_MASK << pin_data->pin_conf.src_shift; in ns2_pin_set_slew()
716 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_slew()
732 val = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_slew()
733 *slew = (val >> pin_data->pin_conf.src_shift) & NS2_PIN_SRC_MASK; in ns2_pin_get_slew()
751 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_pull()
752 val &= ~(NS2_PIN_PULL_MASK << pin_data->pin_conf.pull_shift); in ns2_pin_set_pull()
755 val |= NS2_PIN_PULL_UP << pin_data->pin_conf.pull_shift; in ns2_pin_set_pull()
757 val |= NS2_PIN_PULL_DOWN << pin_data->pin_conf.pull_shift; in ns2_pin_set_pull()
758 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_pull()
776 val = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_pull()
777 val = (val >> pin_data->pin_conf.pull_shift) & NS2_PIN_PULL_MASK; in ns2_pin_get_pull()
804 val = readl(base_address + pin_data->pin_conf.offset); in ns2_pin_set_strength()
805 val &= ~(NS2_PIN_DRIVE_STRENGTH_MASK << pin_data->pin_conf.drive_shift); in ns2_pin_set_strength()
806 val |= ((strength / 2) - 1) << pin_data->pin_conf.drive_shift; in ns2_pin_set_strength()
807 writel(val, (base_address + pin_data->pin_conf.offset)); in ns2_pin_set_strength()
824 val = readl(pinctrl->pinconf_base + pin_data->pin_conf.offset); in ns2_pin_get_strength()
825 *strength = (val >> pin_data->pin_conf.drive_shift) & in ns2_pin_get_strength()
844 if (pin_data->pin_conf.base == -1) in ns2_pin_config_get()
904 if (pin_data->pin_conf.base == -1) in ns2_pin_config_set()