Skip to content

Commit

Permalink
soc: qcom: pmic_glink: Actually communicate when remote goes down
Browse files Browse the repository at this point in the history
commit ad51126 upstream.

When the pmic_glink state is UP and we either receive a protection-
domain (PD) notification indicating that the PD is going down, or that
the whole remoteproc is going down, it's expected that the pmic_glink
client instances are notified that their function has gone DOWN.

This is not what the code does, which results in the client state either
not updating, or being wrong in many cases. So let's fix the conditions.

Fixes: 58ef4ec ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Cc: [email protected]
Reviewed-by: Heikki Krogerus <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Tested-by: Amit Pundir <[email protected]>
Reviewed-by: Johan Hovold <[email protected]>
Tested-by: Johan Hovold <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
quic-bjorande authored and gregkh committed Sep 4, 2024
1 parent 62c2d63 commit bd8f8e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/soc/qcom/pmic_glink.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static void pmic_glink_state_notify_clients(struct pmic_glink *pg)
if (pg->pdr_state == SERVREG_SERVICE_STATE_UP && pg->ept)
new_state = SERVREG_SERVICE_STATE_UP;
} else {
if (pg->pdr_state == SERVREG_SERVICE_STATE_UP && pg->ept)
if (pg->pdr_state == SERVREG_SERVICE_STATE_DOWN || !pg->ept)
new_state = SERVREG_SERVICE_STATE_DOWN;
}

Expand Down

0 comments on commit bd8f8e7

Please sign in to comment.