Lines Matching +full:rst +full:- +full:syscon
1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/mfd/syscon.h>
26 const struct visconti_reset_data *data = &reset->resets[id]; in visconti_reset_assert()
27 u32 rst = BIT(data->rs_idx); in visconti_reset_assert() local
31 spin_lock_irqsave(reset->lock, flags); in visconti_reset_assert()
32 ret = regmap_update_bits(reset->regmap, data->rson_offset, rst, rst); in visconti_reset_assert()
33 spin_unlock_irqrestore(reset->lock, flags); in visconti_reset_assert()
41 const struct visconti_reset_data *data = &reset->resets[id]; in visconti_reset_deassert()
42 u32 rst = BIT(data->rs_idx); in visconti_reset_deassert() local
46 spin_lock_irqsave(reset->lock, flags); in visconti_reset_deassert()
47 ret = regmap_update_bits(reset->regmap, data->rsoff_offset, rst, rst); in visconti_reset_deassert()
48 spin_unlock_irqrestore(reset->lock, flags); in visconti_reset_deassert()
65 const struct visconti_reset_data *data = &reset->resets[id]; in visconti_reset_status()
70 spin_lock_irqsave(reset->lock, flags); in visconti_reset_status()
71 ret = regmap_read(reset->regmap, data->rson_offset, ®); in visconti_reset_status()
72 spin_unlock_irqrestore(reset->lock, flags); in visconti_reset_status()
76 return !(reg & data->rs_idx); in visconti_reset_status()
97 return -ENOMEM; in visconti_register_reset_controller()
99 reset->regmap = regmap; in visconti_register_reset_controller()
100 reset->resets = resets; in visconti_register_reset_controller()
101 reset->rcdev.ops = reset_ops; in visconti_register_reset_controller()
102 reset->rcdev.nr_resets = num_resets; in visconti_register_reset_controller()
103 reset->rcdev.of_node = dev->of_node; in visconti_register_reset_controller()
104 reset->lock = lock; in visconti_register_reset_controller()
106 return devm_reset_controller_register(dev, &reset->rcdev); in visconti_register_reset_controller()