[0/2] Adjust logic for power_supply_is_system_supplied()

Message ID 20230516182541.5836-1-mario.limonciello@amd.com
Headers
Series Adjust logic for power_supply_is_system_supplied() |

Message

Mario Limonciello May 16, 2023, 6:25 p.m. UTC
  Some systems don't provide any ACPI power supplies, but drivers use
the function power_supply_is_system_supplied() to make policy decisions.

This logic works fine until a new device is added to the system that
provides a UCSI power supply. This power supply doesn't power the system
but the logic assumes it does.

This series adjusts the logic so that these power supplies are not
considered when making these policy decisions.

Mario Limonciello (2):
  power: supply: Use the scope of power supplies to tell if power is
    system supplied
  usb: typec: ucsi: Don't create power supplies for dGPUs

 drivers/i2c/busses/i2c-designware-pcidrv.c | 13 ++++++++++++-
 drivers/i2c/busses/i2c-nvidia-gpu.c        |  3 +++
 drivers/power/supply/power_supply_core.c   |  8 ++++++--
 drivers/usb/typec/ucsi/psy.c               | 14 ++++++++++++++
 4 files changed, 35 insertions(+), 3 deletions(-)
  

Comments

Evan Quan May 17, 2023, 1:22 a.m. UTC | #1
[AMD Official Use Only - General]

Series is Reviewed-and-tested-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: Limonciello, Mario <Mario.Limonciello@amd.com>
> Sent: Wednesday, May 17, 2023 2:26 AM
> To: heikki.krogerus@linux.intel.com; rafael@kernel.org; ajayg@nvidia.com;
> andriy.shevchenko@linux.intel.com
> Cc: linux-i2c@vger.kernel.org; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-usb@vger.kernel.org; Quan, Evan
> <Evan.Quan@amd.com>; Lazar, Lijo <Lijo.Lazar@amd.com>; Goswami, Sanket
> <Sanket.Goswami@amd.com>; Limonciello, Mario
> <Mario.Limonciello@amd.com>
> Subject: [PATCH 0/2] Adjust logic for power_supply_is_system_supplied()
>
> Some systems don't provide any ACPI power supplies, but drivers use the
> function power_supply_is_system_supplied() to make policy decisions.
>
> This logic works fine until a new device is added to the system that provides a
> UCSI power supply. This power supply doesn't power the system but the logic
> assumes it does.
>
> This series adjusts the logic so that these power supplies are not considered
> when making these policy decisions.
>
> Mario Limonciello (2):
>   power: supply: Use the scope of power supplies to tell if power is
>     system supplied
>   usb: typec: ucsi: Don't create power supplies for dGPUs
>
>  drivers/i2c/busses/i2c-designware-pcidrv.c | 13 ++++++++++++-
>  drivers/i2c/busses/i2c-nvidia-gpu.c        |  3 +++
>  drivers/power/supply/power_supply_core.c   |  8 ++++++--
>  drivers/usb/typec/ucsi/psy.c               | 14 ++++++++++++++
>  4 files changed, 35 insertions(+), 3 deletions(-)
>
> --
> 2.34.1
  
Andy Shevchenko May 17, 2023, 5:15 p.m. UTC | #2
On Wed, May 17, 2023 at 01:22:25AM +0000, Quan, Evan wrote:
> [AMD Official Use Only - General]
> 
> Series is Reviewed-and-tested-by: Evan Quan <evan.quan@amd.com>

This is not how we supply tags (and most of the maintainers prefer non-combined
ones, so two in this case instead of one).

The idea is that tag is supplied as a separate line, not mixed with any other
text.

All this is well written in Submitting Patches documentation, please refresh
your memories :-)