Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2755108pxb; Tue, 21 Sep 2021 07:02:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ9jOV7sm+FUgp3I9MJvrLfmA74xaQrMiwmzh0+rUjw23aJ6qeX5dZNoR6e9xJeuyxa12o X-Received: by 2002:a2e:8511:: with SMTP id j17mr28157185lji.407.1632232949183; Tue, 21 Sep 2021 07:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632232949; cv=none; d=google.com; s=arc-20160816; b=PftS7bEP8A6iBoFnF1bOfnZhUuipmp37o1cP9465otgECaoG6nozYW5bHqPY1Hla4x eRq9JPENKmbhnTiXoCoEXZbgPrKH3/2AXjOLcVfWAy3m4F0zyuE6Vh3n8DV4z77OKGNY w0pFuy5p3YIkhTJW+uuVxyPOvm68V9f+CWDqErMBU/KzSXFIoq6CkneU23aejfgf5NF3 WMMeig5CfoDtSKO65vz+dgZd7YELUZpU1obfQpEteHqeMng6tx+Uqu3J5TZNhnEWASUe cudc7XikUkb9VNtsmJv4TYaZ2v204sl8JzMfYN/vQ+ZgqzcURB86L0D3ljQ4NnVL/fKu YsGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=uv2SZp/WXJD84qAirh0iDdbzGaowiRPhQ1T3HLjvds4=; b=bpTSIjtQRxA71vMXLVOCB/sgKKMsMH9Q9Lb7uDTMIRMynx78qLqRYDUm7XCTs+8ZE8 0NetZr310FfRsRbKmxCE+m1h+otzW+wR+Px/b0kmfoxDqMj5tsF4yFGQd+uz9HMXHf/X it7LGkpRxrhGO3dADOw4xVdIhF7Q8yIv3yaRKLjvV7YmdhKCTaHYWC+78dE9WeJQl9QU 3/enlD6XALJvfUdMBq5Vd/Y41R9/knmp4A24EjBcgT3R/E+0kmjYB671EiiEnz1mnDLX qNVoEVNhveH9/Vt1EpQ4Y+fucO175EBM3HcdS2nxXMzmwkq5YcDvvQL/5Wcd2xchpZ2E EXAw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si18590470ejv.515.2021.09.21.07.01.57; Tue, 21 Sep 2021 07:02:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233406AbhIUOBZ (ORCPT + 99 others); Tue, 21 Sep 2021 10:01:25 -0400 Received: from mga02.intel.com ([134.134.136.20]:57851 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233042AbhIUOBY (ORCPT ); Tue, 21 Sep 2021 10:01:24 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10113"; a="210599486" X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="210599486" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2021 06:40:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="613009248" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 21 Sep 2021 06:40:21 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 21 Sep 2021 16:40:20 +0300 Date: Tue, 21 Sep 2021 16:40:20 +0300 From: Heikki Krogerus To: Sven Peter Cc: Greg Kroah-Hartman , Guido =?iso-8859-1?Q?G=FCnther?= , 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 Message-ID: References: <20210918120934.28252-1-sven@svenpeter.dev> <20210918120934.28252-7-sven@svenpeter.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210918120934.28252-7-sven@svenpeter.dev> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks, -- heikki