Re: [PATCH v3 2/3] soc: qcom: pmic_glink: Add GIO pmic_glink instance
From: Konrad Dybcio
Date: Thu Dec 03 2026 - 08:00:10 EST
On 11/19/26 7:55 AM, Fenglin Wu wrote:
> Add a PMIC GLINK transport instance for GIO (General I/O) which is a
> new communication model used by the SoCCP battery-management firmware
> on some of the Qualcomm platforms (e.g. Glymur): it turns the
> GIO_OPCODE_BLOCK_READ/_WRITE requests and the GIO_OPCODE_ALERT_IND
> notification exchanged over the pmic-glink rpmsg channel into a regmap
> and per-alert IRQ delivery. It registers as a "pmic_glink.gio"
> auxiliary driver and bound to a new "gio" auxiliary device that's created
> on GIO-capable platforms.
>
> Also, update the client_mask to additionally request the GIO client on
> Glymur, which is the 1st platform to support GIO. Even through the legacy
> clients (battmgr, ucsi, altmode) can also be supported using the new GIO
> interface, their per-client bits are still kept with the functionalities
> continue to be provided by the existing pmic_glink.* auxiliary devices
> using the pmic_glink interfaces, to minimize the risks associated with
> transitioning all of them to use the new GIO interface.
>
> Co-developed-by: Tingguo Cheng <tingguo.cheng@xxxxxxxxxxxxxxxx>
> Signed-off-by: Tingguo Cheng <tingguo.cheng@xxxxxxxxxxxxxxxx>
> Signed-off-by: Fenglin Wu <fenglin.wu@xxxxxxxxxxxxxxxx>
> ---
[...]
> +static int pmic_glink_gio_write_sync(struct pmic_glink_gio *pgio, u32 addr,
> + const u8 *data, size_t length)
Fold into pmic_glink_gio_write, its only caller
[...]
> +static void pmic_glink_gio_init_work(struct work_struct *work)
> +{
> + struct pmic_glink_gio *pgio = container_of(work, struct pmic_glink_gio, init_work);
> +
> + if (!READ_ONCE(pgio->service_up))
> + return;
We check for this, under a lock, couple lines below
[...]
> + case GIO_OPCODE_ALERT_IND:
no 'default' case below this
Konrad