Lines Matching refs:gpio
138 struct xgene_gpio *gpio = dev_get_drvdata(dev); in xgene_gpio_suspend() local
144 gpio->set_dr_val[bank] = ioread32(gpio->base + bank_offset); in xgene_gpio_suspend()
151 struct xgene_gpio *gpio = dev_get_drvdata(dev); in xgene_gpio_resume() local
157 iowrite32(gpio->set_dr_val[bank], gpio->base + bank_offset); in xgene_gpio_resume()
171 struct xgene_gpio *gpio; in xgene_gpio_probe() local
174 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in xgene_gpio_probe()
175 if (!gpio) { in xgene_gpio_probe()
181 gpio->base = devm_ioremap_nocache(&pdev->dev, res->start, in xgene_gpio_probe()
183 if (!gpio->base) { in xgene_gpio_probe()
188 gpio->chip.ngpio = XGENE_MAX_GPIOS; in xgene_gpio_probe()
190 spin_lock_init(&gpio->lock); in xgene_gpio_probe()
191 gpio->chip.dev = &pdev->dev; in xgene_gpio_probe()
192 gpio->chip.direction_input = xgene_gpio_dir_in; in xgene_gpio_probe()
193 gpio->chip.direction_output = xgene_gpio_dir_out; in xgene_gpio_probe()
194 gpio->chip.get = xgene_gpio_get; in xgene_gpio_probe()
195 gpio->chip.set = xgene_gpio_set; in xgene_gpio_probe()
196 gpio->chip.label = dev_name(&pdev->dev); in xgene_gpio_probe()
197 gpio->chip.base = -1; in xgene_gpio_probe()
199 platform_set_drvdata(pdev, gpio); in xgene_gpio_probe()
201 err = gpiochip_add(&gpio->chip); in xgene_gpio_probe()
217 struct xgene_gpio *gpio = platform_get_drvdata(pdev); in xgene_gpio_remove() local
219 gpiochip_remove(&gpio->chip); in xgene_gpio_remove()