Lines Matching +full:wcd9340 +full:- +full:gpio
1 // SPDX-License-Identifier: GPL-2.0
6 #include <linux/gpio/driver.h>
27 ret = regmap_read(data->map, WCD_REG_DIR_CTL_OFFSET, &value); in wcd_gpio_get_direction()
41 return regmap_update_bits(data->map, WCD_REG_DIR_CTL_OFFSET, in wcd_gpio_direction_input()
50 regmap_update_bits(data->map, WCD_REG_DIR_CTL_OFFSET, in wcd_gpio_direction_output()
53 return regmap_update_bits(data->map, WCD_REG_VAL_CTL_OFFSET, in wcd_gpio_direction_output()
63 regmap_read(data->map, WCD_REG_VAL_CTL_OFFSET, &value); in wcd_gpio_get()
72 regmap_update_bits(data->map, WCD_REG_VAL_CTL_OFFSET, in wcd_gpio_set()
78 struct device *dev = &pdev->dev; in wcd_gpio_probe()
84 return -ENOMEM; in wcd_gpio_probe()
86 data->map = dev_get_regmap(dev->parent, NULL); in wcd_gpio_probe()
87 if (!data->map) { in wcd_gpio_probe()
89 return -EINVAL; in wcd_gpio_probe()
92 chip = &data->chip; in wcd_gpio_probe()
93 chip->direction_input = wcd_gpio_direction_input; in wcd_gpio_probe()
94 chip->direction_output = wcd_gpio_direction_output; in wcd_gpio_probe()
95 chip->get_direction = wcd_gpio_get_direction; in wcd_gpio_probe()
96 chip->get = wcd_gpio_get; in wcd_gpio_probe()
97 chip->set = wcd_gpio_set; in wcd_gpio_probe()
98 chip->parent = dev; in wcd_gpio_probe()
99 chip->base = -1; in wcd_gpio_probe()
100 chip->ngpio = WCD934X_NPINS; in wcd_gpio_probe()
101 chip->label = dev_name(dev); in wcd_gpio_probe()
102 chip->can_sleep = false; in wcd_gpio_probe()
108 { .compatible = "qcom,wcd9340-gpio" },
109 { .compatible = "qcom,wcd9341-gpio" },
116 .name = "wcd934x-gpio",
123 MODULE_DESCRIPTION("Qualcomm Technologies, Inc WCD GPIO control driver");