From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755193AbdKNLow (ORCPT ); Tue, 14 Nov 2017 06:44:52 -0500 Received: from mail1.bemta6.messagelabs.com ([193.109.254.114]:57883 "EHLO mail1.bemta6.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753186AbdKNLoo (ORCPT ); Tue, 14 Nov 2017 06:44:44 -0500 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAIsWRWlGSWpSXmKPExsUSt3Opsa7mda4 og+8tlhbNi9ezWbw5Pp3Jomv1ThaLy7vmsFl87j3CaLFoWSuzxZOFZ5gsGhe8Z7E4vbvE4s/z W2wOXB47Z91l99i0qpPNY97JQI/9c9ewe7zfd5XNY+f3BnaPz5vkAtijWDPzkvIrElgzfjQcZ yv4I1Cx+cVUxgbGJbxdjFwcQgLrGSVOb73O2sXICeRUSCzaeIsZxOYVcJNYvXczG4jNJmAhMf nEAzCbRUBVorFxNpDNwSEMVLPgAhPIHBGBeUwSrzbcBathFqiT6P39lgVijqDEyZlPWCDiEhI HX7xghthlIHF6QSNYXELAXmL6+6vMIDMlBPQlGo/FQoQNJb7P+gZVYi5xZtlExgmM/LOQTJ2F ZOoCRqZVjOrFqUVlqUW6FnpJRZnpGSW5iZk5uoYGZnq5qcXFiempOYlJxXrJ+bmbGIGhzwAEO xhnX/Y/xCjJwaQkyqvymT1KiC8pP6UyI7E4I76oNCe1+BCjDAeHkgSv2DWuKCHBotT01Iq0zB xgFMKkJTh4lER4C64CpXmLCxJzizPTIVKnGHU5ns183cAsxJKXn5cqJc5rBjJDAKQoozQPbgQ sIVxilJUS5mUEOkqIpyC1KDezBFX+FaM4B6OSMO8FkFU8mXklcJteAR3BBHSEFMj9vMUliQgp qQbGWIUJjw3zEqundJ6umSXx4Y2Kit3VBskf1VIWqq69wi/nv5x2I+rUvaCZV05e1Xp8d6/lo 3O1/3tOPHldlhB642gav2T4w6XuN1O1p5tN2irJJ8iV7/t6MY8u1x3T2WXLahOPiSU+s59xul S+5N+VfBlpr6AHj43qJvTofJCIe2Nav8jrTaS4EktxRqKhFnNRcSIAKLWhKgMDAAA= X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-10.tower-194.messagelabs.com!1510659881!112728056!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Message-ID: From: Adam Thomson Date: Tue, 14 Nov 2017 11:44:41 +0000 Subject: [RFC PATCH v2 0/7] typec: tcpm: Add sink side support for PPS To: Heikki Krogerus , Guenter Roeck , Greg Kroah-Hartman , Sebastian Reichel , Hans de Goede , Yueyao Zhu , Rui Miguel Silva CC: , , , MIME-Version: 1.0 Content-Type: text/plain X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-ServerInfo: sw-ex-cashub01.diasemi.com, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 14/11/2017 09:42:00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set adds sink side support for the PPS feature introduced in the USB PD 3.0 specification. The source PPS supply is represented using the Power Supply framework to provide access and control APIs for dealing with it's operating voltage and current, and switching between a standard PDO and PPS APDO operation. During standard PDO operation the voltage and current is read-only, but for APDO PPS these are writable as well to allow for control. It should be noted that the keepalive for PPS is not handled within TCPM. The expectation is that the external user will be required to ensure re-requests occur regularly to ensure PPS remains and the source does not hard reset. Changes in v2: - Use USB_PD and usb_pd prefixes for macros and inline functions in headers. - Negotiate spec revision of PD headers during initial contract agreement. - New headers now use SPDX tags for referencing correct license. NOTE: Code changes are based on linux-next tag 'next-20171114' to pick up the move out of staging of TCPM related code. Adam Thomson (7): typec: tcpm: Add PD Rev 3.0 definitions to PD header typec: tcpm: Add ADO header for Alert message handling typec: tcpm: Add SDB header for Status message handling typec: tcpm: Add core support for sink side PPS power: supply: Add type for USB PD PPS chargers typec: tcpm: Represent source supply through power_supply class typec: tcpm: Add support for sink PPS related messages drivers/power/supply/power_supply_sysfs.c | 2 +- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/Kconfig | 2 +- drivers/usb/typec/fusb302/fusb302.c | 63 +-- drivers/usb/typec/tcpm.c | 851 +++++++++++++++++++++++++++++- include/linux/power_supply.h | 1 + include/linux/usb/pd.h | 174 +++++- include/linux/usb/pd_ado.h | 42 ++ include/linux/usb/pd_ext_sdb.h | 31 ++ include/linux/usb/tcpm.h | 2 +- 10 files changed, 1071 insertions(+), 98 deletions(-) create mode 100644 include/linux/usb/pd_ado.h create mode 100644 include/linux/usb/pd_ext_sdb.h -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Thomson Subject: [RFC PATCH v2 0/7] typec: tcpm: Add sink side support for PPS Date: Tue, 14 Nov 2017 11:44:41 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mail1.bemta6.messagelabs.com ([193.109.254.114]:57883 "EHLO mail1.bemta6.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753186AbdKNLoo (ORCPT ); Tue, 14 Nov 2017 06:44:44 -0500 Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Heikki Krogerus , Guenter Roeck , Greg Kroah-Hartman , Sebastian Reichel , Hans de Goede , Yueyao Zhu , Rui Miguel Silva Cc: linux-usb@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, support.opensource@diasemi.com This patch set adds sink side support for the PPS feature introduced in the USB PD 3.0 specification. The source PPS supply is represented using the Power Supply framework to provide access and control APIs for dealing with it's operating voltage and current, and switching between a standard PDO and PPS APDO operation. During standard PDO operation the voltage and current is read-only, but for APDO PPS these are writable as well to allow for control. It should be noted that the keepalive for PPS is not handled within TCPM. The expectation is that the external user will be required to ensure re-requests occur regularly to ensure PPS remains and the source does not hard reset. Changes in v2: - Use USB_PD and usb_pd prefixes for macros and inline functions in headers. - Negotiate spec revision of PD headers during initial contract agreement. - New headers now use SPDX tags for referencing correct license. NOTE: Code changes are based on linux-next tag 'next-20171114' to pick up the move out of staging of TCPM related code. Adam Thomson (7): typec: tcpm: Add PD Rev 3.0 definitions to PD header typec: tcpm: Add ADO header for Alert message handling typec: tcpm: Add SDB header for Status message handling typec: tcpm: Add core support for sink side PPS power: supply: Add type for USB PD PPS chargers typec: tcpm: Represent source supply through power_supply class typec: tcpm: Add support for sink PPS related messages drivers/power/supply/power_supply_sysfs.c | 2 +- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/Kconfig | 2 +- drivers/usb/typec/fusb302/fusb302.c | 63 +-- drivers/usb/typec/tcpm.c | 851 +++++++++++++++++++++++++++++- include/linux/power_supply.h | 1 + include/linux/usb/pd.h | 174 +++++- include/linux/usb/pd_ado.h | 42 ++ include/linux/usb/pd_ext_sdb.h | 31 ++ include/linux/usb/tcpm.h | 2 +- 10 files changed, 1071 insertions(+), 98 deletions(-) create mode 100644 include/linux/usb/pd_ado.h create mode 100644 include/linux/usb/pd_ext_sdb.h -- 1.9.1