Lines Matching +full:reg +full:- +full:shift
1 // SPDX-License-Identifier: GPL-2.0+
41 uint8_t reg; member
43 uint8_t shift; member
68 .reg = HICR9,
69 .shift = 8,
88 .reg = HICRA,
89 .shift = 28,
108 .reg = HICRA,
109 .shift = 25,
126 .reg = HICRA,
127 .shift = 22,
144 .reg = HICRA,
145 .shift = 19,
162 .reg = HICRA,
163 .shift = 16,
180 .reg = HICRA,
181 .shift = 12,
198 .reg = HICRA,
199 .shift = 9,
216 .reg = HICRA,
217 .shift = 6,
234 .reg = HICRA,
235 .shift = 3,
252 .reg = HICRA,
253 .shift = 0,
290 .reg = HICR9,
291 .shift = 12,
310 .reg = HICR9,
311 .shift = 8,
331 .reg = HICRA,
332 .shift = 25,
349 .reg = HICRA,
350 .shift = 22,
367 .reg = HICRA,
368 .shift = 19,
385 .reg = HICRA,
386 .shift = 16,
403 .reg = HICRA,
404 .shift = 9,
421 .reg = HICRA,
422 .shift = 6,
439 .reg = HICRA,
440 .shift = 3,
457 .reg = HICRA,
458 .shift = 0,
499 regmap_read(uart_routing->map, sel->reg, &val); in aspeed_uart_routing_show()
500 val = (val >> sel->shift) & sel->mask; in aspeed_uart_routing_show()
503 for (pos = 0; sel->options[pos] != NULL; ++pos) { in aspeed_uart_routing_show()
505 len += sysfs_emit_at(buf, len, "[%s] ", sel->options[pos]); in aspeed_uart_routing_show()
507 len += sysfs_emit_at(buf, len, "%s ", sel->options[pos]); in aspeed_uart_routing_show()
526 val = __sysfs_match_string(sel->options, -1, buf); in aspeed_uart_routing_store()
529 return -EINVAL; in aspeed_uart_routing_store()
532 regmap_update_bits(uart_routing->map, sel->reg, in aspeed_uart_routing_store()
533 (sel->mask << sel->shift), in aspeed_uart_routing_store()
534 (val & sel->mask) << sel->shift); in aspeed_uart_routing_store()
542 struct device *dev = &pdev->dev; in aspeed_uart_routing_probe()
545 uart_routing = devm_kzalloc(&pdev->dev, sizeof(*uart_routing), GFP_KERNEL); in aspeed_uart_routing_probe()
547 return -ENOMEM; in aspeed_uart_routing_probe()
549 uart_routing->map = syscon_node_to_regmap(dev->parent->of_node); in aspeed_uart_routing_probe()
550 if (IS_ERR(uart_routing->map)) { in aspeed_uart_routing_probe()
552 return PTR_ERR(uart_routing->map); in aspeed_uart_routing_probe()
555 uart_routing->attr_grp = of_device_get_match_data(dev); in aspeed_uart_routing_probe()
557 rc = sysfs_create_group(&dev->kobj, uart_routing->attr_grp); in aspeed_uart_routing_probe()
570 struct device *dev = &pdev->dev; in aspeed_uart_routing_remove()
573 sysfs_remove_group(&dev->kobj, uart_routing->attr_grp); in aspeed_uart_routing_remove()
577 { .compatible = "aspeed,ast2400-uart-routing",
579 { .compatible = "aspeed,ast2500-uart-routing",
581 { .compatible = "aspeed,ast2600-uart-routing",
588 .name = "aspeed-uart-routing",
598 MODULE_AUTHOR("Chia-Wei Wang <chiawei_wang@aspeedtech.com>");