Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5533504rwb; Wed, 17 Aug 2022 20:42:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR71RCXzUO4BshWgSd+PCof8bcU5OGGnRIUJkhvUEQGGHGb3iXNAKSzdmSLgqNJPn+MZIeBK X-Received: by 2002:a17:90b:3b4f:b0:1f5:82c1:4f46 with SMTP id ot15-20020a17090b3b4f00b001f582c14f46mr6947857pjb.71.1660794150584; Wed, 17 Aug 2022 20:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660794150; cv=none; d=google.com; s=arc-20160816; b=EXLi0skfaaugI26tDHa+4YoUgK+gcHcq28pB2P8bdS3dl216AFKYRCerQ9/ROWZgTl uzFWt8ZKsa7HrdmrkNXgHaa8bVp7FRyYdIWST/xRkV3vZ4VDbKPkhHxvlV6UBhjUrImt Bt0pzXydX/GjppmY3y/mSDt28t6ZFyytD/+BxYIRjgzvlKEsyLAmXk+5BSBVZH/N5/qA TQ1lBODGyGxDRSs8UGpFBSjb/K0uegjxSTVxWfWMo/FzkimjUFEeNPsukHRfyDFGGiNG lvtVcb7vuSWDutH6EM2xpLk9H1rnrSv4wMOB6pD3mMEnyOKTRJeordPLggEv6ZdG4HMK wR5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/Flx4/Oo5ESanVP7AKIxzXsr1aRT9o+BjnyTMGI7qkU=; b=mJ8up/3A9xxAyzyv5/NBtCyetfD/CJsvrDdM7kIj98EkaZRc4fo7qeOeEo/sCtC45R RONeYsJeGhkJsStoL3jJKbg8K+ZM1OvCH7IjE949vIJi9s3H6i68vHRNSG/QJc9Y4mVL H4OFuU0Hmg0QUJT+FE9ET+/avudN25MxfMlTgTD31T8yLL32wRxk6DUV6PGb12Yivu/T wetaOtCeFypLJEpE8xHTbma6NKakm162S9Y6DQdnPdTQbbsfnionJNAcj/QONDUnBuJL Fs8fcnvUaakRbI1gS64ddQQebBcbMpL6KaztRwGKLACBf1bwZqYssnKuw59ZJFoUQWba maGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r2kiQ7Tl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r16-20020a635d10000000b0040de79f8b78si436707pgb.500.2022.08.17.20.42.14; Wed, 17 Aug 2022 20:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r2kiQ7Tl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242992AbiHRDMy (ORCPT + 99 others); Wed, 17 Aug 2022 23:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239169AbiHRDMv (ORCPT ); Wed, 17 Aug 2022 23:12:51 -0400 Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 070937C331 for ; Wed, 17 Aug 2022 20:12:46 -0700 (PDT) Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-10ec41637b3so445608fac.4 for ; Wed, 17 Aug 2022 20:12:45 -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=JrXK7bcwVjlFArUurRVe04J2+qKqZ0RGJ5x6TbLQfJ0wEQIUAGrIyvX+jqxaY5uqnC m9QfepR1m+Ai0UjYLrI1/3wN/aAX07LGoW+L3WF65akOJbSG3TrtHbTYUfNAYx4BEA46 j3/Lw7zPzji6Yey51epQTakmo91rWASRdRK3nQzAoFKG91cgOMTLkDIwoQm/S0DetWDZ SkZitsW3amWSwVvQrAf6+ePKz8qEUyGOisZxjxNhsl8y9B/T1RA4eFPVdLS6mqFXQhI3 33pgJu9ND4GsHTk/kImu/Nk10G8xHqLDUHUEIr6Sk3n0jer57+gen32SfbQOnXS9/NGS 7ccg== X-Gm-Message-State: ACgBeo3dHZRYnBnCeF7ZgjMZQuGrONS70fC13xy/UOQmjhR7NvhmIKZA wXbd5EIxSsNMIluAxJu5Uljh1w== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 -- 2.35.1