Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1012992rwb; Thu, 19 Jan 2023 05:42:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXvbEV/thX0pLPH0YXphCMIPYctURn049goiDOpU/ZB3B4T/sg94LpU+Wra2NoY3ROFNNNJ4 X-Received: by 2002:aa7:910c:0:b0:58d:a924:9ce with SMTP id 12-20020aa7910c000000b0058da92409cemr11007166pfh.7.1674135730470; Thu, 19 Jan 2023 05:42:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674135730; cv=none; d=google.com; s=arc-20160816; b=F+fq0A4E8NDqaDBeDgFHYQtfk1Wk5qb1U9qQRD01Z7aPd6Cgngci2fRRBNanMYTxoh cf9yoWnQxK1+x5vQlmjPmzAcJl1ArMnrP2vN4XTeNPHD+L+1TlOXv5wRFJNkSWedcaW0 J7Hfy+EMF6R8kv9F36mQONhhpdNVPmm6Kp2admc3lvySrdzbzm0QtyQvheokZvTBxCdh T2B48ea2wGMtfAqeI6ptGfJGmIJT2qBcXA3iVsc9S0J//YEEgU5eQtKtJx2p+NSEZzoI 8ATXlVl2ek9IpkQFWp3dQZ05jGfR+8kVWTjWN0wCKuN90XEaHpb+1iN5QtS7Kx8f0VP8 x9dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=q8pOiSqHpljeGPJE7VLy887atVfOgK9uVlRZiZMg1f4=; b=vEvTuIt7gA2hYhU91CFJWGeNnY63CJvMt03KfsNVnoIe7xhhS3KGuCgrpDjEbTKTm2 n+jRJYtiaYdH1fLmvjgrX+tKpat07zOeIASwWPqSczNf5ywjd+kO53fjDdt/8CLUahI3 jVHbuMvy8wXTdnd9ZhA/S6jBA2aJJF0xZmVOKVdENfa7ObqHUgmD1ly6F2CezWVOgvpT MADMpy6Qh+EtmuB4upRGyDVCI3YGMj9F3HhFjgVre5mYRn6iTkc6DslY1n5aJMH5E8yE G/j2M6tm3QgDg7+bXD5Bk7n/h5PPoFu/iU8Dfa5HG2YPRwFsi5znxeodKkgaNWncxcmI D5Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YHoDW21V; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a056a00190900b00587cafeea1bsi15973986pfi.379.2023.01.19.05.42.04; Thu, 19 Jan 2023 05:42:10 -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=@bootlin.com header.s=gm1 header.b=YHoDW21V; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbjASNUc (ORCPT + 46 others); Thu, 19 Jan 2023 08:20:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231148AbjASNUF (ORCPT ); Thu, 19 Jan 2023 08:20:05 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 010935CE64; Thu, 19 Jan 2023 05:19:19 -0800 (PST) Received: from booty (unknown [77.244.183.192]) (Authenticated sender: luca.ceresoli@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id F12681BF205; Thu, 19 Jan 2023 13:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1674134357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q8pOiSqHpljeGPJE7VLy887atVfOgK9uVlRZiZMg1f4=; b=YHoDW21VNayHw1DlffyMTBOwJcj4G0mt5e7B9im/wuEToEhfLAvw6x37fc7Pr6KLV286pG Zyx6yv11+50ygEMDgIFEVzsa0WHWmVtFuITN5dzdYod8qSysbhP6Gv/Y37TL3E/uix/MiB 9bjIWReO+Z4sZXPGP9E7BKmY7yFGGv0MIZgZSZaYHdRVpBrSKeoKpkO5Qb0kw/51GwnrS6 q2enMHr1aNmPNUatl2quMGqLQVBgA9plJart749jKtky5jqUxDSAMSxDIAVsKtJL42kFOT he2RmN00DnEp2Z3T3iaht+UrVZvkcnzHQqBiH2P8d90YGKXSUyjbDsOWqtIf9g== Date: Thu, 19 Jan 2023 14:19:12 +0100 From: Luca Ceresoli To: Tomi Valkeinen Cc: Andy Shevchenko , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Wolfram Sang , Matti Vaittinen , Laurent Pinchart , Mauro Carvalho Chehab , Peter Rosin , Liam Girdwood , Mark Brown , Sakari Ailus , Michael Tretter , Shawn Tu , Hans Verkuil , Mike Pagano , Krzysztof =?UTF-8?Q?Ha=C5=82asa?= , Marek Vasut Subject: Re: [PATCH v7 0/7] i2c-atr and FPDLink Message-ID: <20230119141912.7ad2997a@booty> In-Reply-To: <024c8127-5109-3ea5-efa0-8c0a8763e8b3@ideasonboard.com> References: <20230118124031.788940-1-tomi.valkeinen@ideasonboard.com> <20230119094358.010bc826@booty> <024c8127-5109-3ea5-efa0-8c0a8763e8b3@ideasonboard.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 Hi Tomi, On Thu, 19 Jan 2023 14:40:24 +0200 Tomi Valkeinen wrote: > On 19/01/2023 10:43, Luca Ceresoli wrote: > > Hi Andy, > > > > On Wed, 18 Jan 2023 19:43:23 +0200 > > Andy Shevchenko wrote: > > > >> On Wed, Jan 18, 2023 at 07:28:20PM +0200, Tomi Valkeinen wrote: > >>> On 18/01/2023 18:01, Andy Shevchenko wrote: > >>>> On Wed, Jan 18, 2023 at 02:40:24PM +0200, Tomi Valkeinen wrote: > >>>>> Hi, > >>>>> > >>>>> You can find the v6 from: > >>>>> > >>>>> https://lore.kernel.org/all/20230105140307.272052-1-tomi.valkeinen@ideasonboard.com/ > >>>>> > >>>>> Main changes: > >>>>> > >>>>> * i2c-atr: Use bus notifier. This allows us to drop the patch that adds > >>>>> the attach_client/detach_client callbacks. On the downside, it removes > >>>>> the option for error handling if the translation setup fails, and also > >>>>> doesn't provide us the pointer to the i2c_board_info. I belive both > >>>>> are acceptable downsides. > >>>>> > >>>>> * Use fwnode in the fpdlink drivers instead of OF > >>>>> > >>>>> * Addressed all the review comments (I hope) > >>>>> > >>>>> * Lots of cosmetic or minor fixes which I came up while doing the fwnode > >>>>> change > >>>> > >>>> I believe my comments to the first driver applies to the next two, so please > >>>> address them whenever you are agree / it's possible / it makes sense. > >>>> > >>>> About ATR implementation. We have the i2c bus (Linux representation of > >>>> the driver model) and i2c_adapter and i2c_client objects there. Can't we > >>>> have an i2c_client_aliased in similar way and be transparent with users? > >> > >>> Can you clarify what you mean here? > >>> > >>> The i2c_clients are not aware of the i2c-atr. They are normal i2c clients. > >>> The FPD-Link drivers are aware of the ATR, as the FPD-Link hardware contains > >>> the ATR support. > >> > >> Can't that hardware be represented as I2C adapter? In such case the ATR specifics > >> can be hidden from the client (drivers). > >> > >> I'm worrying about code duplication and other things that leak into drivers as > >> ATR callbacks. > > > > Which callbacks do you refer to? i2c_atr_ops? I don't think we can do > > without the attach/detach_client ones, it's where the driver-specific > > implementation is hooked for the generic ATR infra to call it. > > > > However now I noticed the select/deselect ops are still there. IIRC > > they are not used by any driver and in the past the plan was to just > > remove them. Tomi, do you think there is a good reason to keep them? > > I thought you had a reason to add them, so I didn't remove them =). I > can drop them. Yes, please drop them. It's the usual "it looked like a good idea" situation... :) -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com