Lines Matching refs:ksr
31 struct k210_rst *ksr = to_k210_rst(rcdev); in k210_rst_assert() local
33 return regmap_update_bits(ksr->map, K210_SYSCTL_PERI_RESET, BIT(id), 1); in k210_rst_assert()
39 struct k210_rst *ksr = to_k210_rst(rcdev); in k210_rst_deassert() local
41 return regmap_update_bits(ksr->map, K210_SYSCTL_PERI_RESET, BIT(id), 0); in k210_rst_deassert()
61 struct k210_rst *ksr = to_k210_rst(rcdev); in k210_rst_status() local
65 ret = regmap_read(ksr->map, K210_SYSCTL_PERI_RESET, ®); in k210_rst_status()
94 struct k210_rst *ksr; in k210_rst_probe() local
98 ksr = devm_kzalloc(dev, sizeof(*ksr), GFP_KERNEL); in k210_rst_probe()
99 if (!ksr) in k210_rst_probe()
103 ksr->map = syscon_node_to_regmap(parent_np); in k210_rst_probe()
105 if (IS_ERR(ksr->map)) in k210_rst_probe()
106 return PTR_ERR(ksr->map); in k210_rst_probe()
108 ksr->rcdev.owner = THIS_MODULE; in k210_rst_probe()
109 ksr->rcdev.dev = dev; in k210_rst_probe()
110 ksr->rcdev.of_node = dev->of_node; in k210_rst_probe()
111 ksr->rcdev.ops = &k210_rst_ops; in k210_rst_probe()
112 ksr->rcdev.nr_resets = fls(K210_RST_MASK); in k210_rst_probe()
113 ksr->rcdev.of_reset_n_cells = 1; in k210_rst_probe()
114 ksr->rcdev.of_xlate = k210_rst_xlate; in k210_rst_probe()
116 return devm_reset_controller_register(dev, &ksr->rcdev); in k210_rst_probe()