Lines Matching defs:rcdev
132 * @rcdev: Reset controller entity
145 struct reset_controller_dev rcdev;
1408 #define rcdev_to_priv(x) container_of(x, struct rzg2l_cpg_priv, rcdev)
1410 static int rzg2l_cpg_assert(struct reset_controller_dev *rcdev,
1413 struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
1420 dev_dbg(rcdev->dev, "assert id:%ld offset:0x%x\n", id, CLK_RST_R(reg));
1439 static int rzg2l_cpg_deassert(struct reset_controller_dev *rcdev,
1442 struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
1449 dev_dbg(rcdev->dev, "deassert id:%ld offset:0x%x\n", id,
1469 static int rzg2l_cpg_reset(struct reset_controller_dev *rcdev,
1474 ret = rzg2l_cpg_assert(rcdev, id);
1478 return rzg2l_cpg_deassert(rcdev, id);
1481 static int rzg2l_cpg_status(struct reset_controller_dev *rcdev,
1484 struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
1510 static int rzg2l_cpg_reset_xlate(struct reset_controller_dev *rcdev,
1513 struct rzg2l_cpg_priv *priv = rcdev_to_priv(rcdev);
1517 if (id >= rcdev->nr_resets || !info->resets[id].off) {
1518 dev_err(rcdev->dev, "Invalid reset index %u\n", id);
1527 priv->rcdev.ops = &rzg2l_cpg_reset_ops;
1528 priv->rcdev.of_node = priv->dev->of_node;
1529 priv->rcdev.dev = priv->dev;
1530 priv->rcdev.of_reset_n_cells = 1;
1531 priv->rcdev.of_xlate = rzg2l_cpg_reset_xlate;
1532 priv->rcdev.nr_resets = priv->num_resets;
1534 return devm_reset_controller_register(priv->dev, &priv->rcdev);