Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4715655pxb; Tue, 22 Feb 2022 04:50:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7s1wv4xmml+OklJs2REEdB77xpVbhZBzkoh2bxM4Z9K526udOHnCnXLm+jE4erh8ssroE X-Received: by 2002:aa7:ca5a:0:b0:410:9259:2e6f with SMTP id j26-20020aa7ca5a000000b0041092592e6fmr26600506edt.105.1645534246278; Tue, 22 Feb 2022 04:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645534246; cv=none; d=google.com; s=arc-20160816; b=QBgNRpklhXA40S33GkEy6SbsgD0pxMYJ4EFipMQwtWWtVWF3RqirJIF/Ny+L0ntvI+ vE+IH8jBIAkyWskmTAplIfKrf2XG/8lpeu2v3kNSXo8APZuJvLuyGPT97XoSRKopV3LY I7ClERNIns1uoyX2pR9NMWkIyupaE6w5WI8F5mI/s5QRNnkT43Gm7c4Zati8OBrS/pgT ge9uGrent3tQAkucQp5A2gUhif0R9APkw+VduIOOlJZEd7K9WWp8O7cbelJVADV67GSv b+Xsc3KANGXGdku7+vpCt19n+vzXsV7y6TEI7wC621i+uXricDOboWMm4D77zNniKDLD yFYw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tt2KhEzno4SSpvoBFwwMrMWWv+N9o6uA/stvGaf5lSE=; b=cozB23fbPaiweUgr1cLSsLMAEwjMGsf1RhfSE8qIsm8jHT8HisDXb5fgJDtmb7P4Jq uAHIFrrixI47trTSU4+gWqMwAMaUkcoaWvB6u0Lr+rdcPrg223xDnAVyRqApgOTlMqrL HjtZPzq79AIz/FEkTBF7DS6zPiSR55CihRvxEAs9yd7NnaWhjcVbhYb3o5rthuxaR728 VRzhSTplbKwoqpNemYDBkUHQspt1pjd23lSyEIL8+DjnLWG91Sdgx4zX7y6WSJexP0Fe MLk6gJfoJnAlGlTD6LCTEgeFM28vKSUAlSM8WsPV6ytdQ0jtQPYdY2F1LBnFw/fnUEsz pQhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=AOHvMXrZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11si13516216edj.298.2022.02.22.04.50.23; Tue, 22 Feb 2022 04:50:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=AOHvMXrZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231516AbiBVK6T (ORCPT + 99 others); Tue, 22 Feb 2022 05:58:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbiBVK6S (ORCPT ); Tue, 22 Feb 2022 05:58:18 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B624A0BDF; Tue, 22 Feb 2022 02:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=tt2KhEzno4SSpvoBFwwMrMWWv+N9o6uA/stvGaf5lSE=; b=AO HvMXrZrWStEnGsgs9gZhZPmO9GcvX7J3xMNzncM3FRcviTELxwSwaacOGnhTgAhyw01+6RIoudXoF e4hgPdBzvKvnCJo4Tu+tLdOKmq8XxcbB7VA0s8nN3CFMbGDBg7936LXMeHshvTdmkyPnFyV9opbYo +rMWDeS6HNpRtk8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nMSrT-007bPd-CS; Tue, 22 Feb 2022 11:57:39 +0100 Date: Tue, 22 Feb 2022 11:57:39 +0100 From: Andrew Lunn To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= Cc: Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Wolfram Sang , Peter Rosin , Russell King , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org, netdev@vger.kernel.org, Thomas Petazzoni , Alexandre Belloni Subject: Re: [RFC 09/10] i2c: mux: add support for fwnode Message-ID: References: <20220221162652.103834-1-clement.leger@bootlin.com> <20220221162652.103834-10-clement.leger@bootlin.com> <20220222095325.52419021@fixe.home> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220222095325.52419021@fixe.home> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 22, 2022 at 09:53:25AM +0100, Cl?ment L?ger wrote: > Le Mon, 21 Feb 2022 19:55:25 +0200, > Andy Shevchenko a ?crit : > > > On Mon, Feb 21, 2022 at 05:26:51PM +0100, Cl?ment L?ger wrote: > > > Modify i2c_mux_add_adapter() to use with fwnode API to allow creating > > > mux adapters with fwnode based devices. This allows to have a node > > > independent support for i2c muxes. > > > > I^2C muxes have their own description for DT and ACPI platforms, I'm not sure > > swnode should be used here at all. Just upload a corresponding SSDT overlay or > > DT overlay depending on the platform. Can it be achieved? > > > > Problem is that this PCIe card can be plugged either in a X86 platform > using ACPI or on a ARM one with device-tree. So it means I should have > two "identical" descriptions for each platforms. ACPI != DT. I know people like stuffing DT properties into ACPI tables, when ACPI does not have a binding. But in this case, there is a well defined ACPI mechanism for I2C muxes. You cannot ignore it because it is different to DT. So you need to handle the muxes in both the ACPI way and the DT way. For other parts of what you are doing, you might be able to get away by just stuffing DT properties into ACPI tables. But that is not for me to decide, that is up to the ACPI maintainers. Andrew