Lines Matching +full:lp87565 +full:- +full:q1

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
4 * Keerthy <j-keerthy@ti.com>
14 #include <linux/mfd/lp87565.h>
26 ret = regmap_read(gpio->map, LP87565_REG_GPIO_IN, &val); in lp87565_gpio_get()
38 regmap_update_bits(gpio->map, LP87565_REG_GPIO_OUT, in lp87565_gpio_set()
48 ret = regmap_read(gpio->map, LP87565_REG_GPIO_CONFIG, &val); in lp87565_gpio_get_direction()
63 return regmap_update_bits(gpio->map, in lp87565_gpio_direction_input()
75 return regmap_update_bits(gpio->map, in lp87565_gpio_direction_output()
94 ret = regmap_update_bits(gpio->map, in lp87565_gpio_request()
102 return -EINVAL; in lp87565_gpio_request()
115 return regmap_update_bits(gpio->map, in lp87565_gpio_set_config()
122 return regmap_update_bits(gpio->map, in lp87565_gpio_set_config()
127 return -ENOTSUPP; in lp87565_gpio_set_config()
132 .label = "lp87565-gpio",
141 .base = -1,
149 struct lp87565 *lp87565; in lp87565_gpio_probe() local
152 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in lp87565_gpio_probe()
154 return -ENOMEM; in lp87565_gpio_probe()
156 lp87565 = dev_get_drvdata(pdev->dev.parent); in lp87565_gpio_probe()
157 gpio->chip = template_chip; in lp87565_gpio_probe()
158 gpio->chip.parent = lp87565->dev; in lp87565_gpio_probe()
159 gpio->map = lp87565->regmap; in lp87565_gpio_probe()
161 ret = devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio); in lp87565_gpio_probe()
163 dev_err(&pdev->dev, "Could not register gpiochip, %d\n", ret); in lp87565_gpio_probe()
171 { "lp87565-q1-gpio", },
178 .name = "lp87565-gpio",
185 MODULE_AUTHOR("Keerthy <j-keerthy@ti.com>");
186 MODULE_DESCRIPTION("LP87565 GPIO driver");