From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755063AbdKARDO (ORCPT ); Wed, 1 Nov 2017 13:03:14 -0400 Received: from mail1.bemta6.messagelabs.com ([193.109.254.105]:15328 "EHLO mail1.bemta6.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754846AbdKARDM (ORCPT ); Wed, 1 Nov 2017 13:03:12 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrIIsWRWlGSWpSXmKPExsUSt3Opsa7vv5+ RBld+mVs0L17PZvHm+HQmi67VO1ksLu+aw2bxufcIo8WiZa3MFk8WnmGyaFzwnsXi9O4Siz/P b7E5cHnsnHWX3WPTqk42j3knAz32z13D7vF+31U2j53fG9g9Pm+SC2CPYs3MS8qvSGDNuPL3D nvBQ/6Kq4dWMjcwLuTpYuTiEBJYxyix5cVD9i5GDiCnQmLHPPkuRk4OXgE3ie83fzOD2GwCFh KTTzxgA7FZBFQkTnQ1gdnCAs4SXYsus4DMERGYxyTxasNdsASzQJ1E7++3LBCDBCVOznzCAhG XkDj44gXYUCEBA4nTCxrB4hIC9hLT319lBrlBQkBfovFYLETYUOL7rG9QJeYS7Rv3MU9g5J+F ZOosJFMXMDKtYtQoTi0qSy3SNbLUSyrKTM8oyU3MzNE1NDDTy00tLk5MT81JTCrWS87P3cQID H4GINjBeGBR4CFGSQ4mJVFezfs/I4X4kvJTKjMSizPii0pzUosPMcpwcChJ8F77A5QTLEpNT6 1Iy8wBxiFMWoKDR0mE9xtImre4IDG3ODMdInWKUZfj2czXDcxCLHn5ealS4rxbQYoEQIoySvP gRsBSwiVGWSlhXkago4R4ClKLcjNLUOVfMYpzMCoJ854HmcKTmVcCt+kV0BFMQEd4SfwAOaIk ESEl1cAo8uFc4iopQbeVN6VWd3hcy4oLv1rGmmxSxab4kblHj+Pc4wl2fzkDNyfqee3b6cj9X u5EeoxA6gqflJAGvZuhDGIvQnY8Wd12L317WsnDS65Zde1Hm+rOqLEFF+c+2Lbt/Vt2ASsvqZ iWf4m7z9UUJKV2OfeXPpxx6tILK95P3Px1K5Z5aymxFGckGmoxFxUnAgBx4p7KBAMAAA== X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-2.tower-194.messagelabs.com!1509555789!10604950!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: Wed, 1 Nov 2017 17:03:08 +0000 Subject: [RFC PATCH 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: 01/11/2017 12:45: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. So with all of that covered, please feel free to rip this apart as you see fit. Note: Code changes are based on linux-next tag 'next-20171017' 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 | 816 +++++++++++++++++++++++++++++- include/linux/power_supply.h | 1 + include/linux/usb/pd.h | 162 +++++- include/linux/usb/pd_ado.h | 49 ++ include/linux/usb/pd_ext_sdb.h | 40 ++ include/linux/usb/tcpm.h | 2 +- 10 files changed, 1041 insertions(+), 97 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 0/7] typec: tcpm: Add sink side support for PPS Date: Wed, 1 Nov 2017 17:03:08 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mail1.bemta6.messagelabs.com ([193.109.254.105]:15328 "EHLO mail1.bemta6.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754846AbdKARDM (ORCPT ); Wed, 1 Nov 2017 13:03:12 -0400 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. So with all of that covered, please feel free to rip this apart as you see fit. Note: Code changes are based on linux-next tag 'next-20171017' 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 | 816 +++++++++++++++++++++++++++++- include/linux/power_supply.h | 1 + include/linux/usb/pd.h | 162 +++++- include/linux/usb/pd_ado.h | 49 ++ include/linux/usb/pd_ext_sdb.h | 40 ++ include/linux/usb/tcpm.h | 2 +- 10 files changed, 1041 insertions(+), 97 deletions(-) create mode 100644 include/linux/usb/pd_ado.h create mode 100644 include/linux/usb/pd_ext_sdb.h -- 1.9.1