Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1702216rwb; Mon, 7 Nov 2022 04:58:19 -0800 (PST) X-Google-Smtp-Source: AMsMyM7GcCfHorS6uIG6l8TDYuaF7cMgziLqUxrWUC4jPV4eD8yzFtxLxcXbfUvFRvJsGcwy5HCO X-Received: by 2002:a17:907:6d0d:b0:7ad:b389:1151 with SMTP id sa13-20020a1709076d0d00b007adb3891151mr46636267ejc.655.1667825899068; Mon, 07 Nov 2022 04:58:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667825899; cv=none; d=google.com; s=arc-20160816; b=f3DXGyvL0qlJr7dmFO2C5L8ygAfKMR3oSxqIXLwcRYVpdqXwzMFUwPxWXEaxJNY5x4 ph/Y6I2AcFOJSSB7AdTn/l3PCTC1TaegguGJDGKLdX4LAA94D1H6Zb1FCsuvKQL7KVZc 7WgWCSi5H61Fh4+K6VqKsm5NfcXPQK/FT4tZPxADbN5x19bqtgSYxz3r8TGNbMsmxFaq FxVcgOEQa+SNpTjkg6jiLfB0f/K3dDewgynINL85DfpM2h/9hfNK2Vpte3RK2hAwSDsW m6LWs18p9C3cdsySyKey2eLBe+QENtJ9+1UCtFOvuHO/yNgF+u55Gh2tewgnIaeSr+Tl Dc4Q== 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=Qre1rLeivf2N8z9hTszuSOQhH5gotX01/ktN2uCkQ7k=; b=JcbcwrMuJNrPywUi3iOLG+GyHCqXq+G/Jokkw5hl1XJ8r/y54zsrXdHKtJ+cWbD++b Ucgf3ACp5gy+ApyzoCUJF2aRFTs4mEZ3mcZYdaOlxDE91jGPbT3wHih1+POXPQVGDUD/ P3ag4TrfYkP5ipqxypP9nu/zYP6G0jrtCsxnQa6yVwmjScr5xBdwftzm3QiTooyUooEa YDWnk/srW7SGp1CI8G3ix7bx5NyH2RqltODoMxn8ohyy40yOLw4TPP2OVO5GO5Wcvgll MOIOQtB1nlRakDpTZsQgMAVUbLrNhEXiEwy6XmFdzhJPrEqTyTt+4MxU5gaX3f6fR0WJ uNOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Ek6wMmTM; 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 rs2-20020a170907036200b007a6384d506csi7188745ejb.643.2022.11.07.04.57.56; Mon, 07 Nov 2022 04:58:19 -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=Ek6wMmTM; 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 S232052AbiKGLl0 (ORCPT + 93 others); Mon, 7 Nov 2022 06:41:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231904AbiKGLlH (ORCPT ); Mon, 7 Nov 2022 06:41:07 -0500 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E7B01ADBB; Mon, 7 Nov 2022 03:41:01 -0800 (PST) Received: from booty (unknown [77.244.183.192]) (Authenticated sender: luca.ceresoli@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id C0F6924000A; Mon, 7 Nov 2022 11:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667821260; 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=Qre1rLeivf2N8z9hTszuSOQhH5gotX01/ktN2uCkQ7k=; b=Ek6wMmTMsc8B1iNQRjQoRFSgj04u32H8jPLnEkyWW/LzsBenyR6EZNCTQPM+Y4sjy+OppM 7t821vgQzQY0BbbCgGjdUiikw+Iv8n/VKmgxUcheg2DyR387r5tZNU09VPbuvlpif8wCKf 4eT/JTL61eUopreMw9f2kTxA5Nv+/fHt8lt2o4yC+mQMFtdvCSZglYimpQmsTQ5obwgMrN peT0LVR1FlNhRHZzGeyYTby19zcu9ZrE/ta1/3u6geaq+DfleyxGUYTbUJMxnXcqciozMa tMjQ/+KQFJQTA1GG04QbJ7RbSlKvvDuMy9YEPTpASKMv0RzB0lPqoofG6clGCA== Date: Mon, 7 Nov 2022 12:40:55 +0100 From: Luca Ceresoli To: Tomi Valkeinen Cc: Andy Shevchenko , devicetree@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Hans Verkuil , Jacopo Mondi , Kieran Bingham , Laurent Pinchart , Luca Ceresoli , Mark Rutland , Matti Vaittinen , Mauro Carvalho Chehab , Peter Rosin , Rob Herring , Sakari Ailus , Vladimir Zapolskiy , Wolfram Sang , satish.nagireddy@getcruise.com Subject: Re: [PATCH v4 2/8] i2c: add I2C Address Translator (ATR) support Message-ID: <20221107124055.0495031f@booty> In-Reply-To: References: <20221101132032.1542416-1-tomi.valkeinen@ideasonboard.com> <20221101132032.1542416-3-tomi.valkeinen@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 On Fri, 4 Nov 2022 13:59:06 +0200 Tomi Valkeinen wrote: > Hi Andy, > > On 01/11/2022 16:30, Andy Shevchenko wrote: > > On Tue, Nov 01, 2022 at 03:20:26PM +0200, Tomi Valkeinen wrote: > >> From: Luca Ceresoli > >> > >> An ATR is a device that looks similar to an i2c-mux: it has an I2C > >> slave "upstream" port and N master "downstream" ports, and forwards > >> transactions from upstream to the appropriate downstream port. But is > >> is different in that the forwarded transaction has a different slave > >> address. The address used on the upstream bus is called the "alias" > >> and is (potentially) different from the physical slave address of the > >> downstream chip. > >> > >> Add a helper file (just like i2c-mux.c for a mux or switch) to allow > >> implementing ATR features in a device driver. The helper takes care or > >> adapter creation/destruction and translates addresses at each transaction. First of all, thank you for bringing this work on! > > ... > > > >> +I2C ADDRESS TRANSLATOR (ATR) > >> +M: Luca Ceresoli > > > > Hmm... Are you going to maintain this? Or Review? Why not? > > We haven't discussed with Luca if he wants to maintain this (this is > mostly his code). But, indeed, I should add my name there. I think at this point you are probably in a better position to be the maintainer, but I'm OK with being listed here as reviewer (R:). Ah, would you please use my bootlin dot com address here? > I'm not arguing against any of the comments you've made, I think they > are all valid, but I want to point out that many of them are in a code > copied from i2c-mux. > > Whether there's any value in keeping i2c-mux and i2c-atr similar in > design/style... Maybe not. Tomi is right, when I wrote this initially I tried to keep it as similar as possible to i2c-mux.c. No problem in deviating from that wherever it makes sense. -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com