From patchwork Tue May 23 07:15:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13251602 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF1FFC7EE2F for ; Tue, 23 May 2023 07:16:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7fRMQY/SyCGZQZP1BO+BaPLOpODz1dqauBwTL5uwVes=; b=zBvkBSFbj4W9xQ sEGuIBXpM4QgzHiQji1RVvDbIc2fB4lPVoPrycMpCXQUN3gUEl5dpC5mwMsLZx9qHpfUHcHfHwJKM ZeE/iwOL2o+N2CaPYr6lENHQzNVaBh78KPWtOWMdu4gLR8Z5nZ2Ii0hkEng0mrgEHg3lRJa7uyUvd B2GE7VnMNyTZKowK9Q6Oe429DhBFsmzIsAyKtcuT9ZzmyZWdxqdNbp1RxKz83ZK9XaqmNJrJYWtJE tZOvTDyb5Lnc7xt+RCJR47+di6Eam+toCENczVJsP1EMxiicj6fj7Edoj0sKMAbu+Uxc8egVuwmiM cdWtYRI9SRHC+Xc11fRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1MFe-009BZL-0D; Tue, 23 May 2023 07:16:10 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1MFT-009BTs-0v for linux-arm-kernel@lists.infradead.org; Tue, 23 May 2023 07:16:06 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-30a992a9c3eso495444f8f.0 for ; Tue, 23 May 2023 00:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684826157; x=1687418157; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dqfFtZjpBwpHnbanMeS8saew2f7WSD17vQFnp7exxSY=; b=ELwx8MuM+3lQ8JRNfRhIcN5j/fhD7qpkvAgmUfa15HXJL+N3iftke1aNpTr3LOk3AF w6AbAG203Dlubntrv+qxc4Sw6J56ZZrHTTDqaFw7FVL4kKmvq5dUQsXiIdmLXgnC4Oma Hl0JZ80utXtGC+wlkrHQC8rkRSYcI3BciBQPpfLVUKBOO7ZYBNbwvfVYFC+JyJp3G+7y a0KTjIEAyRRLlw0Zu76PaUL4qNH/KYWPo4MuDYC+q9UqGVvMFW63/swtfuCVCcqVF21P gpfDrCWT0Jaxb86D1Xn5LZvmZXCuKXkJx7mvjMef0d4HOoulLNP4OofTFfcH2NFPzNXJ upZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684826157; x=1687418157; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dqfFtZjpBwpHnbanMeS8saew2f7WSD17vQFnp7exxSY=; b=KrYIOhPeY9Gw5M++BLHV9M7CM3MY07drm7iJZ0Wh0q1JFJxG+3t2eNp3a9gcfMRaQb P4N/eIn3h2lF3NOihDsbmmKnADNs2YqXX6xxysSccfdZq/5XKzlkHdtpclxSP+SBJWjY lIuOpdC/MHHSct5gfThZSBH08VtWL85fuiRYeG/H89a1jDjVMqMVKVvMD3vYrsyr9Yru F1nyOzkPMgWesYT4xCXW1QJMgRJa6x+rsvFjvTeNY2vIrI4d3IDDfKADVStVsT5P11dv dBaTjouBlzxz/6SyZdBz82UWZVh8Yod095eD6Gl6PwiBlscY7OQnhmIM9cf1EmOeBGQR QASw== X-Gm-Message-State: AC+VfDwVRNQXpKMH9nfJUvA3JOtlPvQIFMmkuoK2f6o+iFE9UjOQvMoD DbyhJWilfTTQVkr3u+GX4JZEsQ== X-Google-Smtp-Source: ACHHUZ5zuYspmr1qTK+GSeX740r9P7sdIPRlFZuzTwCaKyhcWCwH1W3y06lAgoOlsBNlb6Ot0IvRVw== X-Received: by 2002:adf:dc8b:0:b0:303:daff:f1a3 with SMTP id r11-20020adfdc8b000000b00303dafff1a3mr10861571wrj.1.1684826157493; Tue, 23 May 2023 00:15:57 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id x15-20020a5d490f000000b00306299be5a2sm10096239wrq.72.2023.05.23.00.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 00:15:57 -0700 (PDT) From: Neil Armstrong Date: Tue, 23 May 2023 09:15:50 +0200 Subject: [PATCH v3 6/6] qcom: pmic_glink: enable altmode for SM8450 MIME-Version: 1.0 Message-Id: <20230503-topic-sm8450-graphics-dp-next-v3-6-6c43d293995f@linaro.org> References: <20230503-topic-sm8450-graphics-dp-next-v3-0-6c43d293995f@linaro.org> In-Reply-To: <20230503-topic-sm8450-graphics-dp-next-v3-0-6c43d293995f@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1399; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=qkASJFOC8Sum3nf8ciK4XNKG+cxf4hgwBJ+cUAn3rO4=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkbGgm6WlljbzOT5Ebr1dohSDk9ClWJzy9HlvwA/f0 A/9B+JWJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZGxoJgAKCRB33NvayMhJ0SPgEA DEDRyKtKbsbfDCe80qP4eiPCG5tzJ8+4FRj5EMisHLJdYofti/C0lzSjEjbpFMV79pMP1Mvus8pGRY 17EvHxpYpQJtB4kwHo1pUtvKXFW87g1RRY3BYT8eXLIVe2orFLAAhBCZBqLYHqrRyj2tsEpC60ybQV Iw0d0nm81h+NmSRxis5hel0FdMvdF5PbA2E1ibczb7xQ71hPc3ZPHfjma2RQdgTZPGMrmlkR1vtVo+ UzHmZaYgbkzTWYL5NOlLk//waI1zzGgay7/KMIumVFEEpYKaFpAAFkwq32AZ5n8S2mbCrdh6Mf5QG2 nofnyrh3ckMWoVo8IE9izjAxUIhTSTkyZmOjc7Ldptg7PnunrvCQnwGrGksbysemjBuSa1nhbXEP2C kgaBlhUJKSCpDKfUnfSrmTp0BtZuJ+72o6QDYh9/oQpxauLTbV5O2fwyq6Hzlos8HHUmlS/KMexqi8 WkPhF60nmo+AKAQVQhqrUlZ/pD4/S4B64yYTv2CYYgNr7HP1RD+Vx/Ri4LW+IflLuY47hu9Umdv0V3 pGAglRRKprzWmIftNxn0MlSKQQqgqV3B5odwLdS8cBTw+bIHj0P3dSw0ozpYPuSjxU0my37eTrfw5s Kry1pklsjRGvXp+L9LevylGWGeKQfQygn5Qnd4YU25u6b9W6o60nwK2dVskQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230523_001559_325519_9F26D886 X-CRM114-Status: GOOD ( 13.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Create a separate bitmask for sm8550 and enable altmode aux driver for sm8450 platform to enable pmic-glink altmode events. Signed-off-by: Neil Armstrong --- drivers/soc/qcom/pmic_glink.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c index 8bf95df0a56a..c87056769ebd 100644 --- a/drivers/soc/qcom/pmic_glink.c +++ b/drivers/soc/qcom/pmic_glink.c @@ -338,13 +338,17 @@ static int pmic_glink_remove(struct platform_device *pdev) return 0; } -/* Do not handle altmode for now on those platforms */ static const unsigned long pmic_glink_sm8450_client_mask = BIT(PMIC_GLINK_CLIENT_BATT) | + BIT(PMIC_GLINK_CLIENT_ALTMODE) | + BIT(PMIC_GLINK_CLIENT_UCSI); + +/* Do not handle altmode for now on those platforms */ +static const unsigned long pmic_glink_sm8550_client_mask = BIT(PMIC_GLINK_CLIENT_BATT) | BIT(PMIC_GLINK_CLIENT_UCSI); static const struct of_device_id pmic_glink_of_match[] = { { .compatible = "qcom,sm8450-pmic-glink", .data = &pmic_glink_sm8450_client_mask }, - { .compatible = "qcom,sm8550-pmic-glink", .data = &pmic_glink_sm8450_client_mask }, + { .compatible = "qcom,sm8550-pmic-glink", .data = &pmic_glink_sm8550_client_mask }, { .compatible = "qcom,pmic-glink" }, {} };