On Fri, Aug 2, 2024 at 3:55 PM Kyle Tso kyletso@google.com wrote:
On Fri, Jul 26, 2024 at 8:28 PM Kyle Tso kyletso@google.com wrote:
It is possible that the usb power_supply is registered after the probe of dwc3. In this case, trying to get the usb power_supply during the probe will fail and there is no chance to try again. Also the usb power_supply might be unregistered at anytime so that the handle of it in dwc3 would become invalid. To fix this, get the handle right before calling to power_supply functions and put it afterward.
Fixes: 6f0764b5adea ("usb: dwc3: add a power supply for current control") Cc: stable@vger.kernel.org Signed-off-by: Kyle Tso kyletso@google.com
v1 -> v2:
- move power_supply_put out of interrupt context
Hi maintainers,
It seems that there are some problems in version 2. I will send out version 3 later.
Kyle
version 3 sent
https://lore.kernel.org/all/20240804084612.2561230-1-kyletso@google.com/
Kyle