From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11DCEC64E75 for ; Thu, 26 Nov 2020 17:03:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA4F42145D for ; Thu, 26 Nov 2020 17:03:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391623AbgKZRDV (ORCPT ); Thu, 26 Nov 2020 12:03:21 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:46790 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391568AbgKZRDT (ORCPT ); Thu, 26 Nov 2020 12:03:19 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 1A4CDFB04; Thu, 26 Nov 2020 18:03:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MEhzIyxxQDjY; Thu, 26 Nov 2020 18:03:16 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 991F74068F; Thu, 26 Nov 2020 18:03:15 +0100 (CET) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Heikki Krogerus , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/1] usb: typec: tps6598x: Export some power supply properties Date: Thu, 26 Nov 2020 18:03:14 +0100 Message-Id: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This allows downstream supplies and userspace to detect whether external power is supplied. The Librem 5 has the tp65982 in front of bq25980 charge controller. Since that is capable of sinking and sourcing power the online property helps to decide what to do. It also makes upower happy. There will be follow up patches providing more properties but these need some more time to cook and i wanted to check if this is the right way to go? changes from v1 - As per review comments from Heikki Krogerus https://lore.kernel.org/linux-usb/20201126123552.GP1008337@kuha.fi.intel.com/ - select POWER_SUPPLY - use POWER_SUPPLY_USB_TYPE_PD when a PD contract got negotiated Guido Günther (1): usb: typec: tps6598x: Export some power supply properties drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/tps6598x.c | 105 +++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) -- 2.29.2