Differenciate connected and active power supply
Reported by
fpar...@baylibre.com,
May 10 2018
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3409.2 Safari/537.36 Steps to reproduce the problem: The power supply sysfs entries do not allow to know whether a power supply is connected but not supplying power and one that is connected and supplying power. What is the expected behavior? having two parameters in the sysfs entries where one show whether a power supply is connected and the other one indicate whether it is providing power to the system. What went wrong? Feature not supported by kernel driver Did this work before? N/A Chrome version: 68.0.3409.2 Channel: n/a OS Version: Flash Version:
,
May 11 2018
,
May 11 2018
Thanks for filing the issue! As per comment#0 it is understood that the issue seems to be a feature request, Hence marking it as Untriaged and requesting someone from "OS>Kernel>Power" team to have a look into the issue. Adding appropriate labels.
,
May 11 2018
This may have some overlap with internal issue http://b/78199132. Can you describe your use case? In other words, what's broken by this? I thought that powerd is already able to distinguish between these cases, at least in the case of USB_PD_DRP devices. See https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/powerd/system/power_supply.cc#723 for the (convoluted) implementation.
,
May 11 2018
This is also related to internal issues b/78025342 and https://bugs.chromium.org/p/chromium/issues/detail?id=832054 In essence, the information on power source is not consistently represented in the sysfs entries for various use cases (booting with one power source, then connecting the other one, or booting with both power sources), and this work is making it consistent.
,
May 11 2018
But just to be clear, I think that all of the existing bugs are about interactions between the ACPI driver (i.e. the "AC" power supply) and other power supplies. The change linked in #1 looks like it's just updating the USB PD driver, so I'm still curious about the use case that's broken here.
,
May 11 2018
"AC" is indeed provided by the ACPI driver. It is extending the USB PD driver to be aware of the dedicated power supply and be able to provide to userspace the same interface as for the USB PD ports. The code in the EC was there to support both the USB PD ports and the dedicated port in the same host command, but the dedicated port was never exposed to the sysfs interface.
,
May 11 2018
Got it. Thanks for the explanation.
,
May 12 2018
,
May 12 2018
Thanks for patches Fabian. Going to send this Benson's way to own the bug as I see he's on the review and is familiar w/ the kernel driver.
,
Sep 20
https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1236850 has been merged to Fizz EC branch. "TEST=Verify ectool usbpdpower 1 return 'Port 1: Disconnected' and 'Port 1: SNK (not charging)' without and with a BJ adapter connected respectively on Fizz." This patch allows AP to distinguish the following states: 1. BJ adapter is connected and supplying power 2. BJ adapter is connected but not supplying power 3. BJ adapter is physically disconnected
,
Sep 20
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by fpar...@baylibre.com
, May 10 2018