Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1061562ybe; Mon, 2 Sep 2019 13:44:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrHLSw9G8aAymrhrZIRIQV3qmnSodlqCiNLIohg29gWb8+PFQ+QnRrj2kpO2wRGL/uZX8l X-Received: by 2002:a17:90a:c694:: with SMTP id n20mr14467916pjt.24.1567457067893; Mon, 02 Sep 2019 13:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567457067; cv=none; d=google.com; s=arc-20160816; b=nHVB/jF1/C5RfKwhMhtF9bUi/Yg4UW7HRksKhtF/FZhYzoIW348CY+me1lpifHjfzF EUEXbirsPYsSJ2sFV6l+t/JIklXZCBekOFQMqkgJyrb7qheKNpXOabu9lIIZsv4ywswG iyD0iUFZkkdq/nUbQ0aO6ostnCAYvS68xQ+3CtTktk3ruNQAzScKcP8Qlfe8pA67L9L7 rCjqGqit+zuOvUuQaLBMbJNK3jfciB05GFwnOUUwc7+xgp9omqLh3Ao9U4SdN22jwuf/ xLVOWC8RCnIlWJOtiylh11T0TYuded217LTH12JUaHaz14qCvNR/yu1z60TeIgrpAMso D1Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=tAqAcFnvyl61oxJ5E1A5KBgTxPgZhdJz8vAgioDV21U=; b=xPZRkXOu0Rmj1DHz4vmXFkzusvrjeiqyunK4r7koRJMivfVycUOMqz4Smw4FxTWEq+ 8rDQBNOGrhxwrcBThzYF1HV+efoLXYMwSJIjwpLEwJw4gCcL4hy7KDIszSzBnAhF0i5K AAlmksXG5zwjTNRBz8+7YxRqreTBmy+6f1OmAkz/upu1LDzATfOWooWaox5Ca0YLMV0u 2zs1J7lQONk/RXNY1avzr3X5bHPYTGAAveQ53TcVs0TrIhgfB7DAzBcSY/UC4Bkv1dJP DEtSZw8Kg313062xQePjTP6WjPxqokEB6eRS7rBWuwhT8pTtEy/CEXxidx/59vo9DRW9 blkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g188si5671167pfb.88.2019.09.02.13.44.12; Mon, 02 Sep 2019 13:44:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727459AbfIBUmL (ORCPT + 99 others); Mon, 2 Sep 2019 16:42:11 -0400 Received: from sauhun.de ([88.99.104.3]:43936 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727183AbfIBUmL (ORCPT ); Mon, 2 Sep 2019 16:42:11 -0400 Received: from localhost (p54B337C1.dip0.t-ipconnect.de [84.179.55.193]) by pokefinder.org (Postfix) with ESMTPSA id 1120B2C0165; Mon, 2 Sep 2019 22:42:09 +0200 (CEST) Date: Mon, 2 Sep 2019 22:42:08 +0200 From: Wolfram Sang To: Luca Ceresoli Cc: linux-media@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Vladimir Zapolskiy , Peter Rosin Subject: Re: [RFC,v2 2/6] i2c: add I2C Address Translator (ATR) support Message-ID: <20190902204208.GA7253@kunai> References: <20190723203723.11730-1-luca@lucaceresoli.net> <20190723203723.11730-3-luca@lucaceresoli.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: <20190723203723.11730-3-luca@lucaceresoli.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Luca, > + * Topology: > + * > + * Slave X @ 0x10 > + * .-----. | > + * .-----. | |---+---- B > + * | CPU |--A--| ATR | > + * `-----' | |---+---- C > + * `-----' | > + * Slave Y @ 0x10 > + * > + * Alias table: > + * > + * Client Alias > + * ------------- > + * X 0x20 > + * Y 0x30 Great that you already provided docs for this driver! One huge drawback for me is the attach/detach callbacks. One year ago, I removed a similar callback from the I2C core ("[PATCH 0/2] i2c: remove deprecated attach_adapter callback") because some drivers did a lot of crazy things there. It took years to remove all that. What I could imagine here: the adapter (B and C each in the picture above) gets a flag like NEEDS_ATR before registering to the core. The flag means all clients on that bus will have their address translated. The core will figure out a free alias when a device is registered. We can then have an ATR specific callback with the original and translated address as arguments, so one can setup the HW as needed. Do you think that would work? Jacopo, does that meet GMSL as well? Regards, Wolfram --SUOF0GtieIMvvwua Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl1tfpwACgkQFA3kzBSg KbYMqw/7B+tsA9k6JQpEn3lIgySHVigNyDkBrhwtllVTPWmdTX67GS6UmzOu5vsN JwVMAPeXvrB1/R8d3wudXYWwz9AL+b/GUmCcZiOpJShWtVZg7ynCbJT2LJq578zG JS1D8HvawfMMRW2XcotIPKXZbxP8WoIV/wQP7qb7Cg1z196bPmiN96pHIPNUJKRu MYvMC1RYwv8q54US8nX7HIU8KREEUKTcwNQeUWwQqGtqtMUchy9A8Qrb8HRugTy9 cym7RrnkJ43/nDaG/XocQ/h4finto7md9wkQ2y4WoblumpyY+xWIeQ1esAU66q89 BJbRQMDOEO3P0U8kdpo0rIRMCie/RAU4tNLTA8sW65oPi0OGWAk9DW/raJ2QD5yw 6co4sWJJKBFjWI6nSxdneBQhzPB0u1hiiCqkkHp8NZScXZzZ1X2uUN0qKIuXDQwS GZwzF9Nq+8X5NJt0rofFtkR3hcpKBQgdWqRx/omsV58mPFJFC+XKGKAQgZpE+k4m IZFWVfpmIh2N3Fcl2m34qKf6Ca2pbMhy2EnzkqQdIVrB8Y81cm8RdCLbz/KSmFPK ZAxrdo1ohwezmkoSAzXuwy1TGsPgaNtyl8yZdEu3f+9C3jYnQJbUGc4qIJtvrQvD 0BrJHQRwJB+9v5CMLrNqAv6e5Cv/ZsuDswWM0ZajUz0mhUUnczA= =hGfN -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua--