Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1653086pxp; Thu, 17 Mar 2022 13:40:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4HL6ZUS+YosMG98pAuFJpc0ZYsjKGqqLk/PzqRLBv1mcHYtyFklg/wTunYLdiXHq3CwRx X-Received: by 2002:a65:6657:0:b0:381:1b99:3f04 with SMTP id z23-20020a656657000000b003811b993f04mr5119927pgv.512.1647549653779; Thu, 17 Mar 2022 13:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647549653; cv=none; d=google.com; s=arc-20160816; b=bl2035QNMShiqvH86iZtyq9qzjYYW7NPcq2BoovbeM2d3ecxFbfxXxcwNO7rMXB0RE efWAbKTfF+nDaCxcOUfJO7NKVZHbbaSjtD+97x2M+RKzlC1/LK49TJYkkN+aMFK2FDMg WaZxjptMyQUlKBeukd+/SX90/db7YXskSv9WvcIW4e4avHAl9kjtsbj9GUFmoYbvhuw+ Jb6UMtujLNNNBkFyUe9xACxVu4WtVbMNG6jnhisAkjuSQ8lTp+iQTIcTqN7XLH9vabO4 X9DCKGszfNp/SOnhVEo/JP5+887jHt/8ingHGnVIR50mjZVmTJYcrf1jUyJQp1IpYFQp IuMg== 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; bh=OiMLOjOA9esgQQCmuTCLo51iNlNhJl30mvTG7gi0sLs=; b=czP4yJ8LJUqUzQM4DFy+xuSOEYrqK+vbqZOVW9h+0nMe0e9cO8O0FMJ57fbxrEYyOL WnypBDmDJEmRKFGxUOAqbAHwJmDMHMmjVlbxqXNWRZyDEKkjOXg0OtC+OEdarBAMY7gF 44+B6lpgvDX6v/MVslXtlO2MWxuulmoY9bq895fKiLOrmjKEUtcz1f3AI7tW1bSdmt5M lbw9sxDnHCBsrhieG688PGBnt95n5HiRGp0jLbbKa8sHjsdaLLeXSCixRb7uNOj85mj5 016amM9EVPmS7rIFlcXjxqXHbIWIqdTi1MpO7N+ZeE0SGgoyafyCTc4/P1ccm46EnN5J VaUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g21-20020a63e615000000b003816043f0a8si3193126pgh.669.2022.03.17.13.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:40:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7DAAF293408; Thu, 17 Mar 2022 13:09:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236145AbiCQPuQ (ORCPT + 99 others); Thu, 17 Mar 2022 11:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236164AbiCQPtv (ORCPT ); Thu, 17 Mar 2022 11:49:51 -0400 Received: from comms.puri.sm (comms.puri.sm [159.203.221.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D8E39BA2; Thu, 17 Mar 2022 08:48:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 0C9D4E0186; Thu, 17 Mar 2022 08:48:28 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8c350X3jHgUq; Thu, 17 Mar 2022 08:48:27 -0700 (PDT) From: Sebastian Krzyszkowiak To: Heikki Krogerus , linux-usb@vger.kernel.org Cc: Sebastian Krzyszkowiak , Greg Kroah-Hartman , Sven Peter , =?UTF-8?q?Guido=20G=C3=BCnther?= , Angus Ainslie , Hector Martin , "Bryan O'Donoghue" , linux-kernel@vger.kernel.org, kernel@puri.sm Subject: [PATCH 7/7] usb: typec: tipd: Fail probe when the controller is in BOOT mode Date: Thu, 17 Mar 2022 16:45:18 +0100 Message-Id: <20220317154518.4082046-8-sebastian.krzyszkowiak@puri.sm> In-Reply-To: <20220317154518.4082046-1-sebastian.krzyszkowiak@puri.sm> References: <20220317154518.4082046-1-sebastian.krzyszkowiak@puri.sm> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 BOOT mode means that the device isn't operational because of missing firmware, so there's no reason to try to continue in this condition (probe will fail in a different place anyway). Aside of that, the warning that used to be emited about "dead-battery condition" was misleading, as dead-battery condition is a different thing that's unrelated to operation mode. Therefore, assume that BOOT mode is not a supported mode of operation. Signed-off-by: Sebastian Krzyszkowiak --- drivers/usb/typec/tipd/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index d3c70aaf1a0c..c818cc40139d 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -729,8 +729,6 @@ static int tps6598x_check_mode(struct tps6598x *tps) case TPS_MODE_APP: return 0; case TPS_MODE_BOOT: - dev_warn(tps->dev, "dead-battery condition\n"); - return 0; case TPS_MODE_BIST: case TPS_MODE_DISC: default: -- 2.35.1