From patchwork Tue May 30 06:59:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 100573 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1992764vqr; Tue, 30 May 2023 00:17:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4SNlOTuWy2qPaUGnyR/OpJ355Ap6M0QHnAlVqs2jUsaD/B2j4gWej7ewGKlxFcDPRb1DRZ X-Received: by 2002:a17:902:e886:b0:1b0:471c:4c3 with SMTP id w6-20020a170902e88600b001b0471c04c3mr1777042plg.40.1685431020471; Tue, 30 May 2023 00:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685431020; cv=none; d=google.com; s=arc-20160816; b=DJY4eLIvtKabfUTVZBAH7NVsVb7vBDBYRxDuEFM572ttLE3UIQXbqzTN3PkK1m2ZF/ JKkVM0Vg4IcRCPglSiXiGZFV24RxmJv8Etin3hq4eYmB8JXzsoBIXzUdfpJzBmAcM/w5 chtjpQwiONLE0iFIYnBIwSYRXCrmEHh8HXTlEeZkKQ91LU+eO89d0lBAFDsSUkPC4BZ+ 1P6HGAron3fxOZ/Ivqnem8OdjBXs+o40ua9qUJAz8RYMDbFDdR3QPB7OYw34sWNscdDZ IWbrgQsSp5JlFJEZQCEF09oOD5uZ/VumOe0eIQb1ZMZhIs8taeGms26rGGGXSKGuwnys XX6w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=J0vbsaygTriJBCwMnsghcLKOsPMyJSf+C5zXiacasfo=; b=uQODgK8+9K/1mlh8JQSXfFQRJA9gG+2Pqxntmw1VsF3VjD9HQ8kSTclNR+k4Vo2vqz V9vBVeWZ3L5CwE7qHqky4HFxiB2skVKDuii6PHLqaVwj8UaAlpA1yTQAqxtQqsRcMRTR DQMAIqsRB1jRMOXIbGXffWr7TfZkGO2JV23ePdFO4GKVXZ9tklihkUYjdpTkFia0H0I8 BMlLlAdKzU55b8yxx8Txv9hyK3xHDVL4VE2JgttzzMXkl4EaPMNr/H68qQRuhT7WpK4z wZ7SpRzyIcxcYkE1HmVw5tYMTVywOWExepd83GX48CE+XUefmp90OjFw9ua49x0OcNXM nHcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o9xq2oz6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a17090332c100b001a64e7b702fsi808577plr.447.2023.05.30.00.16.47; Tue, 30 May 2023 00:17:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o9xq2oz6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230324AbjE3G7k (ORCPT + 99 others); Tue, 30 May 2023 02:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbjE3G7d (ORCPT ); Tue, 30 May 2023 02:59:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD4EBF0; Mon, 29 May 2023 23:59:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 634A762ABF; Tue, 30 May 2023 06:59:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C57AC433EF; Tue, 30 May 2023 06:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685429971; bh=U77OJ8fJKSyaH0FzfLIhkbSEu3xCuzLCd877xbOniB8=; h=From:To:Cc:Subject:Date:From; b=o9xq2oz6vEhIM1Out6TzkYRnLr9vAbDibtwAIow6Tqz9YCpzpYNX+bMQRIXeHdbZ+ bl+8qLeYe2G5mTZydvlInQg572wQC/aApWK3p+EgWqwnhG2PVWf5D7+U7pVIn13PbO /hHQ0+5Lp6hRyN9U7otGztcLg+C8eBFqUW9soGuaurKpJlGUCgJOl+wa7rwpYiDkV8 HCdChvBkNFgTjUrrnZKg2CooMj9PoFXKvXkrkIk5ynbZyMOk518FL93KtHOvzEBLVV kusYo05TrPgJk0Q3riUqEQcsfRn+7vha8feCstdwn0h6RMOTCIJBEzdfAH4XUBDONy n1Y7beX6KSIZg== From: Roger Quadros To: gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com Cc: r-gunasekaran@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH] usb: typec: tps6598x: Fix broken polling mode after system suspend/resume Date: Tue, 30 May 2023 09:59:26 +0300 Message-Id: <20230530065926.6161-1-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767302517352032057?= X-GMAIL-MSGID: =?utf-8?q?1767302517352032057?= During system resume we need to resume the polling workqueue if client->irq is not set else polling will no longer work. Fixes: 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status") Signed-off-by: Roger Quadros Reviewed-by: Heikki Krogerus --- drivers/usb/typec/tipd/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 438cc40660a1..603dbd44deba 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -920,7 +920,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev) enable_irq(client->irq); } - if (client->irq) + if (!client->irq) queue_delayed_work(system_power_efficient_wq, &tps->wq_poll, msecs_to_jiffies(POLL_INTERVAL));