From patchwork Mon Oct 23 21:47:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13433592 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 E59F6C25B47 for ; Mon, 23 Oct 2023 21:53:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbjJWVxh (ORCPT ); Mon, 23 Oct 2023 17:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjJWVxg (ORCPT ); Mon, 23 Oct 2023 17:53:36 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38388D7C for ; Mon, 23 Oct 2023 14:53:34 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-507a62d4788so6043064e87.0 for ; Mon, 23 Oct 2023 14:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698098012; x=1698702812; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SN2sLOa9xwGM67Rq52+5iCupQnqxlWnolzeyMPzN3QU=; b=ZZoSqPyd550fbXScvbW2Lf0ybFwCJUOvz73JJd+k1Lw5NiApZF0Oom0hx6qo+x3BEu tpm6EN1+FpjEM6ErziUvqdywm41dRFaYBmObHOi2Pj53ufMqPGnPX4Nd1j7TKrE+xd3k E9ZhE76tgMFTnuc7uhWVPDBQDJyf0iWqpcEpcNXpDBCf6vGv0H6moilmHARlgYuVLIuF LX20Qc2cGxlTGvh7vPeJ3SHLY2v/8IU+da3OW3u02TtvMjmoQxjZYBsgD46srfvVZGln G65kI6R8zjwDCoxIRW1xBWSS0R39xat4NCSODqKaczGAExV+O+YbRDvIXph75HpRjOVj 5Nuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698098012; x=1698702812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SN2sLOa9xwGM67Rq52+5iCupQnqxlWnolzeyMPzN3QU=; b=vcs5WLq+kDimex/sqCHra30Ug9n7HEWZsGuvdqk0H/sXKqxbBvL5nR4wqkJBpC+xhl tsb4iNRkiOxlgYNZVfUw2sYol49aSJ05BIMv3s6n5mBuB9zczzahQuGhx0PDlgUgaQaL rrEgjFSjJ7380YQo1x4PI1D/HtB6/q76MJrIdgYyK6ztAtD5nudjpXdijV31RdYUGXnq QB6RJRWPNtYwTYBQvaZnCfGBbsbBoDMrHYs2MGg7BpJ3gpNRjP5HT56HXbYbJsEDMhLy RpzushwDmIn32aO3IlfCg03Uuwq2FuDv/xtlCeAiOh6uCxLsOF0Dc+mtn4zMpMJme4NA XzYg== X-Gm-Message-State: AOJu0YyeAlVIrh71DXGJeRr1KpQ18nd5EUGpYGzUK1xiJBdi4ReEmQIs qVIeaEljKnfs7b1aHKyWFQ2hRQ== X-Google-Smtp-Source: AGHT+IHuJfk9KdAfnGmoSEogeTq5EFh5oiYm9phVPnu+CdkR8gpXcG8+3xH88P6QZsMQ6U3VJYKPDA== X-Received: by 2002:a05:6512:3449:b0:503:1d46:6f29 with SMTP id j9-20020a056512344900b005031d466f29mr7218271lfr.37.1698098012440; Mon, 23 Oct 2023 14:53:32 -0700 (PDT) Received: from eriador.lumag.spb.ru (85-76-147-63-nat.elisa-mobile.fi. [85.76.147.63]) by smtp.gmail.com with ESMTPSA id g3-20020a056512118300b005079dac9620sm1845143lfr.43.2023.10.23.14.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 14:53:32 -0700 (PDT) From: Dmitry Baryshkov To: Heikki Krogerus , Greg Kroah-Hartman , Andy Gross , Bjorn Andersson , Konrad Dybcio , Neil Armstrong Cc: Rob Herring , linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 2/2] soc: qcom: pmic-glink: enable UCSI on older devices Date: Tue, 24 Oct 2023 00:47:27 +0300 Message-ID: <20231023215327.695720-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023215327.695720-1-dmitry.baryshkov@linaro.org> References: <20231023215327.695720-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Now that the UCSI driver got support for the 'no partner PDOs' quirk, enable UCSI device on all older Qualcomm platforms. Newer platforms, which handle UCSI_GET_PDOS properly, should opt-in to use full-featured UCSI device (see sm8450 and sm8550). Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/pmic_glink.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c index 914057331afd..b524291586d8 100644 --- a/drivers/soc/qcom/pmic_glink.c +++ b/drivers/soc/qcom/pmic_glink.c @@ -16,9 +16,11 @@ enum { PMIC_GLINK_CLIENT_BATT = 0, PMIC_GLINK_CLIENT_ALTMODE, PMIC_GLINK_CLIENT_UCSI, + PMIC_GLINK_CLIENT_UCSI_NO_PDOS, }; #define PMIC_GLINK_CLIENT_DEFAULT (BIT(PMIC_GLINK_CLIENT_BATT) | \ + BIT(PMIC_GLINK_CLIENT_UCSI_NO_PDOS) | \ BIT(PMIC_GLINK_CLIENT_ALTMODE)) struct pmic_glink { @@ -273,6 +275,11 @@ static int pmic_glink_probe(struct platform_device *pdev) if (ret) return ret; } + if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_UCSI_NO_PDOS)) { + ret = pmic_glink_add_aux_device(pg, &pg->ucsi_aux, "ucsi-no-pdos"); + if (ret) + return ret; + } if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_ALTMODE)) { ret = pmic_glink_add_aux_device(pg, &pg->altmode_aux, "altmode"); if (ret)