From patchwork Thu Nov 18 21:02:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627707 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F034C4332F for ; Thu, 18 Nov 2021 21:02:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24E9061929 for ; Thu, 18 Nov 2021 21:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233084AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36926 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230422AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id E68AECAD7C; Thu, 18 Nov 2021 21:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269371; bh=8tlSrro64Z/lABOoSyH9T70DBxFcqqceD5mOCWLL68M=; h=From:To:Cc:Subject:Date; b=o5tjir4D7XXdxYNTREpyc/K2jbBGwHuKmtlPDSNdqDTEFDplpeYsdiFrb97nT1RdK X93Rva4ViI6MxqKg0ELys2ZYydXLOdnfAjtmIEmr2OWA0cJvCGu+73XfFuir7mrv3a vwQdmV8B1GnGHC0zWVBI+uDcV8jy4zao23nC6CV4= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Sebastian Reichel , Rob Herring , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Date: Thu, 18 Nov 2021 22:02:04 +0100 Message-Id: <20211118210210.160895-1-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The charger in PM8226 (used in MSM8226) is similar to the charger in PM8941. Signed-off-by: Luca Weiss Acked-by: Rob Herring --- .../devicetree/bindings/power/supply/qcom,pm8941-charger.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml b/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml index bc8904872d1b..caeff68c66d5 100644 --- a/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml +++ b/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml @@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: qcom,pm8941-charger + enum: + - qcom,pm8226-charger + - qcom,pm8941-charger reg: maxItems: 1 From patchwork Thu Nov 18 21:02:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627709 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93011C43219 for ; Thu, 18 Nov 2021 21:02:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 793F261A02 for ; Thu, 18 Nov 2021 21:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233147AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36936 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231950AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 5667BCADFE; Thu, 18 Nov 2021 21:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269371; bh=VkZLd4MrD1jYefgkbKqN/uBus6sSvz99v85KNgNeEo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WhArt4LnAT0NYc1Te9WK/DU1BrV1BFN3qq03WK/VfTMLGArhJN+vVjRJrrcSm5g8S XDSdd4xtzhCgaAvgZa6a1y7KTLc/oWPclRtm3YL7GG5caGPJcPGRO063cgNV6Ph83R XGxS8TN+TW+lfISRVtsS6vuyADHQ1FfXfSZgQI5E= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Sebastian Reichel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] power: supply: qcom_smbb: support pm8226 Date: Thu, 18 Nov 2021 22:02:05 +0100 Message-Id: <20211118210210.160895-2-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211118210210.160895-1-luca@z3ntu.xyz> References: <20211118210210.160895-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org PM8226 (used in MSM8226) has v1 smbb hardware and works fine with the current driver. Signed-off-by: Luca Weiss --- drivers/power/supply/qcom_smbb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/qcom_smbb.c b/drivers/power/supply/qcom_smbb.c index 84cc9fba029d..bd50124eef9f 100644 --- a/drivers/power/supply/qcom_smbb.c +++ b/drivers/power/supply/qcom_smbb.c @@ -863,8 +863,8 @@ static int smbb_charger_probe(struct platform_device *pdev) } chg->revision += 1; - if (chg->revision != 2 && chg->revision != 3) { - dev_err(&pdev->dev, "v1 hardware not supported\n"); + if (chg->revision != 1 && chg->revision != 2 && chg->revision != 3) { + dev_err(&pdev->dev, "v%d hardware not supported\n", chg->revision); return -ENODEV; } dev_info(&pdev->dev, "Initializing SMBB rev %u", chg->revision); @@ -1012,6 +1012,7 @@ static int smbb_charger_remove(struct platform_device *pdev) } static const struct of_device_id smbb_charger_id_table[] = { + { .compatible = "qcom,pm8226-charger" }, { .compatible = "qcom,pm8941-charger" }, { } };