Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2921434rwb; Fri, 20 Jan 2023 08:57:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXtEwshOLIIO0WdXrxbWGi6TTVDjHrF0EuUJk8I2nq2Df03f65WfrrPG5LvOwJTAcuxXz/Yd X-Received: by 2002:a05:6a21:3a96:b0:ad:e5e8:cfe8 with SMTP id zv22-20020a056a213a9600b000ade5e8cfe8mr18336873pzb.48.1674233865848; Fri, 20 Jan 2023 08:57:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674233865; cv=none; d=google.com; s=arc-20160816; b=ib26CG0NchTbGjS/QZG+VLZrEetYmv6uBnEBuuOoWQxkD8ph5AZZE0CVesXg4cIU0d mv2PCE/xbEgw/5HDhUy0xtLpbw+NocBAHjZ9CKdsvfJ4ecG2yA1OG6TbPnpkfNyP5Rk7 VciHorGRQ6PTrmIIloq1OD6iNeWCzXhKEU391fb8F5e27+jz6SXPyR1GFJ9v12aNYiwa RtzHMs1IfwcNMwtEoyN0T/5vtovMEbQCOmq6f1+AGyHABsuVSVsq3K2dHCEAxYf/kTbY dtQwnC69XnevT/6CL8LhTci7qeh6S6/ZoIni2ThreQF+OUc/rZOq9YDd0RwvH7t+e66g O3wQ== 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=GWFECQymxzugYEZWvea/kOz6siwpomm4LEhQL89Bq5Y=; b=TOXJ+0SJzqnvjHq+Q6XUOHwwTxzUtEU/jVXmL0DPucw723QLTI1K6UKnKn6DmZphWR N0Hww/6EEYonFQXmJRqcIJ207JfpPY2KrS3EVjnSyMME1MdnxSp5RmFVzwbRVfZH5ZWd gnH//y1IAQkMpGI0FKdA+w7uUD/zwkSpPAqPC90fHr4EtkQ+mH5ipjlVxwDrzky303te We/oSywzfZObleJOABNhGTSglqht4dmCPGfnMejW7bR5GSMyvAVTaYfSsmeJUCp6YB0F 6ZDxaVDgZVg4wTc6gt9haQo7ZfTr+dQMoKzwj9PEpphKgf2r/uOZCx6o7GWo9eRRQBCf 0dbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TMaZlsLk; 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 w11-20020a63490b000000b0049148558226si44270825pga.681.2023.01.20.08.57.40; Fri, 20 Jan 2023 08:57:45 -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=TMaZlsLk; 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 S229823AbjATQRg (ORCPT + 50 others); Fri, 20 Jan 2023 11:17:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbjATQRf (ORCPT ); Fri, 20 Jan 2023 11:17:35 -0500 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCD78DF957; Fri, 20 Jan 2023 08:17:24 -0800 (PST) Received: from booty (unknown [77.244.183.192]) (Authenticated sender: luca.ceresoli@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 9198C240010; Fri, 20 Jan 2023 16:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1674231443; 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=GWFECQymxzugYEZWvea/kOz6siwpomm4LEhQL89Bq5Y=; b=TMaZlsLksagt53yV4HmWugi8Qfz0431i/PZDiX5agSfCImJ8Fqxu3VThwDPOfu8sMPipEJ WdkUqF4papwYk3E7p3kVOUscu1aK/zDuOetetjCv6Lh22L5YHvLPKcp7h/2yMgbXt+xSKr TjKxUwfLcH/iGYtm9QS9c6ixFdcFhCPBR6bjAAj2NryJ5AiWRGHYqUnqvNWJC10Fqfda8Y pTmtlsD1KIydVIs8q/mRD9dzTZqK7sjBCDaX+6XK0ufpJKES79ColclAemU12pBp3eKwt6 pQwPE24Lt3x1D3yv2kRMyHm/GGlQzxy1Nt6Bwug+JpQrk6ryiycR7T4QtYH+xg== Date: Fri, 20 Jan 2023 17:17:18 +0100 From: Luca Ceresoli To: Andy Shevchenko Cc: Tomi Valkeinen , 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: <20230120171718.3674af61@booty> In-Reply-To: References: <20230118124031.788940-1-tomi.valkeinen@ideasonboard.com> <20230119094358.010bc826@booty> 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, RCVD_IN_MSPIKE_H2,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 Andy, On Fri, 20 Jan 2023 18:00:02 +0200 Andy Shevchenko wrote: > On Thu, Jan 19, 2023 at 09:43:58AM +0100, Luca Ceresoli wrote: > > 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: > > ... > > > > > 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? > > > > > It might be that I didn't get how hw exactly functioning on this > > > level and why we need those callbacks. > > > > As far as "how hw exactly works", in case you haven't seen that, the > > best explanation I was able to give is in my ELCE 2019 talk, at minute > > ~22. It's a 2-3 minute watch. The slides have pointers to other talks > > and discussion. > > Probably I have missed the URL in the discussion, care to resend? I hadn't sent any URL :) Here's the shortcut to go straight to the ATR description: https://youtu.be/7hLv6fYAW-E?t=1350 Slides: https://elinux.org/images/f/fc/Ceresoli-elce2019-video-serdes-linux.pdf -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com