Lines Matching +full:sdm845 +full:- +full:pdc +full:- +full:global
1 // SPDX-License-Identifier: GPL-2.0
10 #include <linux/reset-controller.h>
12 #include <dt-bindings/reset/qcom,sdm845-pdc.h>
34 .name = "pdc-reset",
92 u32 mask = BIT(data->desc->resets[idx].bit); in qcom_pdc_control_assert()
94 return regmap_update_bits(data->regmap, data->desc->offset, mask, mask); in qcom_pdc_control_assert()
101 u32 mask = BIT(data->desc->resets[idx].bit); in qcom_pdc_control_deassert()
103 return regmap_update_bits(data->regmap, data->desc->offset, mask, 0); in qcom_pdc_control_deassert()
115 struct device *dev = &pdev->dev; in qcom_pdc_reset_probe()
118 desc = device_get_match_data(&pdev->dev); in qcom_pdc_reset_probe()
120 return -EINVAL; in qcom_pdc_reset_probe()
124 return -ENOMEM; in qcom_pdc_reset_probe()
126 data->desc = desc; in qcom_pdc_reset_probe()
131 data->regmap = devm_regmap_init_mmio(dev, base, &pdc_regmap_config); in qcom_pdc_reset_probe()
132 if (IS_ERR(data->regmap)) { in qcom_pdc_reset_probe()
134 return PTR_ERR(data->regmap); in qcom_pdc_reset_probe()
137 data->rcdev.owner = THIS_MODULE; in qcom_pdc_reset_probe()
138 data->rcdev.ops = &qcom_pdc_reset_ops; in qcom_pdc_reset_probe()
139 data->rcdev.nr_resets = desc->num_resets; in qcom_pdc_reset_probe()
140 data->rcdev.of_node = dev->of_node; in qcom_pdc_reset_probe()
142 return devm_reset_controller_register(dev, &data->rcdev); in qcom_pdc_reset_probe()
146 { .compatible = "qcom,sc7280-pdc-global", .data = &sc7280_pdc_reset_desc },
147 { .compatible = "qcom,sdm845-pdc-global", .data = &sdm845_pdc_reset_desc },
161 MODULE_DESCRIPTION("Qualcomm PDC Reset Driver");