add support for BJ in power supply sysfs entry
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: /sys/class/power/ only export the USB PD charge ports. We should be able to also export the BJ. What is the expected behavior? See the BJ in /sys/class/power/ What went wrong? Not implemented in kernel driver. Did this work before? No Chrome version: 68.0.3409.2 Channel: n/a OS Version: Flash Version:
,
May 11 2018
,
May 11 2018
Thanks for filing the issue! Changing the status to Untriaged as this is being worked on in CL (..as per Comment#1). Tentatively adding component "OS>Kernel>Power" please change if this isn't apt.
,
May 11 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/7034d8b711398d5627fab5fe787fc33e24d76c48 commit 7034d8b711398d5627fab5fe787fc33e24d76c48 Author: Fabien Parent <fparent@baylibre.com> Date: Fri May 11 09:58:45 2018 charge_manager: add host cmd to get port count The kernel is only able to know the number of USB PD port through EC_CMD_USB_PD_PORTS, but the kernel needs also to be able to know that there is a dedicated port. Add a host command that will return the total number of charge port (USB PD + BJ). BRANCH=None BUG=chromium:841944 TEST=Called command from kernel driver and checked that the port count was the expected value. Change-Id: I6ccd8a2dee35bbe8bb66dfbe09d1cc09c54b73a0 Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-on: https://chromium-review.googlesource.com/1046593 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/7034d8b711398d5627fab5fe787fc33e24d76c48/include/ec_commands.h [modify] https://crrev.com/7034d8b711398d5627fab5fe787fc33e24d76c48/common/charge_manager.c
,
May 12 2018
Assigning to Dai by virtue that he's reviewed the path in #4
,
May 12 2018
,
May 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/cd89b400a22702ab327b6fd261cd7d5c53b421e3 commit cd89b400a22702ab327b6fd261cd7d5c53b421e3 Author: Fabien Parent <fparent@baylibre.com> Date: Wed May 16 12:08:36 2018 charge_manager: handle gracefully dedicated port charge_manager_fill_power_info can be called to fill the power info of the dedicated port. This function might call charge_manager_get_source_current with the dedicated port, we don't want to use assert in that case, but just fail gracefully by returning 0. BRANCH=None BUG=chromium:841944 TEST=Check that the function returns 0 for dedicated and not 0 for USB. Change-Id: I357c056647e01bdb0e77a08a6c6b492aa3dbb503 Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-on: https://chromium-review.googlesource.com/1059248 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/cd89b400a22702ab327b6fd261cd7d5c53b421e3/common/charge_manager.c
,
May 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/ba63740c410f4e31ee65ccbe3724da864da0e93a commit ba63740c410f4e31ee65ccbe3724da864da0e93a Author: Fabien Parent <fparent@baylibre.com> Date: Tue May 29 14:54:02 2018 charge_manager: handle gracefully dedicated port charge_manager_fill_power_info can be called to fill the power info of the dedicated port. This function might call charge_manager_get_source_current with the dedicated port, we don't want to use assert in that case, but just fail gracefully by returning 0. BRANCH=None BUG=chromium:841944 TEST=Check that the function returns 0 for dedicated and not 0 for USB. Change-Id: I357c056647e01bdb0e77a08a6c6b492aa3dbb503 Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-on: https://chromium-review.googlesource.com/1059248 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit cd89b400a22702ab327b6fd261cd7d5c53b421e3) Reviewed-on: https://chromium-review.googlesource.com/1072290 Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/ba63740c410f4e31ee65ccbe3724da864da0e93a/common/charge_manager.c
,
May 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/787ec2236a8e295f7627ec9fbb75c5d07154f102 commit 787ec2236a8e295f7627ec9fbb75c5d07154f102 Author: Fabien Parent <fparent@baylibre.com> Date: Tue May 29 14:54:03 2018 charge_manager: add host cmd to get port count The kernel is only able to know the number of USB PD port through EC_CMD_USB_PD_PORTS, but the kernel needs also to be able to know that there is a dedicated port. Add a host command that will return the total number of charge port (USB PD + BJ). BRANCH=None BUG=chromium:841944 TEST=Called command from kernel driver and checked that the port count was the expected value. Change-Id: I6ccd8a2dee35bbe8bb66dfbe09d1cc09c54b73a0 Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-on: https://chromium-review.googlesource.com/1046593 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit 7034d8b711398d5627fab5fe787fc33e24d76c48) Reviewed-on: https://chromium-review.googlesource.com/1072288 Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/787ec2236a8e295f7627ec9fbb75c5d07154f102/include/ec_commands.h [modify] https://crrev.com/787ec2236a8e295f7627ec9fbb75c5d07154f102/common/charge_manager.c
,
Jul 11
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/7b50f88ba02306bd84f4dea1a9a437e57bfd275b commit 7b50f88ba02306bd84f4dea1a9a437e57bfd275b Author: Fabien Parent <fparent@baylibre.com> Date: Wed Jul 11 19:13:23 2018 charge_manager: allow finding supply with VOLT > 0 and CUR = 0 On Fizz if we boot from type-C and later on plug the BJ, the BJ available current is set to a non-zero value but the current is set to 0. Because of this it is impossible to detect at runtime by the kernel that the BJ has been plugged in. This commit is allowing to find power supply information even when the current is equal to 0 as long as the voltage is > 0. The priority will still be lower than if PWR > 0. BUG=chromium:841944 BRANCH=none TEST=Checked that the kernel can see when the BJ is connected. Change-Id: I7342829aa3429102d8452e9d2beba38d1701027f Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-on: https://chromium-review.googlesource.com/1046594 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/7b50f88ba02306bd84f4dea1a9a437e57bfd275b/common/charge_manager.c
,
Jul 19
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/98814dd6b6fe2feb2ed320ebf2fdc21b8934fc37 commit 98814dd6b6fe2feb2ed320ebf2fdc21b8934fc37 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Thu Jul 19 16:27:16 2018 Revert "charge_manager: allow finding supply with VOLT > 0 and CUR = 0" This reverts commit 2d994de65cfb9eae64d8d143b7d6133a5712d55f. Reason for revert: b:111563778 Original change's description: > charge_manager: allow finding supply with VOLT > 0 and CUR = 0 > > On Fizz if we boot from type-C and later on plug the BJ, > the BJ available current is set to a non-zero value but the current > is set to 0. Because of this it is impossible to detect at runtime > by the kernel that the BJ has been plugged in. > > This commit is allowing to find power supply information even when > the current is equal to 0 as long as the voltage is > 0. The priority > will still be lower than if PWR > 0. > > BUG=chromium:841944 > BRANCH=none > TEST=Checked that the kernel can see when the BJ is connected. > > Change-Id: I7342829aa3429102d8452e9d2beba38d1701027f > Signed-off-by: Fabien Parent <fparent@baylibre.com> > Reviewed-on: https://chromium-review.googlesource.com/1046594 > Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Bug: chromium:841944 Change-Id: I641ad3316a0a33dd26b8626521784a1d8b29f8c0 Reviewed-on: https://chromium-review.googlesource.com/1142701 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/98814dd6b6fe2feb2ed320ebf2fdc21b8934fc37/common/charge_manager.c
,
Jul 26
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/756250daed2ad994fdde6fc162b6fbc61b787a82 commit 756250daed2ad994fdde6fc162b6fbc61b787a82 Author: Devin Lu <Devin.Lu@quantatw.com> Date: Thu Jul 26 22:52:02 2018 Revert "charge_manager: allow finding supply with VOLT > 0 and CUR = 0" This reverts commit 7b50f88ba02306bd84f4dea1a9a437e57bfd275b. Reason for revert: Revert for make sure type-c ports can go back to disconnect state without any device/charger attached BUG=b:111667665,b:111777351 BRANCH=none TEST=make sure type-c ports can go back to disconnect state without any device/charger attached. Original change's description: > charge_manager: allow finding supply with VOLT > 0 and CUR = 0 > > On Fizz if we boot from type-C and later on plug the BJ, > the BJ available current is set to a non-zero value but the current > is set to 0. Because of this it is impossible to detect at runtime > by the kernel that the BJ has been plugged in. > > This commit is allowing to find power supply information even when > the current is equal to 0 as long as the voltage is > 0. The priority > will still be lower than if PWR > 0. > > BUG=chromium:841944 > BRANCH=none > TEST=Checked that the kernel can see when the BJ is connected. > > Change-Id: I7342829aa3429102d8452e9d2beba38d1701027f > Signed-off-by: Fabien Parent <fparent@baylibre.com> > Reviewed-on: https://chromium-review.googlesource.com/1046594 > Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Bug: chromium:841944 Change-Id: I4ceaee244e0bdd97f4176dd930462b07dd2fc1ee Reviewed-on: https://chromium-review.googlesource.com/1149680 Commit-Ready: Edward Hill <ecgh@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> [modify] https://crrev.com/756250daed2ad994fdde6fc162b6fbc61b787a82/common/charge_manager.c
,
Sep 14
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/26767c965ee02fe47d86a96a28117a4a61bf90b2 commit 26767c965ee02fe47d86a96a28117a4a61bf90b2 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Fri Sep 14 01:58:40 2018 ectool: Allow usbpdpower command to take port # Currently, usbpdpower command enumerates all USB-C ports found on the board. Since barrel jack adapters are not recognized as a USB-C port, they're not handled by the command. This patch allows the command to take a port number as a new parameter. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944 BRANCH=none 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. Change-Id: If3437c8f3f9952a4cc6004614ccff7bb6bbb4de5 Reviewed-on: https://chromium-review.googlesource.com/1217606 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/26767c965ee02fe47d86a96a28117a4a61bf90b2/util/ectool.c
,
Sep 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/6923c89ca94ad60afb3553361a9096ee2548f7a0 commit 6923c89ca94ad60afb3553361a9096ee2548f7a0 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Tue Sep 18 15:38:17 2018 ectool: Allow usbpdpower command to take port # Currently, usbpdpower command enumerates all USB-C ports found on the board. Since barrel jack adapters are not recognized as a USB-C port, they're not handled by the command. This patch allows the command to take a port number as a new parameter. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944 BRANCH=none 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. Change-Id: If3437c8f3f9952a4cc6004614ccff7bb6bbb4de5 Reviewed-on: https://chromium-review.googlesource.com/1217606 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1230993 Reviewed-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org> [modify] https://crrev.com/6923c89ca94ad60afb3553361a9096ee2548f7a0/util/ectool.c
,
Sep 20
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/c02b0386f6b0cdbfab2212b80c2dba5980714a75 commit c02b0386f6b0cdbfab2212b80c2dba5980714a75 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Thu Sep 20 23:28:59 2018 chgmgr: Set available voltage to 0 on disconnect Currently, available current is consistently set to zero when a supplier is disconnected across BC 1.2 drivers, PD task, usb charger task but voltage is set to zero only in some places. This patch will set available voltage consistently to 0 on disconnected ports. This change should have no impact externally or internally because currently ports are treated as a disconnected port as long as available current is zero. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944 BRANCH=none 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. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger PD' on Vayne without and with USB-C charger, respectively. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger Type-C' on Vayne without and with a phone USB-C charger, respectively. Change-Id: I9aca575a4a4240ec1f669c55437decaedf758a77 Reviewed-on: https://chromium-review.googlesource.com/1236849 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/c02b0386f6b0cdbfab2212b80c2dba5980714a75/driver/charger/bd9995x.c [modify] https://crrev.com/c02b0386f6b0cdbfab2212b80c2dba5980714a75/common/usb_charger.c [modify] https://crrev.com/c02b0386f6b0cdbfab2212b80c2dba5980714a75/driver/bc12/pi3usb9281.c [modify] https://crrev.com/c02b0386f6b0cdbfab2212b80c2dba5980714a75/common/charge_manager.c [add] https://crrev.com/c02b0386f6b0cdbfab2212b80c2dba5980714a75/board/glkrvp_ite/chg_usb_pd.c
,
Sep 20
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/60554b14ea792cb647b5f6959b5bd532064ca809 commit 60554b14ea792cb647b5f6959b5bd532064ca809 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Thu Sep 20 23:29:00 2018 Make USB_PD_POWER_INFO detect inactive supplier Currently, CMD_USB_PD_POWER_INFO does not report a supplier if the available current is 0. This causes a dedicated charger (a barrel jack adapter) to be ignored by the command if it's not the active supplier. This change allows a supplier which has 0 current to be reported by the command as long as there is no other supplier with positive current on the same port. With this change, the host can detect a BJ adapter's physical presence regardless of its charging status. In other words, a supplier with positive current always supersedes whatever supplier with zero current. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944,b:111667665,b:111777351 BRANCH=none 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. Change-Id: I22ba5f147209177c0c9cac87a123d4c3d0f2ec68 Reviewed-on: https://chromium-review.googlesource.com/1236850 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/60554b14ea792cb647b5f6959b5bd532064ca809/common/charge_manager.c
,
Sep 20
These patches allow 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
,
Sep 20
,
Sep 20
What's needed on the userspace side now? I'm unlikely to have much time to work on this anytime soon unless it's breaking something.
,
Sep 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/d5b9b8c12570a57def102d0039f0aef379582fb0 commit d5b9b8c12570a57def102d0039f0aef379582fb0 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Fri Sep 21 04:29:59 2018 Make USB_PD_POWER_INFO detect inactive supplier Currently, CMD_USB_PD_POWER_INFO does not report a supplier if the available current is 0. This causes a dedicated charger (a barrel jack adapter) to be ignored by the command if it's not the active supplier. This change allows a supplier which has 0 current to be reported by the command as long as there is no other supplier with positive current on the same port. With this change, the host can detect a BJ adapter's physical presence regardless of its charging status. In other words, a supplier with positive current always supersedes whatever supplier with zero current. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944,b:111667665,b:111777351 BRANCH=none 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. Change-Id: I22ba5f147209177c0c9cac87a123d4c3d0f2ec68 Reviewed-on: https://chromium-review.googlesource.com/1217607 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/d5b9b8c12570a57def102d0039f0aef379582fb0/common/charge_manager.c
,
Sep 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/fd3f9b9a304bb4838bd0b015981e1798b15552f6 commit fd3f9b9a304bb4838bd0b015981e1798b15552f6 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Fri Sep 21 04:29:58 2018 chgmgr: Set available voltage to 0 on disconnect Currently, available current is consistently set to zero when a supplier is disconnected across BC 1.2 drivers, PD task, usb charger task but voltage is set to zero only in some places. This patch will set available voltage consistently to 0 on disconnected ports. This change should have no impact externally or internally because currently ports are treated as a disconnected port as long as available current is zero. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944 BRANCH=none 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. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger PD' on Vayne without and with USB-C charger, respectively. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger Type-C' on Vayne without and with a phone USB-C charger, respectively. Change-Id: I9aca575a4a4240ec1f669c55437decaedf758a77 Reviewed-on: https://chromium-review.googlesource.com/1222092 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> [modify] https://crrev.com/fd3f9b9a304bb4838bd0b015981e1798b15552f6/driver/bc12/pi3usb9281.c [modify] https://crrev.com/fd3f9b9a304bb4838bd0b015981e1798b15552f6/common/usb_charger.c [modify] https://crrev.com/fd3f9b9a304bb4838bd0b015981e1798b15552f6/board/glkrvp/chg_usb_pd.c [modify] https://crrev.com/fd3f9b9a304bb4838bd0b015981e1798b15552f6/driver/charger/rt946x.c [modify] https://crrev.com/fd3f9b9a304bb4838bd0b015981e1798b15552f6/common/charge_manager.c [modify] https://crrev.com/fd3f9b9a304bb4838bd0b015981e1798b15552f6/board/glkrvp_ite/chg_usb_pd.c [modify] https://crrev.com/fd3f9b9a304bb4838bd0b015981e1798b15552f6/driver/charger/bd9995x.c
,
Sep 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/516688840c191c605fec89d19199290cf1230eb1 commit 516688840c191c605fec89d19199290cf1230eb1 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Tue Sep 25 03:12:10 2018 chgmgr: Set available voltage to 0 on disconnect Currently, available current is consistently set to zero when a supplier is disconnected across BC 1.2 drivers, PD task, usb charger task but voltage is set to zero only in some places. This patch will set available voltage consistently to 0 on disconnected ports. This change should have no impact externally or internally because currently ports are treated as a disconnected port as long as available current is zero. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944 BRANCH=none 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. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger PD' on Vayne without and with USB-C charger, respectively. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger Type-C' on Vayne without and with a phone USB-C charger, respectively. Change-Id: I9aca575a4a4240ec1f669c55437decaedf758a77 Reviewed-on: https://chromium-review.googlesource.com/1222092 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> (cherry picked from commit fd3f9b9a304bb4838bd0b015981e1798b15552f6) Reviewed-on: https://chromium-review.googlesource.com/1242200 Reviewed-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org> [modify] https://crrev.com/516688840c191c605fec89d19199290cf1230eb1/driver/bc12/pi3usb9281.c [modify] https://crrev.com/516688840c191c605fec89d19199290cf1230eb1/common/usb_charger.c [modify] https://crrev.com/516688840c191c605fec89d19199290cf1230eb1/board/glkrvp/chg_usb_pd.c [modify] https://crrev.com/516688840c191c605fec89d19199290cf1230eb1/driver/charger/rt946x.c [modify] https://crrev.com/516688840c191c605fec89d19199290cf1230eb1/common/charge_manager.c [modify] https://crrev.com/516688840c191c605fec89d19199290cf1230eb1/board/glkrvp_ite/chg_usb_pd.c [modify] https://crrev.com/516688840c191c605fec89d19199290cf1230eb1/driver/charger/bd9995x.c
,
Sep 25
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/fa7d31925693f1cf94c66cce67107e1b73b0d299 commit fa7d31925693f1cf94c66cce67107e1b73b0d299 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Tue Sep 25 03:15:47 2018 Make USB_PD_POWER_INFO detect inactive supplier Currently, CMD_USB_PD_POWER_INFO does not report a supplier if the available current is 0. This causes a dedicated charger (a barrel jack adapter) to be ignored by the command if it's not the active supplier. This change allows a supplier which has 0 current to be reported by the command as long as there is no other supplier with positive current on the same port. With this change, the host can detect a BJ adapter's physical presence regardless of its charging status. In other words, a supplier with positive current always supersedes whatever supplier with zero current. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944,b:111667665,b:111777351 BRANCH=none 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. Change-Id: I22ba5f147209177c0c9cac87a123d4c3d0f2ec68 Reviewed-on: https://chromium-review.googlesource.com/1217607 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit d5b9b8c12570a57def102d0039f0aef379582fb0) Reviewed-on: https://chromium-review.googlesource.com/1242201 Reviewed-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org> [modify] https://crrev.com/fa7d31925693f1cf94c66cce67107e1b73b0d299/common/charge_manager.c
,
Sep 25
Daisuke, can you please add some details about what you need from userspace and then reassign this to me? Thanks!
,
Sep 25
Basically, the problem described in CL:1215007: "On Fizz if we boot from type-C and later on plug the BJ, the BJ available current is set to a non-zero value but the current is set to 0. Because of this it is impossible to detect at runtime by the kernel that the BJ has been plugged in. "This commit is allowing to find dedicated power supply information even when the current is equal to 0 as long as the voltage is > 0. The priority will still be lower than if PWR > 0 or if the supply is not dedicated." has been resolved. So, I assume we can move forward to fix this issue (by CL:1046667?). Fabian?
,
Dec 8
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/034c392201ff83dfbbedce8e40d57f88ee3b34e0 commit 034c392201ff83dfbbedce8e40d57f88ee3b34e0 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Sat Dec 08 02:14:32 2018 ectool: Allow usbpdpower command to take port # Currently, usbpdpower command enumerates all USB-C ports found on the board. Since barrel jack adapters are not recognized as a USB-C port, they're not handled by the command. This patch allows the command to take a port number as a new parameter. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944 BRANCH=none 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. Change-Id: If3437c8f3f9952a4cc6004614ccff7bb6bbb4de5 Reviewed-on: https://chromium-review.googlesource.com/1217606 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1364314 Reviewed-by: YH Lin <yueherngl@chromium.org> Commit-Queue: YH Lin <yueherngl@chromium.org> Tested-by: YH Lin <yueherngl@chromium.org> [modify] https://crrev.com/034c392201ff83dfbbedce8e40d57f88ee3b34e0/util/ectool.c
,
Dec 18
,
Jan 8
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f commit cb5161b763e26bd8b2e08dd1a721884d7b27dd5f Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Tue Jan 08 23:05:35 2019 chgmgr: Set available voltage to 0 on disconnect Currently, available current is consistently set to zero when a supplier is disconnected across BC 1.2 drivers, PD task, usb charger task but voltage is set to zero only in some places. This patch will set available voltage consistently to 0 on disconnected ports. This change should have no impact externally or internally because currently ports are treated as a disconnected port as long as available current is zero. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:841944 BRANCH=none 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. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger PD' on Vayne without and with USB-C charger, respectively. Verify ectool usbpdpower prints 'Disconnected' and 'SNK Charger Type-C' on Vayne without and with a phone USB-C charger, respectively. Change-Id: I9aca575a4a4240ec1f669c55437decaedf758a77 Reviewed-on: https://chromium-review.googlesource.com/1222092 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1400151 Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> [modify] https://crrev.com/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f/driver/bc12/pi3usb9281.c [modify] https://crrev.com/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f/common/usb_charger.c [modify] https://crrev.com/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f/board/glkrvp/chg_usb_pd.c [modify] https://crrev.com/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f/driver/charger/rt946x.c [modify] https://crrev.com/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f/common/charge_manager.c [modify] https://crrev.com/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f/board/glkrvp_ite/chg_usb_pd.c [modify] https://crrev.com/cb5161b763e26bd8b2e08dd1a721884d7b27dd5f/driver/charger/bd9995x.c |
||||||||||||||
►
Sign in to add a comment |
||||||||||||||
Comment 1 by fpar...@baylibre.com
, May 10 2018