Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1039138ybe; Mon, 2 Sep 2019 13:17:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8tyxungu9T6M5vsfzjzoU2+lls0XyTleZeC1Meqb9Ifb6Bw8cZ9g7bWznq+gjHHks1Qme X-Received: by 2002:a17:90a:f48a:: with SMTP id bx10mr14998843pjb.75.1567455459971; Mon, 02 Sep 2019 13:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567455459; cv=none; d=google.com; s=arc-20160816; b=AkT8mF4OwDfxZtJM+G4hwlMNKXXDlE4rz5EGF79hogZV2dc61dF1IPuJqiJNCGroug fks2qnOsBsGZYWWO/gXdsiO2XfVXLJmQCKUCNRstRIPnOVj9YxOnXMtTcDQyeW6Vm4Fi qREohXwLdkJm9bgq8c6hDG8BqnS9bY09lJvr6CuxCUqymNH0w9v9z3ky/ZrYGmZWSrzG lDjBSTMSUmJMrzqAvdPX6oFeSTJqkJx8LwPz9Em+N7oNgMQj1WFyfWYw1O+NWMc+HzRC MAJ65oeDJG9XyhBn+xwVdSZPZIkfOwT0obrjekUR3naraICZOEze+Fu3AUcq8+8F3N8J 7q7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BPbCaAKF/wIU6o4BqDq6Pbq7lsSJ+uXXn5M0Z2tIK44=; b=jAQJSJPiCTIHdCqGI8nNIRtviY0GzMjoVz76k9QqNpLkL5CPjHNBHmLUHj56hH+s4v biGqh9hVsqCXEbyuL0tDdrWW8EbQG4DNaeZQ/ALrTb9ziaGg2SAya/wgGYuy7vczHuF5 5sfw4G2f6Br6kjekh8m7jDehoutxEhJdnARXl8OWxs67feuM9W9GLoJqaEAH/4jIwFt3 GBacgqpLX9SlwhfSjeVlhmAWxQBF2VMxPThfybglbujzX9enfCJJlcD4ULu/oe9ekFoT N6SBCio2s8D8nfpyVU9nqfCs72niR/gxemk27Fd04kRKRIfqW5JHFpwAcL+eU0Dpnh73 gNOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si5473536plr.32.2019.09.02.13.17.23; Mon, 02 Sep 2019 13:17:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727385AbfIBUQE (ORCPT + 99 others); Mon, 2 Sep 2019 16:16:04 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45210 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727143AbfIBUQD (ORCPT ); Mon, 2 Sep 2019 16:16:03 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id CA23982018; Mon, 2 Sep 2019 22:15:47 +0200 (CEST) Date: Mon, 2 Sep 2019 22:16:00 +0200 From: Pavel Machek To: Nick Crews Cc: Enric Balletbo i Serra , Duncan Laurie , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel , Daniel Kurtz Subject: Re: Policy to keep USB ports powered in low-power states Message-ID: <20190902201600.GB6546@bug> References: <20190813060249.GD6670@kroah.com> <20190814212012.GB22618@kroah.com> <20190816091243.GB15703@kroah.com> <3f1def95-e3d4-514b-af76-193cdc43990e@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > > Without knowing the internal design, but having more infor now, looks to me that > > should be modelled more as a kind of power supply? Maybe something similar to > > UCS1002-2 device (drivers/power/supply/ucs1002_power.c) but behind the EC? > > This would work, the problem would be that you lose the link to the > actual USB port. > On these Wilco devices, only one port supports this, and I don't think we really > care about exposing which one it is, but theoretically you would want > to be able to > control this for individual ports. I talked with Duncan today and he > will tweak the > BIOS firmware so that it exposes which USB ports support the PowerShare ability. > Then we can query this configuration via ACPI. > > I hadn't seen that driver before, it looks very new, but looks quite > similar. One problem > is that the standard power_supply properties represent the present > status of the device, > whereas we want to control the state when the device is off. > > I think that I will write this up as a power_supply driver and see > what people think. As > a fallback, we can look more into the USB subsystem. Greg, do you think that is > acceptable, or would you really like this within the USB subsystem? So, I'm not greg, but... Motorola Droid 4 (and other phones) have USB otg controllers... They can act as a device (common use), but they can also support USB host, and they can power the USB bus... either with battery voltage or with 5V. Having ability to control that even if USB device is not present would be pretty interesting for various hacks. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html