Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2724985pxb; Tue, 21 Sep 2021 06:24:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0cN4qVm8XELf5OxzsZtoBkvcFheGT1JhwuTfaavg72oUfJSJB+siHy/tYYHZB2Sht5spJ X-Received: by 2002:a02:908a:: with SMTP id x10mr23773683jaf.30.1632230648740; Tue, 21 Sep 2021 06:24:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632230648; cv=none; d=google.com; s=arc-20160816; b=qPuXOm1RguXXUVMu5vFIa5dSTBQud2zoK4wOv47t+SB1GrqFzrwlVs2vmBEFFRgT4s 5LGUnV6bnNrelrLW1E6A8MNZ4myAHV+webRh1rRZ0DeOFd3fwcrtlaw9Cc0jyVIKVvh3 6mXXS1giWkHMxKnIfMzDx/Le7hmjdDh/VbaF5qH32JEIeo+Nn/EddU2YAjiZ4OY/lpBO 9WNpfa2ShkoEXTdPMaRaUAcpVJYAhvLC1419z5u3Mugk9eMMuuyqZmBuTsN5YgsXf7XG jYhMrO150KDlaA7i4Y9o32VlDmoD/v47s1udNoyStS0yHApCwGPYXkm1Qdw8jRxz7DXi TCpA== 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=YR+6Xh1YEr1Mn/+70TEVlaFekmX87xYZtCDMbqDYdFo=; b=Ee4Yz1kMjrAWuticxG43Yi/5A5VAXRbzpXHdDt2nearK2Df7YWBQ7mHTtcw/p49kXt KeS2mci2ZLJTFwWeKmImagfiPMwHLwxNHcyD3VmDTc+NF1U2P4LoJDI+orNbsHd/gEzX TlVaNM1vLNoaMWVHnmr8NJnSMO1n4trar0MSITAQbDjOO3HTNEsC71ekjAtC/K1n7gK1 U4s2mZQzLnqJWC2UkjWoMD3c3S7zwjLMXSBcww3HB2DS5VczVLQeYPrqMMqj9NnBXNfD Qx62mrp9JoVbL9xF23WRs2nLdL7aPecjrCn3xqrSlBLAA3geYHZBzfSI7No6voJlXiA1 hDCw== 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 r4si8583734ilb.106.2021.09.21.06.23.55; Tue, 21 Sep 2021 06:24:08 -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 S232953AbhIUNWo (ORCPT + 99 others); Tue, 21 Sep 2021 09:22:44 -0400 Received: from mga01.intel.com ([192.55.52.88]:59828 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232889AbhIUNWo (ORCPT ); Tue, 21 Sep 2021 09:22:44 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10113"; a="245769648" X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="245769648" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2021 06:21:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="613003334" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 21 Sep 2021 06:21:11 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 21 Sep 2021 16:21:11 +0300 Date: Tue, 21 Sep 2021 16:21:11 +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 3/9] usb: typec: tipd: Allow irq controller selection Message-ID: References: <20210918120934.28252-1-sven@svenpeter.dev> <20210918120934.28252-4-sven@svenpeter.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210918120934.28252-4-sven@svenpeter.dev> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks, -- heikki