Lines Matching +full:mask +full:- +full:reset
2 * Pistachio SoC Reset Controller driver
17 #include <linux/reset-controller.h>
21 #include <dt-bindings/reset/pistachio-resets.h>
62 return -EINVAL; in pistachio_reset_shift()
70 u32 mask; in pistachio_reset_assert() local
77 mask = BIT(shift); in pistachio_reset_assert()
79 return regmap_update_bits(rd->periph_regs, PISTACHIO_SOFT_RESET, in pistachio_reset_assert()
80 mask, mask); in pistachio_reset_assert()
87 u32 mask; in pistachio_reset_deassert() local
94 mask = BIT(shift); in pistachio_reset_deassert()
96 return regmap_update_bits(rd->periph_regs, PISTACHIO_SOFT_RESET, in pistachio_reset_deassert()
97 mask, 0); in pistachio_reset_deassert()
108 struct device *dev = &pdev->dev; in pistachio_reset_probe()
109 struct device_node *np = pdev->dev.of_node; in pistachio_reset_probe()
113 return -ENOMEM; in pistachio_reset_probe()
115 rd->periph_regs = syscon_node_to_regmap(np->parent); in pistachio_reset_probe()
116 if (IS_ERR(rd->periph_regs)) in pistachio_reset_probe()
117 return PTR_ERR(rd->periph_regs); in pistachio_reset_probe()
119 rd->rcdev.owner = THIS_MODULE; in pistachio_reset_probe()
120 rd->rcdev.nr_resets = PISTACHIO_RESET_MAX + 1; in pistachio_reset_probe()
121 rd->rcdev.ops = &pistachio_reset_ops; in pistachio_reset_probe()
122 rd->rcdev.of_node = np; in pistachio_reset_probe()
124 return devm_reset_controller_register(dev, &rd->rcdev); in pistachio_reset_probe()
128 { .compatible = "img,pistachio-reset", },
135 .name = "pistachio-reset",