* [PATCH v2] soc: qcom: pmic_glink: Add support for SOCCP remoteproc channels
@ 2025-09-19 17:50 Anjelique Melendez
2025-10-27 14:09 ` Bjorn Andersson
0 siblings, 1 reply; 2+ messages in thread
From: Anjelique Melendez @ 2025-09-19 17:50 UTC (permalink / raw)
To: andersson, konradybcio; +Cc: linux-arm-msm, linux-kernel
System On Chip Control Processor (SOCCP) is a subsystem that can have
battery management firmware running on it to support Type-C/PD and
battery charging. SOCCP does not have multiple PDs and hence PDR is not
supported. So, if the subsystem comes up/down, rpmsg driver would be
probed or removed. Use that for notifying clients of pmic_glink for
PDR events.
Add support for battery management FW running on SOCCP by adding the
"PMIC_RTR_SOCCP_APPS" channel name to the rpmsg_match list and
updating notify_clients logic.
Signed-off-by: Anjelique Melendez <anjelique.melendez@oss.qualcomm.com>
---
Changes since V1:
- Updated commit message
- Removed enum defintions and isntead using booleans
- Simplified logic by setting pg->pdr_state directly if pdr is not available
---
drivers/soc/qcom/pmic_glink.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c
index c0a4be5df926..627f96ca322e 100644
--- a/drivers/soc/qcom/pmic_glink.c
+++ b/drivers/soc/qcom/pmic_glink.c
@@ -39,6 +39,7 @@ struct pmic_glink {
struct mutex state_lock;
unsigned int client_state;
unsigned int pdr_state;
+ bool pdr_available;
/* serializing clients list updates */
spinlock_t client_lock;
@@ -246,9 +247,12 @@ static int pmic_glink_rpmsg_probe(struct rpmsg_device *rpdev)
return dev_err_probe(&rpdev->dev, -ENODEV, "no pmic_glink device to attach to\n");
dev_set_drvdata(&rpdev->dev, pg);
+ pg->pdr_available = rpdev->id.driver_data;
guard(mutex)(&pg->state_lock);
pg->ept = rpdev->ept;
+ if (!pg->pdr_available)
+ pg->pdr_state = SERVREG_SERVICE_STATE_UP;
pmic_glink_state_notify_clients(pg);
return 0;
@@ -265,11 +269,14 @@ static void pmic_glink_rpmsg_remove(struct rpmsg_device *rpdev)
guard(mutex)(&pg->state_lock);
pg->ept = NULL;
+ if (!pg->pdr_available)
+ pg->pdr_state = SERVREG_SERVICE_STATE_DOWN;
pmic_glink_state_notify_clients(pg);
}
static const struct rpmsg_device_id pmic_glink_rpmsg_id_match[] = {
- { "PMIC_RTR_ADSP_APPS" },
+ {.name = "PMIC_RTR_ADSP_APPS", .driver_data = true },
+ {.name = "PMIC_RTR_SOCCP_APPS", .driver_data = false },
{}
};
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] soc: qcom: pmic_glink: Add support for SOCCP remoteproc channels
2025-09-19 17:50 [PATCH v2] soc: qcom: pmic_glink: Add support for SOCCP remoteproc channels Anjelique Melendez
@ 2025-10-27 14:09 ` Bjorn Andersson
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2025-10-27 14:09 UTC (permalink / raw)
To: konradybcio, Anjelique Melendez; +Cc: linux-arm-msm, linux-kernel
On Fri, 19 Sep 2025 10:50:25 -0700, Anjelique Melendez wrote:
> System On Chip Control Processor (SOCCP) is a subsystem that can have
> battery management firmware running on it to support Type-C/PD and
> battery charging. SOCCP does not have multiple PDs and hence PDR is not
> supported. So, if the subsystem comes up/down, rpmsg driver would be
> probed or removed. Use that for notifying clients of pmic_glink for
> PDR events.
>
> [...]
Applied, thanks!
[1/1] soc: qcom: pmic_glink: Add support for SOCCP remoteproc channels
commit: 6773cb33e7a7191ae7ae490af279596c91a828cc
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-27 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19 17:50 [PATCH v2] soc: qcom: pmic_glink: Add support for SOCCP remoteproc channels Anjelique Melendez
2025-10-27 14:09 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®