From patchwork Fri Jan 13 04:11:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 642890 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 E51ECC54EBE for ; Fri, 13 Jan 2023 04:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238379AbjAMEMs (ORCPT ); Thu, 12 Jan 2023 23:12:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234634AbjAMELz (ORCPT ); Thu, 12 Jan 2023 23:11:55 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1123761313; Thu, 12 Jan 2023 20:11:41 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30D3TBG3007409; Fri, 13 Jan 2023 04:11:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=FgrnE3uDR31VvIPVFnTjM4rDKI7sAez5H4TTb8LGUUA=; b=EYQ5akbvOuIzRQ98P+kKsFO3lz8Wgk9pDfnsoUKbTMjLgRBRFjbNt0jDNus4rquDGAw1 j6sV5CNBv0uhWbmLm2ASrf+j2YAvxHBjTqNUFCotnI6Y2UbbRrxBF4uCWSNK/8E5lwwE 1BtdEIDhRiu5+0EgLdgtMMnMbcGtE0XMU7MUhj0JcxjlirPbOyHScoFkcL8ojXGiuiOF p92A/ynJdhZmCpJ2sNd9A/TnVhQ0BhkhS1BuD871iG8RU3yWxq2EWY/y3GFIG4qCM4W9 a4bIhIRYOdXWZnGCkFj7sslm50r+tHT6i7gXTQoYlxkn1o/W3Fn4Xt0i3cOZspMsvxyd zQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n2jghsnev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 04:11:38 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30D4Bbc3031173 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 04:11:37 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 12 Jan 2023 20:11:37 -0800 From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Sebastian Reichel CC: , , , , "Subbaraman Narayanamurthy" , Johan Hovold , Neil Armstrong Subject: [PATCH v2 0/4] soc: qcom: Introduce PMIC GLINK Date: Thu, 12 Jan 2023 20:11:28 -0800 Message-ID: <20230113041132.4189268-1-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: oP24DT4V-EEved4HU8fi3a0WIQXF36Nh X-Proofpoint-ORIG-GUID: oP24DT4V-EEved4HU8fi3a0WIQXF36Nh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_14,2023-01-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 priorityscore=1501 phishscore=0 clxscore=1011 bulkscore=0 impostorscore=0 mlxlogscore=852 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301130026 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 | 102 ++ drivers/power/supply/Kconfig | 9 + drivers/power/supply/Makefile | 1 + drivers/power/supply/qcom_battmgr.c | 1421 +++++++++++++++++ drivers/soc/qcom/Kconfig | 15 + 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, 2395 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