Lines Matching full:logicvc

30 static void logicvc_gpio_offset(struct logicvc_gpio *logicvc, unsigned offset,  in logicvc_gpio_offset()  argument
52 struct logicvc_gpio *logicvc = gpiochip_get_data(chip); in logicvc_gpio_get() local
56 logicvc_gpio_offset(logicvc, offset, &reg, &bit); in logicvc_gpio_get()
58 ret = regmap_read(logicvc->regmap, reg, &value); in logicvc_gpio_get()
67 struct logicvc_gpio *logicvc = gpiochip_get_data(chip); in logicvc_gpio_set() local
70 logicvc_gpio_offset(logicvc, offset, &reg, &bit); in logicvc_gpio_set()
72 regmap_update_bits(logicvc->regmap, reg, bit, value ? bit : 0); in logicvc_gpio_set()
88 .name = "logicvc-gpio",
95 struct logicvc_gpio *logicvc; in logicvc_gpio_probe() local
98 logicvc = devm_kzalloc(dev, sizeof(*logicvc), GFP_KERNEL); in logicvc_gpio_probe()
99 if (!logicvc) in logicvc_gpio_probe()
103 logicvc->regmap = syscon_node_to_regmap(of_node->parent); in logicvc_gpio_probe()
106 if (IS_ERR(logicvc->regmap)) { in logicvc_gpio_probe()
125 logicvc->regmap = in logicvc_gpio_probe()
128 if (IS_ERR(logicvc->regmap)) { in logicvc_gpio_probe()
130 return PTR_ERR(logicvc->regmap); in logicvc_gpio_probe()
134 logicvc->chip.parent = dev; in logicvc_gpio_probe()
135 logicvc->chip.owner = THIS_MODULE; in logicvc_gpio_probe()
136 logicvc->chip.label = dev_name(dev); in logicvc_gpio_probe()
137 logicvc->chip.base = -1; in logicvc_gpio_probe()
138 logicvc->chip.ngpio = LOGICVC_CTRL_GPIO_BITS + in logicvc_gpio_probe()
140 logicvc->chip.get = logicvc_gpio_get; in logicvc_gpio_probe()
141 logicvc->chip.set = logicvc_gpio_set; in logicvc_gpio_probe()
142 logicvc->chip.direction_output = logicvc_gpio_direction_output; in logicvc_gpio_probe()
144 platform_set_drvdata(pdev, logicvc); in logicvc_gpio_probe()
146 return devm_gpiochip_add_data(dev, &logicvc->chip, logicvc); in logicvc_gpio_probe()
151 .compatible = "xylon,logicvc-3.02.a-gpio",
160 .name = "gpio-logicvc",
169 MODULE_DESCRIPTION("Xylon LogiCVC GPIO driver");