Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5756560rdb; Sun, 17 Sep 2023 10:46:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFoLIsWlt2Ow70hDVj5tQngfOdUFlYR05ZQ2VwtrBl7dIsxoGg2aUFvzhuqRHPJJs5veTn+ X-Received: by 2002:a17:902:e742:b0:1c3:94a4:34bf with SMTP id p2-20020a170902e74200b001c394a434bfmr6645073plf.66.1694972779487; Sun, 17 Sep 2023 10:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694972779; cv=none; d=google.com; s=arc-20160816; b=hbNGPHjqzzxNN0aWfF6DoBFfgCSLDpQSNWMjfqlcIBpGeFZn/ujmJBgiBE4K04HKxB oKmJUawgKXi1u1dlKOOlwiKzN+PxLR5RmbE1lTHp7ou8rF6t9wG++4Z7zHkTGOq1l2/h oVVvv/9T1tDP5CIW7Hv7BXmDmCiK7+YE4x67CGjLsCW/U5Q959ZRdFDC6hsHMukEuHvF /a40IsejQVD7LzvAcCDFat0oqBnguMfBbJ4fRdQwxJcP1Wf8vyVcEPHNYxUNJ6IovAIj 8W+5VKox4s6Bh8uVdbNoEruNQpboYOctH16eeUOQ1JyNZrTTmOuguckcCLhVv8GrS2VQ sdAw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LD+60v9C6UaRp0/siQLtHNIFl77ZDBkVdyJlYrRa+7Y=; fh=1TLHXZLxbVW/pzxFCwcQN1QIszWWCFgsgFdloZrlyPk=; b=OIV5eA/8pAQi6pHWZotecHoA+ly/x2bI1orrkXbvkQbcRnmYSua70Qcfp0atu1ZCT2 uxBuVjgYU9K4c5akvz0TP+e6OImQzJQIZeJpfrVtFHVx0YeKpOw5TKBLGfg7n4WdZRP0 2UbhMB+Rg1d0z2bWGyEkOCExbOEfGUhdCy2Hg1RCYUSKmBoHKqUTkzkq5QqWluoLIoob uLNAv6tfL7mxvPloUFSc49AZ7XEAGO8SXanMYQoT89/APwnKwnKba7EgUYI0/E7yX//0 abMe3LceuTUYfr0YeO0bjCkPUtH6I9CrfJS6tmf8GKuP3Wd5Swolvihmkw2HOzb5C2FQ h1hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gv1GZU9p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f9-20020a170902684900b001bbdd44bbd0si6585238pln.176.2023.09.17.10.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 10:46:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gv1GZU9p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EAD6280755D1; Sun, 17 Sep 2023 08:33:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236591AbjIQP2e (ORCPT + 99 others); Sun, 17 Sep 2023 11:28:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236022AbjIQP2C (ORCPT ); Sun, 17 Sep 2023 11:28:02 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B740120; Sun, 17 Sep 2023 08:27:57 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-403012f27e1so39450635e9.1; Sun, 17 Sep 2023 08:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694964475; x=1695569275; 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=LD+60v9C6UaRp0/siQLtHNIFl77ZDBkVdyJlYrRa+7Y=; b=Gv1GZU9pH77NwfVpQIXgURem5swR3VLvbLwVzgtCXu+IojZri9otJ54Gj/r1pGOz3Y fhffDw+HELJw0TRA+qf0+ZvJJB1AfUzpjXuBS6VFVTvqOIBo2D3894Fyt8AHc00JybyZ m+/P2IvvZCCS3/kQn0zW9FQN0+mZ6UeDQSTW/biqvtsBk2bwW4Ez3XhC2NX8NfaMOgFF 6S+hfweTp9sqY8Mbvb7Lm7RyMVpe8ooegY1DXeR+8wet3M8KTJlUFKyK9oMiZ+zoTwya nHxIwKmAIDzu4fbrwksD1Ty4cCLgLQXBYluCVU+XzGX7VGL0O8e0kMOF6xXAeR9W0ZpN 1QAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694964475; x=1695569275; 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=LD+60v9C6UaRp0/siQLtHNIFl77ZDBkVdyJlYrRa+7Y=; b=ilMMzHBwBBOIoWkSXW1zjcnJ/bKBcFGZ6LbS0koP5qniuSAkhmPoED9lxlCOYZfF1h xevSQt6ag8aISEkpEwQ4FYSqFM6B/qd8/YCcHcPzGu+56TOJLJJz4tR7Wz+/NrnRwkso uPNhEWYbt8l0u0sA+CRs69F93J8q1kYJZx/vElsI1jLhIogjDjiB/E9BkHwCAMPKLgow n6AasUzBxOHJ7pUZioNNPaw+lc4i+eH4BCfIN6zTZUUePIHJUyxbXYeiRvWvm3M4JHJl bumeSkXRGqTCQU3lfKSvJD3r+6hKayk/Fkp9WHP20FtB3hoCwyH+Igeo/b+5EHn6YH6P JArQ== X-Gm-Message-State: AOJu0Yyi9XihZt94z+d5nphykaprFW+O+bqJwzC71XI/LkycM/Nrup3V tRPAY7rdsUKGXuyQhU36U2g= X-Received: by 2002:a7b:c40b:0:b0:401:be70:53b6 with SMTP id k11-20020a7bc40b000000b00401be7053b6mr6000332wmi.15.1694964475610; Sun, 17 Sep 2023 08:27:55 -0700 (PDT) Received: from localhost.localdomain ([5.45.134.53]) by smtp.gmail.com with ESMTPSA id j23-20020a05600c489700b003fe15ac0934sm7388865wmp.1.2023.09.17.08.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 08:27:55 -0700 (PDT) From: Abdel Alkuor To: heikki.krogerus@linux.intel.com, krzysztof.kozlowski+dt@linaro.org, bryan.odonoghue@linaro.org Cc: gregkh@linuxfoundation.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org, linux-kernel@vger.kernel.org, abdelalkuor@geotab.com Subject: [PATCH v5 15/15] USB: typec: Do not check VID for tps25750 Date: Sun, 17 Sep 2023 11:26:39 -0400 Message-Id: <20230917152639.21443-16-alkuor@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230917152639.21443-1-alkuor@gmail.com> References: <20230917152639.21443-1-alkuor@gmail.com> 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,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 17 Sep 2023 08:33:15 -0700 (PDT) From: Abdel Alkuor tps25750 doesn't have VID register, check VID for PD controllers other than tps25750 Signed-off-by: Abdel Alkuor --- drivers/usb/typec/tipd/core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 326c23bfa8e6..c1399e12a170 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -1142,10 +1142,6 @@ static int tps6598x_probe(struct i2c_client *client) if (IS_ERR(tps->regmap)) return PTR_ERR(tps->regmap); - ret = tps6598x_read32(tps, TPS_REG_VID, &vid); - if (ret < 0 || !vid) - return -ENODEV; - /* * Checking can the adapter handle SMBus protocol. If it can not, the * driver needs to take care of block reads separately. @@ -1176,6 +1172,12 @@ static int tps6598x_probe(struct i2c_client *client) tps->irq_handler = irq_handler; + if (!tps->is_tps25750) { + ret = tps6598x_read32(tps, TPS_REG_VID, &vid); + if (ret < 0 || !vid) + return -ENODEV; + } + /* Make sure the controller has application firmware running */ ret = tps6598x_check_mode(tps, &mode); if (ret) -- 2.34.1