Lines Matching +full:gpo +full:- +full:config +full:- +full:2
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
4 * Keerthy <j-keerthy@ti.com>
35 return -EINVAL; in lp873x_gpio_direction_input()
44 return regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, in lp873x_gpio_direction_output()
54 ret = regmap_read(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, &val); in lp873x_gpio_get()
66 regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, in lp873x_gpio_set()
78 /* No MUX Set up Needed for GPO */ in lp873x_gpio_request()
82 ret = regmap_update_bits(gpio->lp873->regmap, LP873X_REG_CONFIG, in lp873x_gpio_request()
89 return -EINVAL; in lp873x_gpio_request()
96 unsigned long config) in lp873x_gpio_set_config() argument
100 switch (pinconf_to_config_param(config)) { in lp873x_gpio_set_config()
102 return regmap_update_bits(gpio->lp873->regmap, in lp873x_gpio_set_config()
110 return regmap_update_bits(gpio->lp873->regmap, in lp873x_gpio_set_config()
115 return -ENOTSUPP; in lp873x_gpio_set_config()
120 .label = "lp873x-gpio",
129 .base = -1,
130 .ngpio = 2,
139 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in lp873x_gpio_probe()
141 return -ENOMEM; in lp873x_gpio_probe()
145 gpio->lp873 = dev_get_drvdata(pdev->dev.parent); in lp873x_gpio_probe()
146 gpio->chip = template_chip; in lp873x_gpio_probe()
147 gpio->chip.parent = gpio->lp873->dev; in lp873x_gpio_probe()
149 ret = devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio); in lp873x_gpio_probe()
151 dev_err(&pdev->dev, "Could not register gpiochip, %d\n", ret); in lp873x_gpio_probe()
159 { "lp873x-gpio", },
166 .name = "lp873x-gpio",
173 MODULE_AUTHOR("Keerthy <j-keerthy@ti.com>");