Re: [PATCH v2 2/5] clk: qcom: Allow custom reset ops

From: Krzysztof Kozlowski
Date: Thu Aug 18 2022 - 03:10:42 EST


On 17/08/2022 17:57, Akhil P Oommen wrote:

Thank you for your patch. There is something to discuss/improve.

>
> return regmap_update_bits(rst->regmap, map->reg, mask, 0);
> diff --git a/drivers/clk/qcom/reset.h b/drivers/clk/qcom/reset.h
> index 2a08b5e..d4213b4 100644
> --- a/drivers/clk/qcom/reset.h
> +++ b/drivers/clk/qcom/reset.h
> @@ -8,9 +8,17 @@
>
> #include <linux/reset-controller.h>
>
> +struct qcom_reset_ops {
> + int (*reset)(void *priv);
> + int (*assert)(void *priv);
> + int (*deassert)(void *priv);
> +};
> +
> struct qcom_reset_map {
> unsigned int reg;
> u8 bit;
> + struct qcom_reset_ops *ops;

This should be pointer to const.


Best regards,
Krzysztof