Re: [PATCH v13 5/5] drivers: qcom: Update rpmh clients to use start and end transactions

From: Doug Anderson
Date: Wed Mar 11 2020 - 19:03:08 EST


Hi,

On Mon, Mar 9, 2020 at 2:31 AM Maulik Shah <mkshah@xxxxxxxxxxxxxx> wrote:
>
> --- a/drivers/interconnect/qcom/bcm-voter.c
> +++ b/drivers/interconnect/qcom/bcm-voter.c
> @@ -263,7 +263,9 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)
> tcs_list_gen(&voter->commit_list, QCOM_ICC_BUCKET_AMC, cmds, commit_idx);
>
> if (!commit_idx[0])
> - goto out;
> + goto end;
> +
> + rpmh_start_transaction(voter-dev);
>
> ret = rpmh_invalidate(voter->dev);
> if (ret) {
> @@ -312,12 +314,15 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)
> tcs_list_gen(&voter->commit_list, QCOM_ICC_BUCKET_SLEEP, cmds, commit_idx);
>
> ret = rpmh_write_batch(voter->dev, RPMH_SLEEP_STATE, cmds, commit_idx);
> - if (ret) {
> + if (ret)
> pr_err("Error sending SLEEP RPMH requests (%d)\n", ret);
> - goto out;
> - }
>
> out:
> + ret = rpmh_end_transaction(voter-dev);

One last note is that your code doesn't actually compile for me since
you need "voter->dev" here (and in the start case), not "voter-dev".

-Doug