Lines Matching full:logicvc

29 static void logicvc_gpio_offset(struct logicvc_gpio *logicvc, unsigned offset,  in logicvc_gpio_offset()  argument
51 struct logicvc_gpio *logicvc = gpiochip_get_data(chip); in logicvc_gpio_get() local
55 logicvc_gpio_offset(logicvc, offset, &reg, &bit); in logicvc_gpio_get()
57 ret = regmap_read(logicvc->regmap, reg, &value); in logicvc_gpio_get()
66 struct logicvc_gpio *logicvc = gpiochip_get_data(chip); in logicvc_gpio_set() local
69 logicvc_gpio_offset(logicvc, offset, &reg, &bit); in logicvc_gpio_set()
71 regmap_update_bits(logicvc->regmap, reg, bit, value ? bit : 0); in logicvc_gpio_set()
87 .name = "logicvc-gpio",
94 struct logicvc_gpio *logicvc; in logicvc_gpio_probe() local
97 logicvc = devm_kzalloc(dev, sizeof(*logicvc), GFP_KERNEL); in logicvc_gpio_probe()
98 if (!logicvc) in logicvc_gpio_probe()
102 logicvc->regmap = syscon_node_to_regmap(of_node->parent); in logicvc_gpio_probe()
105 if (IS_ERR(logicvc->regmap)) { in logicvc_gpio_probe()
122 logicvc->regmap = in logicvc_gpio_probe()
125 if (IS_ERR(logicvc->regmap)) { in logicvc_gpio_probe()
127 return PTR_ERR(logicvc->regmap); in logicvc_gpio_probe()
131 logicvc->chip.parent = dev; in logicvc_gpio_probe()
132 logicvc->chip.owner = THIS_MODULE; in logicvc_gpio_probe()
133 logicvc->chip.label = dev_name(dev); in logicvc_gpio_probe()
134 logicvc->chip.base = -1; in logicvc_gpio_probe()
135 logicvc->chip.ngpio = LOGICVC_CTRL_GPIO_BITS + in logicvc_gpio_probe()
137 logicvc->chip.get = logicvc_gpio_get; in logicvc_gpio_probe()
138 logicvc->chip.set = logicvc_gpio_set; in logicvc_gpio_probe()
139 logicvc->chip.direction_output = logicvc_gpio_direction_output; in logicvc_gpio_probe()
141 return devm_gpiochip_add_data(dev, &logicvc->chip, logicvc); in logicvc_gpio_probe()
146 .compatible = "xylon,logicvc-3.02.a-gpio",
155 .name = "gpio-logicvc",
164 MODULE_DESCRIPTION("Xylon LogiCVC GPIO driver");