Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp552991pxb; Wed, 22 Sep 2021 08:02:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznR7XMwjC97/ljKPIuiEBI2xffveqoGGEyzUs1o0beMG42eN9l9owIPneyXTjin/fZisF+ X-Received: by 2002:a63:e446:: with SMTP id i6mr105115pgk.288.1632322951218; Wed, 22 Sep 2021 08:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632322951; cv=none; d=google.com; s=arc-20160816; b=GijTCT31ZH9WY0HUkDcxqoWV2lTNh0WYJhBQeIS7RsnAuRa+TTk54smIsrq6RmUDSN I0fqKXGpfweDE9eGZIX0TbzT4lhi8jO1CYLOIQ/dsN/W2XzllwE2luJKj9rSZm8NO3bA JV0/+LRHbJ9GxmvwAUw8covdstqmYr7k41RkVdZg8ApR/AcBR618jcO7JMga2Q7W3B6s cRAoIml42VxG//LDCd68fAQaaKvidwnr2fILUhOTTAS/f/XBjumN8IZBH/oPtYfJ+OWk O/eVjmVEYSmumjw5Wh7tRXu/M8ARN5KQbeqYtu5TjB1dZBkAlGnQAu4/lfCK9Yf1NwKg P+oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature:dkim-signature; bh=96uf9r25tZ+rFVz9V65UgKSRRvB66XWK+SRSHb8lQSk=; b=UOtixmObDAPOluBwcfnKDGxysmhMC5XRVFg4KoBOUzX6ypPUzAhR6y7jUag2yuI0zy 20MwU7ARRaw6P4D9g/zdz97ueSNS0gKci7a0KmJJdSdR4sUWnc5lo5+cfFFSXtz/GZct BJhpvJqi5RsBbkZ7De/zCyyowH0YJK8b19HG41+vwikqyT7BhuQpfCF1pPWGn/nHgCp+ UFH5pnRjzp8n14eaUEoD2rYHjTT979KTOFX3sWga2fQNQ7+QKYufy9XnmM9WOkX8Dol8 f034Ol5iKedoWhFsS4LvqSOfst2WM2bPh82CguaKiDslC1xlkVvvGF7UaVcDsfOOkieO RBtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b="dM/eRfLC"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ue+jY6JH; 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 z26si3481099ejc.486.2021.09.22.08.01.47; Wed, 22 Sep 2021 08:02:31 -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="dM/eRfLC"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ue+jY6JH; 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 S236372AbhIVPAg (ORCPT + 99 others); Wed, 22 Sep 2021 11:00:36 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:34731 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236358AbhIVPAa (ORCPT ); Wed, 22 Sep 2021 11:00:30 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 78D27580ACD; Wed, 22 Sep 2021 10:59:00 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute1.internal (MEProxy); Wed, 22 Sep 2021 10:59:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type; s=fm2; bh=96uf9r25tZ+rFVz9V65UgKSRRvB6 6XWK+SRSHb8lQSk=; b=dM/eRfLC5EeA1t7ZAsvBwAMXhbNjk+sdAJ44AteH1K/S P8QO5pqDsg6APWqtmvPxC4878fS3Mx1WSOcqxWVuzqUm9XMAj9LISH15QXaefT7Z LOH1fV4KqVCkMQpWlfHGJp8b+yxjWhJrCjC6/iTNp+Ayv+QBCAxWKOERGW0cbqkl Et/8CFIwp2n67TPNR/KiytC0TK1NNELKKh8OTE2nsxyRgDrbSbJusGvCsxwYKg74 PZuztb2NZc9yc74xl3itjxS2wksqVOgEZs2sGXyOxE25CcJ7x8hhMK+6Z8M8TppV 2gRuMGR58fp2H5APsmDE7fT7HY39QXgvKB4CkFfI+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type: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=96uf9r 25tZ+rFVz9V65UgKSRRvB66XWK+SRSHb8lQSk=; b=ue+jY6JHa6mZuqFqj9Ulcw YH837GSuvfztVVEpOWYzSNKeCRWUdC8QtACDU97K6kuZDL0n8wdVJKsUpWdRxvEw 6VOS0LwNbgw3n3p6FlVUj0cGkRrP/1Bu1hc8yYA2FELRWdpXB/ktRRumYhVuwdHI PhIc7Z+XEbnPd9TrYoLHY4w2/wQSRIB8hxeV/Z04QTKMWZZccKM+raLEXMOVxif6 6/uVb5V6Yza+mSLCVsGWbF/wrTl7uA2t+qqA/AO91aQHWlpKv4V+c2B5/06LQGRu wqxe2dacvw9+eKdKev1huYPg7x17/0+vmV7w3bDq5oO79wZWUbsU1+yXWXq+UCOQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeijedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfuvhgv nhcurfgvthgvrhdfuceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrg htthgvrhhnpefgieegieffuefhtedtjefgteejteefleefgfefgfdvvddtgffhffduhedv feekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsvhgvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4AB2A51C0060; Wed, 22 Sep 2021 10:59:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1302-gc62ab821ef-fm-20210921.001-gc62ab821 Mime-Version: 1.0 Message-Id: <1fac9efc-f24c-4912-8c26-b959574e6b4e@www.fastmail.com> In-Reply-To: References: <20210918120934.28252-1-sven@svenpeter.dev> <20210918120934.28252-7-sven@svenpeter.dev> Date: Wed, 22 Sep 2021 16:58:39 +0200 From: "Sven Peter" To: "Heikki Krogerus" Cc: "Greg Kroah-Hartman" , =?UTF-8?Q?Guido_G=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: Re: [RFT PATCH 6/9] usb: typec: tipd: Setup IntMask explicitly Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021, at 15:40, Heikki Krogerus wrote: > On Sat, Sep 18, 2021 at 02:09:31PM +0200, Sven Peter wrote: >> 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; >> + } > > You should first only set the mask on your board. We can then see if > it's something that should be done on other boards as well later. > Make sense, I'll only call this when the cd321x variant is probed then. Sven