[PATCH 2/4] soc: qcom: pmic_glink: Introduce base PMIC GLINK driver

From: Subbaraman Narayanamurthy
Date: Wed Oct 26 2022 - 15:52:44 EST


> +static struct pmic_glink *__pmic_glink;
> +static DEFINE_MUTEX(__pmic_glink_lock);

Having this global device and lock to update pmic_glink struct pointer
might not work well if there are multiple pmic_glink devices that
corresponds to multiple pmic_glink channels (or rpmsg devices). This
is fine for the primary pmic_glink channel that supports mission mode
clients. However, to support debugging, there could be a secondary
pmic_glink channel and some clients under it.

> +struct pmic_glink_client {
> + struct list_head node;
> +
> + struct pmic_glink *pmic;

It would be good to name this pointer as "pg" or something.