From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69D64C433EF for ; Tue, 21 Sep 2021 13:21:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4ADE46109E for ; Tue, 21 Sep 2021 13:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232972AbhIUNWp (ORCPT ); Tue, 21 Sep 2021 09:22:45 -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