Lines Matching +full:- +full:reset
1 // SPDX-License-Identifier: GPL-2.0
3 * ARM System Control and Management Interface (ARM SCMI) reset driver
5 * Copyright (C) 2019-2021 ARM Ltd.
11 #include <linux/reset-controller.h>
17 * struct scmi_reset_data - reset controller information structure
18 * @rcdev: reset controller entity
27 #define to_scmi_handle(p) (to_scmi_reset_data(p)->ph)
30 * scmi_reset_assert() - assert device reset
31 * @rcdev: reset controller entity
32 * @id: ID of the reset to be asserted
34 * This function implements the reset driver op to assert a device's reset
44 return reset_ops->assert(ph, id); in scmi_reset_assert()
48 * scmi_reset_deassert() - deassert device reset
49 * @rcdev: reset controller entity
50 * @id: ID of the reset to be deasserted
52 * This function implements the reset driver op to deassert a device's reset
62 return reset_ops->deassert(ph, id); in scmi_reset_deassert()
66 * scmi_reset_reset() - reset the device
67 * @rcdev: reset controller entity
68 * @id: ID of the reset signal to be reset(assert + deassert)
70 * This function implements the reset driver op to trigger a device's
71 * reset signal using the ARM SCMI protocol.
80 return reset_ops->reset(ph, id); in scmi_reset_reset()
86 .reset = scmi_reset_reset,
92 struct device *dev = &sdev->dev; in scmi_reset_probe()
93 struct device_node *np = dev->of_node; in scmi_reset_probe()
94 const struct scmi_handle *handle = sdev->handle; in scmi_reset_probe()
98 return -ENODEV; in scmi_reset_probe()
100 reset_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_RESET, &ph); in scmi_reset_probe()
106 return -ENOMEM; in scmi_reset_probe()
108 data->rcdev.ops = &scmi_reset_ops; in scmi_reset_probe()
109 data->rcdev.owner = THIS_MODULE; in scmi_reset_probe()
110 data->rcdev.of_node = np; in scmi_reset_probe()
111 data->rcdev.nr_resets = reset_ops->num_domains_get(ph); in scmi_reset_probe()
112 data->ph = ph; in scmi_reset_probe()
114 return devm_reset_controller_register(dev, &data->rcdev); in scmi_reset_probe()
118 { SCMI_PROTOCOL_RESET, "reset" },
124 .name = "scmi-reset",
131 MODULE_DESCRIPTION("ARM SCMI reset controller driver");