Lines Matching refs:gpch
46 struct rdc321x_gpio *gpch; in rdc_gpio_get_value() local
50 gpch = gpiochip_get_data(chip); in rdc_gpio_get_value()
51 reg = gpio < 32 ? gpch->reg1_data_base : gpch->reg2_data_base; in rdc_gpio_get_value()
53 spin_lock(&gpch->lock); in rdc_gpio_get_value()
54 pci_write_config_dword(gpch->sb_pdev, reg, in rdc_gpio_get_value()
55 gpch->data_reg[gpio < 32 ? 0 : 1]); in rdc_gpio_get_value()
56 pci_read_config_dword(gpch->sb_pdev, reg, &value); in rdc_gpio_get_value()
57 spin_unlock(&gpch->lock); in rdc_gpio_get_value()
65 struct rdc321x_gpio *gpch; in rdc_gpio_set_value_impl() local
68 gpch = gpiochip_get_data(chip); in rdc_gpio_set_value_impl()
71 gpch->data_reg[reg] |= 1 << (gpio & 0x1f); in rdc_gpio_set_value_impl()
73 gpch->data_reg[reg] &= ~(1 << (gpio & 0x1f)); in rdc_gpio_set_value_impl()
75 pci_write_config_dword(gpch->sb_pdev, in rdc_gpio_set_value_impl()
76 reg ? gpch->reg2_data_base : gpch->reg1_data_base, in rdc_gpio_set_value_impl()
77 gpch->data_reg[reg]); in rdc_gpio_set_value_impl()
84 struct rdc321x_gpio *gpch; in rdc_gpio_set_value() local
86 gpch = gpiochip_get_data(chip); in rdc_gpio_set_value()
87 spin_lock(&gpch->lock); in rdc_gpio_set_value()
89 spin_unlock(&gpch->lock); in rdc_gpio_set_value()
95 struct rdc321x_gpio *gpch; in rdc_gpio_config() local
99 gpch = gpiochip_get_data(chip); in rdc_gpio_config()
101 spin_lock(&gpch->lock); in rdc_gpio_config()
102 err = pci_read_config_dword(gpch->sb_pdev, gpio < 32 ? in rdc_gpio_config()
103 gpch->reg1_ctrl_base : gpch->reg2_ctrl_base, ®); in rdc_gpio_config()
109 err = pci_write_config_dword(gpch->sb_pdev, gpio < 32 ? in rdc_gpio_config()
110 gpch->reg1_ctrl_base : gpch->reg2_ctrl_base, reg); in rdc_gpio_config()
117 spin_unlock(&gpch->lock); in rdc_gpio_config()