Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp554498pxb; Wed, 22 Sep 2021 08:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyka7TJQ125iv/CPZilzf8piRRa+9mjVcSywlLzLkRM6RLfPsY+E/7VSGFwKq0Llb8S9DYV X-Received: by 2002:a17:906:85d8:: with SMTP id i24mr41169506ejy.451.1632323050362; Wed, 22 Sep 2021 08:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632323050; cv=none; d=google.com; s=arc-20160816; b=vWliQP1I+VUL5uiPkGq/OKZkzsQ5i935APA74b9tq3x5ooJv16seABbmEwv26Bfd9x QviyY4qaJ7lVpjvbdI2Ag5sM7yOIIwy0+8U7cUpjw7Pl6YJ/pifVOLKVe7KXp26ATYRW RghtX2y+Yw17XrUcwZc9Q9uTK8BeRsNKtExbhHqoS1h7jDNqKrS7Qh2ng6ITdnNeFbnp 6v88MmTh1sZP38832uPz9y1r39V4Glx2QMAbTUMsMzA8vUY9SljmDmS9mMDDlCelpMw5 htLAQOd0acJAooOjPLYdbLF9BHajf7AKK7dlUzC9qE5h4gxcrhpVVd2pOrcbe2PFwSWg VAZg== 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=OPzCsgbYp19VSjY7zgSnAkS2Kxq+sjQaWrNwDj2lBLg=; b=VvUpqOevsZSkEu/wa+L1nQBs/+4NUoU/h5nE5PVQwgjnwTJgUn5rN1MholI/UOKp9V PD/Nnzo3qHgLrZifUL3OVvX0s7a+kIS5fAGtiuFcOfJ18TYs0IyBAOMtm2h3vil+dm/v 2FQ2+hBCCt4XE7uHilHxTE08/yqCxjphq6o5KMKFBrZ8MPMprmWEiSa6G9z0RlyPQP3F hEy3KKrc0KA2ljSHmMFk92FKpWGmggi7s8Ibxn6CLmpy1hV/naJPN299/6jC62uOSXEs jdi6Rn8hpEVxM9/SKEeXtHCl1Mr0nmb4zijAabCbWjX3yI2EOok/pIXvxHQjOghelQh6 HkaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=IwzCQV0G; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hLqlZK9W; 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 z28si2984255ejl.437.2021.09.22.08.03.18; Wed, 22 Sep 2021 08:04:10 -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=IwzCQV0G; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hLqlZK9W; 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 S236349AbhIVPAL (ORCPT + 99 others); Wed, 22 Sep 2021 11:00:11 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:50711 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236157AbhIVPAK (ORCPT ); Wed, 22 Sep 2021 11:00:10 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id E2761580A8A; Wed, 22 Sep 2021 10:58:39 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute1.internal (MEProxy); Wed, 22 Sep 2021 10:58:39 -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=OPzCsgbYp19VSjY7zgSnAkS2Kxq+ sjQaWrNwDj2lBLg=; b=IwzCQV0Gtmp1OvpOfhO1LPZWmYvevtnmk8ZFXap5VoP/ OPGygl9gmwmjSTMmTV+hA+hCFnj8dqRgHdQDz+UVbINc45ptbjbLBQBKJHC6veMZ flsV85mtIArhhL4XEbYG+n8XADIjaZVrHEAshGIa2lY3ePVuag/IVrWHLeWMtK7E F6nRxqQaAIIkq5gXc/0Kk+DM1U9uYf4Vs7QIeQh10Sg+b3tjmOlcNFdENT6YFvBB DR1WDB/EMaaTp0PT+OjCJ5IvvVBZyfnMMPTSKtOzLAfKU5j97eWX+3vJZ82e+NCh +yZEjkd/ONrs8jHHgs7iJuvWQKYRwFZpKtR+BvQpDQ== 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=OPzCsg bYp19VSjY7zgSnAkS2Kxq+sjQaWrNwDj2lBLg=; b=hLqlZK9WknnmNRWBaNBwUL jyTkcpCxfPgwt4rlrATLbVQCXgOjGXljqU1yfHp+HmNqMfmf1elcamc35+KDUclQ FErWMcxbFL/Ff0FwjxCHIs1XLZ4X1GoeqFBhuZ9Ays75uKzq0fdAvwFTC1FEP97O CsZMSNYDylP616zm1M2n0p98H6y/HGDAut+4seh/qsQhh6hGaIS2fpmLdasdOKx4 gVsAwrv3a/Vj2+SwcM0STxtLHUeXJVyVwi8whVINe6QpVgoRPRTEa1lQ1LWgGKZ2 kLQfpXzMUqikLE8Ws3pJ0eW3XDSSDtJ+q1qRhiMzuxL6LGxkZEYEzka1Puqs47NQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeijedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfuvhgv nhcurfgvthgvrhdfuceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrg htthgvrhhnpefgieegieffuefhtedtjefgteejteefleefgfefgfdvvddtgffhffduhedv feekffenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsvhgvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 985DB51C0060; Wed, 22 Sep 2021 10:58:37 -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: <8d5937fc-49a5-4556-a3bf-f6c37eaa6942@www.fastmail.com> In-Reply-To: References: <20210918120934.28252-1-sven@svenpeter.dev> <20210918120934.28252-6-sven@svenpeter.dev> Date: Wed, 22 Sep 2021 16:58:15 +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 5/9] usb: typec: tipd: Allow to configure irq bits Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Sep 21, 2021, at 15:34, Heikki Krogerus wrote: > On Sat, Sep 18, 2021 at 02:09:30PM +0200, Sven Peter wrote: >> The Apple variant of the TI TPS6598x chip uses different interrupt >> numbers. Prepare for that by allowing those to be configured depending >> on the compatible. > > OK, so I think this justifies having a completely separate irq > handler for your board. OK, If you're fine with a bit of code duplication for the irq handler this will all be quite a bit simpler then. > >> Signed-off-by: Sven Peter >> --- >> drivers/usb/typec/tipd/core.c | 16 ++++++++++++---- >> 1 file changed, 12 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c >> index 4a6d66250fef..d191e7435018 100644 >> --- a/drivers/usb/typec/tipd/core.c >> +++ b/drivers/usb/typec/tipd/core.c >> @@ -80,6 +80,10 @@ static const char *const modes[] = { >> struct tps6598x_hw { >> bool use_int1; >> bool use_int2; >> + unsigned int irq_power_status_update; >> + unsigned int irq_data_status_update; >> + unsigned int irq_plug_event; >> + void (*irq_trace)(u64 event1, u64 event2); >> }; > > Then I believe you don't need any of that. Yup, I think I'll really only need something like struct tps6598x_hw { int type; irq_handler_t irq_handler; }; in that case! Thanks, Sven