Lines Matching refs:piobu
61 struct sama5d2_piobu *piobu = container_of(chip, struct sama5d2_piobu, in sama5d2_piobu_setup_pin() local
65 ret = regmap_update_bits(piobu->regmap, PIOBU_BMPR, mask, 0); in sama5d2_piobu_setup_pin()
69 ret = regmap_update_bits(piobu->regmap, PIOBU_NMPR, mask, 0); in sama5d2_piobu_setup_pin()
73 return regmap_update_bits(piobu->regmap, PIOBU_WKPR, mask, 0); in sama5d2_piobu_setup_pin()
83 struct sama5d2_piobu *piobu = container_of(chip, struct sama5d2_piobu, in sama5d2_piobu_write_value() local
88 return regmap_update_bits(piobu->regmap, reg, mask, value); in sama5d2_piobu_write_value()
98 struct sama5d2_piobu *piobu = container_of(chip, struct sama5d2_piobu, in sama5d2_piobu_read_value() local
104 ret = regmap_read(piobu->regmap, reg, &val); in sama5d2_piobu_read_value()
184 struct sama5d2_piobu *piobu; in sama5d2_piobu_probe() local
187 piobu = devm_kzalloc(&pdev->dev, sizeof(*piobu), GFP_KERNEL); in sama5d2_piobu_probe()
188 if (!piobu) in sama5d2_piobu_probe()
191 platform_set_drvdata(pdev, piobu); in sama5d2_piobu_probe()
192 piobu->chip.label = pdev->name; in sama5d2_piobu_probe()
193 piobu->chip.parent = &pdev->dev; in sama5d2_piobu_probe()
194 piobu->chip.of_node = pdev->dev.of_node; in sama5d2_piobu_probe()
195 piobu->chip.owner = THIS_MODULE, in sama5d2_piobu_probe()
196 piobu->chip.get_direction = sama5d2_piobu_get_direction, in sama5d2_piobu_probe()
197 piobu->chip.direction_input = sama5d2_piobu_direction_input, in sama5d2_piobu_probe()
198 piobu->chip.direction_output = sama5d2_piobu_direction_output, in sama5d2_piobu_probe()
199 piobu->chip.get = sama5d2_piobu_get, in sama5d2_piobu_probe()
200 piobu->chip.set = sama5d2_piobu_set, in sama5d2_piobu_probe()
201 piobu->chip.base = -1, in sama5d2_piobu_probe()
202 piobu->chip.ngpio = PIOBU_NUM, in sama5d2_piobu_probe()
203 piobu->chip.can_sleep = 0, in sama5d2_piobu_probe()
205 piobu->regmap = syscon_node_to_regmap(pdev->dev.of_node); in sama5d2_piobu_probe()
206 if (IS_ERR(piobu->regmap)) { in sama5d2_piobu_probe()
208 PTR_ERR(piobu->regmap)); in sama5d2_piobu_probe()
209 return PTR_ERR(piobu->regmap); in sama5d2_piobu_probe()
212 ret = devm_gpiochip_add_data(&pdev->dev, &piobu->chip, piobu); in sama5d2_piobu_probe()
219 ret = sama5d2_piobu_setup_pin(&piobu->chip, i); in sama5d2_piobu_probe()