Lines Matching refs:rcdev
36 struct reset_controller_dev rcdev; member
39 static inline struct mpfs_reset *to_mpfs_reset(struct reset_controller_dev *rcdev) in to_mpfs_reset() argument
41 return container_of(rcdev, struct mpfs_reset, rcdev); in to_mpfs_reset()
47 static int mpfs_assert(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_assert() argument
49 struct mpfs_reset *rst = to_mpfs_reset(rcdev); in mpfs_assert()
55 static int mpfs_deassert(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_deassert() argument
57 struct mpfs_reset *rst = to_mpfs_reset(rcdev); in mpfs_deassert()
63 static int mpfs_status(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_status() argument
65 struct mpfs_reset *rst = to_mpfs_reset(rcdev); in mpfs_status()
77 static int mpfs_reset(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_reset() argument
79 mpfs_assert(rcdev, id); in mpfs_reset()
83 mpfs_deassert(rcdev, id); in mpfs_reset()
95 static int mpfs_reset_xlate(struct reset_controller_dev *rcdev, in mpfs_reset_xlate() argument
106 dev_err(rcdev->dev, "Resetting the fabric is not supported\n"); in mpfs_reset_xlate()
110 if (index < MPFS_PERIPH_OFFSET || index >= (MPFS_PERIPH_OFFSET + rcdev->nr_resets)) { in mpfs_reset_xlate()
111 dev_err(rcdev->dev, "Invalid reset index %u\n", index); in mpfs_reset_xlate()
120 struct reset_controller_dev *rcdev; in mpfs_reset_mfd_probe() local
128 rcdev = &rst->rcdev; in mpfs_reset_mfd_probe()
129 rcdev->dev = dev; in mpfs_reset_mfd_probe()
130 rcdev->ops = &mpfs_reset_ops; in mpfs_reset_mfd_probe()
132 rcdev->of_node = pdev->dev.parent->of_node; in mpfs_reset_mfd_probe()
133 rcdev->of_reset_n_cells = 1; in mpfs_reset_mfd_probe()
134 rcdev->of_xlate = mpfs_reset_xlate; in mpfs_reset_mfd_probe()
135 rcdev->nr_resets = MPFS_NUM_RESETS; in mpfs_reset_mfd_probe()
142 return devm_reset_controller_register(dev, rcdev); in mpfs_reset_mfd_probe()
156 struct reset_controller_dev *rcdev; in mpfs_reset_adev_probe() local
166 rcdev = &rst->rcdev; in mpfs_reset_adev_probe()
167 rcdev->dev = dev; in mpfs_reset_adev_probe()
168 rcdev->ops = &mpfs_reset_ops; in mpfs_reset_adev_probe()
170 rcdev->of_node = dev->parent->of_node; in mpfs_reset_adev_probe()
171 rcdev->of_reset_n_cells = 1; in mpfs_reset_adev_probe()
172 rcdev->of_xlate = mpfs_reset_xlate; in mpfs_reset_adev_probe()
173 rcdev->nr_resets = MPFS_NUM_RESETS; in mpfs_reset_adev_probe()
175 return devm_reset_controller_register(dev, rcdev); in mpfs_reset_adev_probe()