Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp768239pxb; Sat, 18 Sep 2021 18:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN4Dzo/ezTFbl8xfEeSXL3fxSqFnII0dQuSL90JwjfjxHvdQj5wuVB/mGZhDhAB3JKq324 X-Received: by 2002:a05:6e02:154f:: with SMTP id j15mr12773792ilu.236.1632013542137; Sat, 18 Sep 2021 18:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632013542; cv=none; d=google.com; s=arc-20160816; b=xsPe/ZWp76tKNNu431oKJR2roZ/O3B7Jdi9qWpeo+xBm7Vrbm+Dmav+cXSgQffncN3 rdzbdPgzU5JVUfhPk4+SFOFQ3TvFwi/g0Sc9Y2F/6nyEKLv8bCo2Hs/bUAJUVV4zZkI4 hc+6YgreHBaOyFiddWK+6ToZ7C7Hfe6c3E/H3kDq1fTLRzJ1kpft+BRGLzCm6JBjcbp+ rLf201FERtzewC0f53nTgV00GHqqWqb000MyYdi4nqZi7GDbOm5G0/e1s1rPeWwmbWXD 14z9vhYSUX+v7ov3z7QUL9yaEOJYPcLS6SjdCLaMW11xWSC54boZ3rhAmBEd3Y3LRWjc pWJg== 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:dkim-signature; bh=7EC26pNkFUOEevhoWNPRSgdTWMwHLt1pj4bP1NJMakM=; b=r7CZDw1OEHRGCFJVSaNEw32CdAY7kHavHQd/3XJjcbeKPhXwVwflciZDH0Z1CUPj6o qxuslO0nzj1rNFdlMH0hzKsP612VB+oWrzQgsKv6Zm8qcsvU9HiUJAuXpZBaJtiOWaU8 WHauLLOLiPtSa893nTPLXy9F1if317xu4idPn5ofktjsJEkoHO3YZW0PPKMBEu4nHI6D +wxnxtEoX540sd7m3VNrwS8f97DrNJ2txW0NOpOsKfTGDLkTahpIW+h6CL3CvEJljYjG JUN5PWfKzA4NJVu0RUw8sE3lvySvtbjT79HxGmLENGpL0FFNTbTaXogLtbzb4v6bJjvH eVMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=hUUL3t3I; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=t2mzvL8p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si5076137jac.111.2021.09.18.18.05.14; Sat, 18 Sep 2021 18:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=hUUL3t3I; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=t2mzvL8p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242593AbhIRMMG (ORCPT + 99 others); Sat, 18 Sep 2021 08:12:06 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:58109 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236698AbhIRMLr (ORCPT ); Sat, 18 Sep 2021 08:11:47 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id D0DDD580AA0; Sat, 18 Sep 2021 08:10:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 18 Sep 2021 08:10:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=7EC26pNkFUOEe vhoWNPRSgdTWMwHLt1pj4bP1NJMakM=; b=hUUL3t3I/5uBIMQTuE6/4O+iR1Ohh YL5pc0Cd3FuYlOKtOw3lUH74YGsdbVjWGoT2P6fkRMaEktTTAkXPNmrhcj4ougWv +4WLL92wP2CQSWJa7u31TweCGu/oCvfP2xyCa+c+XZRUc/TQNs8m19lIkOyt3rAK 0vM+coIA3CWN7lZnNmH+A66tdpxsn5fCFvfX/qd7000aR5h9qitzw9WjeajXfhGC iy+gXXepgirtwN93XJnuxAMTaa+nyWMBspuBGk+GpOT4xMtMt/0b4k0bisItauHZ VAM+cxHza0dC89y4E2762auiUKkueLJqdcckwF9qJtengRfxykn+OCtNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=7EC26pNkFUOEevhoWNPRSgdTWMwHLt1pj4bP1NJMakM=; b=t2mzvL8p HAutOtz5LQ9GqO7OEfbhS1XoUeJP0nShmDqTK90lx7nuhSlWCs725rSsRt/1ScZ4 pl9vB+Yok1Vn0BJ8WlDkcpI9UT0Y1HWN0dJGs0ucUnXUM0EGXIksX+sTlr42myn3 33YiUA8VkShucnBVSV4urieugLdJhNPOJfQI67pBuf9YNq5G+9+PpMdl+ngWtmZg 8De3mwo2wYdduHHkZ2Be9iySXnlYCezBHORJaEx0OQ6T1QlLrrLUTtK3ZU3X/Uyn 2Fnn9Z5A9q2kspv2aax5FUf1OqeeqG/pSt5Z37i4NaOr6rjJ114tnPLJ4TnqpsZS y1ZPRlT216ngsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehkedggeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuvhgvnhcu rfgvthgvrhcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrfgrthhtvg hrnheptedvkeetleeuffffhfekteetffeggffgveehieelueefvddtueffveevlefhfeej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhvvg hnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 18 Sep 2021 08:10:02 -0400 (EDT) From: Sven Peter To: Heikki Krogerus Cc: Sven Peter , Greg Kroah-Hartman , =?UTF-8?q?Guido=20G=C3=BCnther?= , "Bryan O'Donoghue" , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Hector Martin , Mohamed Mediouni , Stan Skowronek , Mark Kettenis , Alexander Graf , Alyssa Rosenzweig Subject: [RFT PATCH 6/9] usb: typec: tipd: Setup IntMask explicitly Date: Sat, 18 Sep 2021 14:09:31 +0200 Message-Id: <20210918120934.28252-7-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20210918120934.28252-1-sven@svenpeter.dev> References: <20210918120934.28252-1-sven@svenpeter.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Right now the code relies on the bootloader to set up the interrupt mask correctly. This usually works but let's make sure to do it explicitly to guarantee it will always work. Signed-off-by: Sven Peter --- drivers/usb/typec/tipd/core.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index d191e7435018..2058e8cca631 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -728,6 +728,24 @@ static int tps6598x_probe(struct i2c_client *client) dev_err(&client->dev, "failed to register partner\n"); } + if (tps->hw->use_int1) { + ret = tps6598x_write64(tps, TPS_REG_INT_MASK1, + tps->hw->irq_power_status_update | + tps->hw->irq_data_status_update | + tps->hw->irq_plug_event); + if (ret) + goto err_role_put; + } + + if (tps->hw->use_int2) { + ret = tps6598x_write64(tps, TPS_REG_INT_MASK2, + tps->hw->irq_power_status_update | + tps->hw->irq_data_status_update | + tps->hw->irq_plug_event); + if (ret) + goto err_role_put; + } + ret = devm_request_threaded_irq(&client->dev, client->irq, NULL, tps6598x_interrupt, IRQF_SHARED | IRQF_ONESHOT, -- 2.25.1