linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: linux-pm@vger.kernel.org, sre@kernel.org,
	Sameer Nanda <snanda@chromium.org>,
	gwendal@chromium.org, linux-kernel@vger.kernel.org,
	groeck@chromium.org, Adam.Thomson.Opensource@diasemi.com,
	kernel@collabora.com, bleung@chromium.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>
Subject: Re: [PATCH v2 1/2] power: supply: add input voltage limit property.
Date: Sat, 24 Nov 2018 00:22:04 +0100	[thread overview]
Message-ID: <20181123232203.GA3852@amd> (raw)
In-Reply-To: <20181122101119.29194-1-enric.balletbo@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

Hi!

> We have a problem with USBPD chargers which under certain conditions
> can result in system overheating if the voltage provided by the USBPD
> port is too high. While the preferred means to control this would be
> through devicetree or ACPI settings, this is not always possible, and
> we need to have a means to set a voltage limit.
> 
> This patch exposes a new property, similar to input current limit, to
> re-configure the maximum voltage from the external supply at runtime
> based on system-level knowledge or user input.

First, this should really be handled by dt / ACPI. If it is broken,
that's a hardware bug, and we can do DMI-based blacklists in kernel.

How are you supposed to fsck a system, for example?

> +What:		/sys/class/power_supply/<supply_name>/input_voltage_limit
> +Date:		Nov 2018
> +Contact:	linux-pm@vger.kernel.org
> +Description:
> +		Details the incoming VBUS voltage limit currently set in the
> +		supply. Normally this is configured based on the type of
> +		connection made.

"Details"?

Who can write to this value and when? What is the limit? If USB
charger is plugged in, should it show 5.0V (because that's nominal on
the USB) or 5.25V (because that is the real limit)?

Who can write to this and when. And what happens on write? What
happens if I write value that charger can't provide there?

Does it set the voltage power supply should produce? Or maximal it can
choose to produce?

This really needs better documentation.

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2018-11-23 23:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 10:11 [PATCH v2 1/2] power: supply: add input voltage limit property Enric Balletbo i Serra
2018-11-22 10:11 ` [PATCH v2 2/2] power: supply: cros: allow to set input voltage and current limit Enric Balletbo i Serra
2018-11-22 15:24   ` Guenter Roeck
2018-11-22 16:54 ` [PATCH v2 1/2] power: supply: add input voltage limit property Adam Thomson
2018-11-23 23:22 ` Pavel Machek [this message]
2018-11-30 12:19   ` Enric Balletbo i Serra
2018-12-01 15:09     ` Pavel Machek
2018-12-03 19:58       ` Benson Leung
2018-12-05 15:47         ` Sebastian Reichel
2018-12-09  8:44         ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181123232203.GA3852@amd \
    --to=pavel@ucw.cz \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=kernel@collabora.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=snanda@chromium.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).