New issue
Advanced search Search tips

Issue 841955 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature

Blocked on:
issue 841944



Sign in to add a comment

Differenciate connected and active power supply

Reported by fpar...@baylibre.com, May 10 2018

Issue description

UserAgent: 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:
 
Labels: Needs-Triage-M68
Cc: vamshi.kommuri@chromium.org
Components: OS>Kernel>Power
Labels: M-68 Triaged-ET FoundIn-68 Target-68
Status: Untriaged (was: Unconfirmed)
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.

Comment 4 by derat@chromium.org, May 11 2018

Cc: nsanders@chromium.org tovep@chromium.org bleung@chromium.org zhuohao@chromium.org
Labels: -OS-Linux OS-Chrome
Status: Unconfirmed (was: Untriaged)
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.

Comment 5 by jtho@google.com, 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.

Comment 6 by derat@chromium.org, 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.
"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.

Comment 8 by derat@chromium.org, May 11 2018

Got it. Thanks for the explanation.

Comment 9 by tbroch@chromium.org, May 12 2018

Blockedon: 841944
Owner: bleung@chromium.org
Status: Assigned (was: Unconfirmed)
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.

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


Cc: dnojiri@chromium.org

Sign in to add a comment