From patchwork Thu Aug 18 03:15:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 598600 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 283AEC25B08 for ; Thu, 18 Aug 2022 03:12:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242999AbiHRDMz (ORCPT ); Wed, 17 Aug 2022 23:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242683AbiHRDMx (ORCPT ); Wed, 17 Aug 2022 23:12:53 -0400 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08EF2910B9 for ; Wed, 17 Aug 2022 20:12:46 -0700 (PDT) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-11ba6e79dd1so415242fac.12 for ; Wed, 17 Aug 2022 20:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=/Flx4/Oo5ESanVP7AKIxzXsr1aRT9o+BjnyTMGI7qkU=; b=r2kiQ7Tlw0XUtQ+sTLrDduaI03eFa9PGyzJg81Iwits/TAD2l7+o1H5s4V18/+qR+e jtfwcht9ZVo5PyTWXe8ZKymnbB5/OiXvHKsCr2oCOyHf6db1v0Qi3ON2BnwrjMC6bbhb k9GstDvkLuvKdSXH7bRLK8nmIofrqBsFZdpLlAzlpZTzen63PzL52VTthMAtk18DLO3k ZX1aMDrcZL17TZGGP8Gc8mw9mG9720n11Hh43gyznH8up2ExBKWjiar12eua0RJArTeO k0rjT9xjBvJqmJ6Sq+D7cDIUUzb/2tEQm7aJ7LFxD27iuQUbGj9E+BjjxfD5tYSk3p62 OvXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=/Flx4/Oo5ESanVP7AKIxzXsr1aRT9o+BjnyTMGI7qkU=; b=LWjglT+SYhYMVns/AguRPxnqNLNwppihJfduMZkO5zRKtQFNnYKinLRDYid0xYsHqY +0IY34GqTX062CL8IboSlaRhuTH9SVVXHcE9XcpIztC33+IsSf1cRYrNvqdcs1vaZybo X8HqFaej0d5CWUTX/QdnlkbeSAqf6PuY2kAEUTWovqEPvHIQ1o1Sb6AftNQMUvdUN9cK zj00RVPI2OzbiIYo1aTqn9y25620prbTMdaJ3kXyWYlJwOsBV7IGohLGVRXEn4yrD0Hv lPRtz9vWeJPKvdTe6dLuVsmeeg9eNWdocisItCVtiSLolXJmTf0D4fXYMICuOduSsCpy XdVA== X-Gm-Message-State: ACgBeo0lHsFxsg2SEpQDS+ClKmXuaslBR5rHjStQgT9PmLItiGNeNwgw JzlzclCvcaQVO+ZBg5zffSgTJA== X-Google-Smtp-Source: AA6agR6eMk+MtdPrwOVZSddIsIpEOBkiYgjRjL5gQWZFgmVQ6UJqM0KfvV0mQeNYvm8DrutAiUWBsA== X-Received: by 2002:a05:6870:459d:b0:10e:75b7:15b7 with SMTP id y29-20020a056870459d00b0010e75b715b7mr3264835oao.115.1660792365285; Wed, 17 Aug 2022 20:12:45 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id l6-20020a056871068600b0011c25975c1dsm112382oao.25.2022.08.17.20.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 20:12:44 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Sebastian Reichel Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 0/4] soc: qcom: Introduce PMIC GLINK Date: Wed, 17 Aug 2022 20:15:08 -0700 Message-Id: <20220818031512.319310-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This implements the base PMIC GLINK driver, a power_supply driver and a driver for the USB Type-C altmode protocol. This has been tested and shown to provide battery information, USB Type-C switch and mux requests and DisplayPort notifications on SC8180X, SC8280XP and SM8350. Bjorn Andersson (4): dt-bindings: soc: qcom: Introduce PMIC GLINK binding soc: qcom: pmic_glink: Introduce base PMIC GLINK driver soc: qcom: pmic_glink: Introduce altmode support power: supply: Introduce Qualcomm PMIC GLINK power supply .../bindings/soc/qcom/qcom,pmic-glink.yaml | 98 ++ drivers/power/supply/Kconfig | 9 + drivers/power/supply/Makefile | 1 + drivers/power/supply/qcom_battmgr.c | 1422 +++++++++++++++++ drivers/soc/qcom/Kconfig | 14 + drivers/soc/qcom/Makefile | 2 + drivers/soc/qcom/pmic_glink.c | 336 ++++ drivers/soc/qcom/pmic_glink_altmode.c | 477 ++++++ include/linux/soc/qcom/pmic_glink.h | 32 + 9 files changed, 2391 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml create mode 100644 drivers/power/supply/qcom_battmgr.c create mode 100644 drivers/soc/qcom/pmic_glink.c create mode 100644 drivers/soc/qcom/pmic_glink_altmode.c create mode 100644 include/linux/soc/qcom/pmic_glink.h