RE: [PATCH v1 2/2] Bluetooth: btnxpuart: Add GPIO support to power save feature

From: Shenwei Wang
Date: Thu Oct 03 2024 - 11:49:44 EST




> -----Original Message-----
> From: Neeraj Sanjay Kale <neeraj.sanjaykale@xxxxxxx>
> Sent: Thursday, October 3, 2024 10:38 AM
> To: Shenwei Wang <shenwei.wang@xxxxxxx>; marcel@xxxxxxxxxxxx;
> luiz.dentz@xxxxxxxxx; robh@xxxxxxxxxx; krzk+dt@xxxxxxxxxx;
> conor+dt@xxxxxxxxxx
> Cc: linux-bluetooth@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; Amitkumar Karwar <amitkumar.karwar@xxxxxxx>;
> Rohit Fule <rohit.fule@xxxxxxx>; Sherry Sun <sherry.sun@xxxxxxx>; Luke Wang
> <ziniu.wang_1@xxxxxxx>; Bough Chen <haibo.chen@xxxxxxx>; LnxRevLi
> <LnxRevLi@xxxxxxx>
> Subject: RE: [PATCH v1 2/2] Bluetooth: btnxpuart: Add GPIO support to power
> save feature
>
> The expected behavior is level trigger.
> The piece of code you are referring to is from power save init, where we are
> setting the initial value of GPIO as HIGH.
> However, if the FW is already present and running, with unknown power save
> state, a GPIO toggle ensures the chip wakes up, and FW and driver are in sync.
>

If the module is already in a power-save state, waking it up only to immediately
return it to power-save seems unnecessary. A more efficient approach would be
to simply set the GPIO to LOW. This action should transition the module into a
power-save state regardless of its previous condition.

Regards,
Shenwei

> Thanks,
> Neeraj