Lines Matching refs:gpch
32 struct rdc321x_gpio *gpch;
36 gpch = gpiochip_get_data(chip);
37 reg = gpio < 32 ? gpch->reg1_data_base : gpch->reg2_data_base;
39 spin_lock(&gpch->lock);
40 pci_write_config_dword(gpch->sb_pdev, reg,
41 gpch->data_reg[gpio < 32 ? 0 : 1]);
42 pci_read_config_dword(gpch->sb_pdev, reg, &value);
43 spin_unlock(&gpch->lock);
51 struct rdc321x_gpio *gpch;
54 gpch = gpiochip_get_data(chip);
57 gpch->data_reg[reg] |= 1 << (gpio & 0x1f);
59 gpch->data_reg[reg] &= ~(1 << (gpio & 0x1f));
61 pci_write_config_dword(gpch->sb_pdev,
62 reg ? gpch->reg2_data_base : gpch->reg1_data_base,
63 gpch->data_reg[reg]);
70 struct rdc321x_gpio *gpch;
72 gpch = gpiochip_get_data(chip);
73 spin_lock(&gpch->lock);
75 spin_unlock(&gpch->lock);
81 struct rdc321x_gpio *gpch;
85 gpch = gpiochip_get_data(chip);
87 spin_lock(&gpch->lock);
88 err = pci_read_config_dword(gpch->sb_pdev, gpio < 32 ?
89 gpch->reg1_ctrl_base : gpch->reg2_ctrl_base, ®);
95 err = pci_write_config_dword(gpch->sb_pdev, gpio < 32 ?
96 gpch->reg1_ctrl_base : gpch->reg2_ctrl_base, reg);
103 spin_unlock(&gpch->lock);