Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp550086pxb; Wed, 22 Sep 2021 07:59:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXDePb57B0q8yrgMMr+LElen3bcRAAgJALQ6l+jAx36Uhf0pupuaNYbtgTRf3fy55lmqnT X-Received: by 2002:a17:906:2817:: with SMTP id r23mr41951019ejc.285.1632322768444; Wed, 22 Sep 2021 07:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632322768; cv=none; d=google.com; s=arc-20160816; b=cwKucNymHmSc9oQb+scEcBgq8pYYxnxkrV5zY7hcHRnKdgwTvgFkR4NdkSytmm1N6s n2VQvZk9FWGdVrEO2sq+8OwGUsD2bd6f/3rO4tH51An1dB3Lvm3/5lxg67KPapm7V8OB TlREv6iBN4zp48ArY5Z+kN55JHvHvB4/3elaA9z2EIsoV6FZfNIwHgZvT6fzLVOGG0mo 6dtzVJSXV7cpd/oSfsHezqG3lMstLD/N/g4dNCNgSXYY3REaInbYVyB39e+Ex2Cno2YE 93xXOmgwG7Ig7cN78OFZsZB3/4CmVzPm88cWdefDPXTAgztuui0CwY0lSUIoJAauLmYy 3QTg== 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=EgaJqj9gQEp6Qedx8pjCqByv5R/dMmsQ6pf4CG2eXMU=; b=ADRYgCXM4GJGrD6kcgSkwZ5gBviT4AGu8nMrptW5fthaHIq+TmHmL78EnKfTI0Q8Ni VMY8X7Vc6tAyycLwiuvdKIbfteEEK+MaukKb6t//jjdSXSwZRIcJpzyReTjbM4eRQV6x WJgGQ0a0EYrPHIFi46xoBnYL82SMTERpxSaEesOp6IUPytiMt4fW07BMItDT11FU9gVV RiO7dUESP7dbtvIQ+bp6+qPYx56DuWFobLEZvAL6CNufNiatG22gVbKnzc4ow37HWaC5 OX7M51flXbGPhAakT02HLH9E13nYwlOFMwG/nWL1L5FCWZ81oFWAUMu+Nk6ndTO6+7aK aa8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=Pl26iUEr; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JPPfSImM; 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 e7si3773947edk.96.2021.09.22.07.59.03; Wed, 22 Sep 2021 07:59:28 -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=Pl26iUEr; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JPPfSImM; 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 S236321AbhIVO6J (ORCPT + 99 others); Wed, 22 Sep 2021 10:58:09 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:50989 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235014AbhIVO6I (ORCPT ); Wed, 22 Sep 2021 10:58:08 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 46057580257; Wed, 22 Sep 2021 10:56:38 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute1.internal (MEProxy); Wed, 22 Sep 2021 10:56:38 -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=EgaJqj9gQEp6Qedx8pjCqByv5R/d MmsQ6pf4CG2eXMU=; b=Pl26iUEr0jctVpANcAQ+yg1NCy/C+4vbPUO8n6nwzX6L xUu+V4pLB5hEiKADHwoRrFDAinKNX2Z9ZVCCgBmYaCI+N3eEbnBtLWnsJaHiiFQL gWwNGyPyEnxKypENtG8VrRnbZMrVH5yT8H7vehNlTTAUHFgwMN47R6tcid9WtggW d1n7m9JwchzV4FDzO3sLKUybvM0j9XJYvRr8v8PxXKiJ0CEMm1Wz6bh7avS+E6tH gYWXfMAk+OOBN7//M07xsSDDGRHYqPmZ3IIARpdJbh+1yPvFPi6w6q0FUUxZfjf8 CBM/md7UKXpgf4rdcySJTUjKiz0r/B5RekNEsLqqkA== 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=EgaJqj 9gQEp6Qedx8pjCqByv5R/dMmsQ6pf4CG2eXMU=; b=JPPfSImMwu8xhVT8lzqvJW eOoaxxP80FHbk/F5iavKKi1dopUUp2aSICl0dd4eu+qYPSG0oOH69OOCjMWU3you 3ztZ0Cp8sxZQw/yZ2JDDcSPUktaIpF94hL8mr2JjxN1TYlzw0CAV8eENxBF+hR4t 46NTSLYo4xUp8oMXiWE3UaDJf5BA7qcZRVt+LtTT2Y6snAyghJFxMRnkylAt6AOW P042ZBCAfHtqslsa4ZtuZ2YOE6QQJ7lDYKt1g2isr90j6peQgDy/Ed/90dGod0KZ EFUnyfLD1FPvyIV+WS07Ye7ib9HA2kPT01pFhtl7IsxqH4l2WF5CbHLq+8fMLLGA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeijedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfuvhgv nhcurfgvthgvrhdfuceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrg htthgvrhhnpefgieegieffuefhtedtjefgteejteefleefgfefgfdvvddtgffhffduhedv feekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsvhgvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id B675D51C0060; Wed, 22 Sep 2021 10:56:36 -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: <7d96308a-e8c4-4193-b0c3-50b3918c7deb@www.fastmail.com> In-Reply-To: References: <20210918120934.28252-1-sven@svenpeter.dev> <20210918120934.28252-4-sven@svenpeter.dev> Date: Wed, 22 Sep 2021 16:56:16 +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 3/9] usb: typec: tipd: Allow irq controller selection Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021, at 15:21, Heikki Krogerus wrote: > On Sat, Sep 18, 2021 at 02:09:28PM +0200, Sven Peter wrote: >> TI TPS6598x chips come with two separate i2c buses which each have an >> independent interrupt controller. When only a single controller is >> connected both can just be used. >> On Apple M1 machines the secondary bus is however connected to the system >> management controller and we must not modify its configuration. Prepare >> for that by allowing to chose which interrupt controller(s) are used. > > This is good, but... > >> Signed-off-by: Sven Peter >> --- >> drivers/usb/typec/tipd/core.c | 30 +++++++++++++++++++++--------- >> 1 file changed, 21 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c >> index 656020e7f533..c2c399722c37 100644 >> --- a/drivers/usb/typec/tipd/core.c >> +++ b/drivers/usb/typec/tipd/core.c >> @@ -78,6 +78,8 @@ static const char *const modes[] = { >> #define INVALID_CMD(_cmd_) (_cmd_ == 0x444d4321) >> >> struct tps6598x_hw { >> + bool use_int1; >> + bool use_int2; >> }; > > Wouldn't it be better to read that information from a device > property/properties? > > Driver data is OK, but device property would be better. We don't have > separate compatible for this on every board that uses it and we have > also ACPI platforms. Good point. Taking into account your review for the later patches I think I can drop this completely though: On the Apple hardware the second controller is always connected to the SMC so far. If it's required later on we can always add the additional property with a default value then. Best, Sven