Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6042165ybe; Tue, 10 Sep 2019 12:36:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhYE/GaN0JYGs38QrJPRqwIhd5fr2xCb5lmOZo+LbATopDZ43fwwIt70JCQ/78RahyLwt/ X-Received: by 2002:a50:981b:: with SMTP id g27mr32742874edb.105.1568144182646; Tue, 10 Sep 2019 12:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568144182; cv=none; d=google.com; s=arc-20160816; b=MeQrByaCL2rKykD6NgrUdgSKITnxZuibwLKeLV9PCopRIGlfKZiXGYCa5CJUXvXw8N P3DFfRxxptdMui6x6CbzkRIS/KSVHSECxzSJpVWGn06EhjQiwkFQiUCfhjHtQQxmy7zi fHhXYpuTXKXbzCR7IPri+pS12WahGHZRLneF7NEn2ZqLOE23roqKtWWGdnUUO8lqHDdI 5f6ERZcA8NUh2CzNc/xdV7yWv0Ib0Mg2SfpWJE9JIlH5FbQh0a/IxnHKLUhktLq4G2Tm 4UQbbrIJsBbQqLb1r3wAUSXzB5PJnZxwyHz6KPfBw/xoJ2E+EaNOE1+dYAPfXLt3Ap9T VSuw== 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=s3DDNuaeaXGX2lsJngLtbhNkgbP63BelVbW+A9z8lh4=; b=TlcPPE2nRoW0/gZr5s7p7EDwce5VSa9cFdEmNWf0LbLT+LHoZ1wbnrnFqdBJ7o9SgT 1dDfZjFnCqBfrGzU4I9IChNutJ4jAISgABlfz9arD/qOPaE7OnJ27FIaH3P4VX8JOWb6 12tEVyYXl3LEaQQ9NT5gTn1p/HHQRt/2KDe/L5WQzIrHadjaFizwMirytG/NfZs1p4cy gOnlrAgIkMb2B3u7GFF1XNF5KeL0MMYIqIv3dKB0CX4Z6riBTjHG4ahTCrlWTO4BxFCR IEU1WFo3i4kQljJRUeNIPqqn9SQodp93C0UghhPEiQwtftbLmeZlLNxKcbD35LlvDRxH INeQ== 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 y23si10811542edt.114.2019.09.10.12.35.58; Tue, 10 Sep 2019 12:36:22 -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 S1728042AbfIJSq4 (ORCPT + 99 others); Tue, 10 Sep 2019 14:46:56 -0400 Received: from sauhun.de ([88.99.104.3]:50760 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbfIJSq4 (ORCPT ); Tue, 10 Sep 2019 14:46:56 -0400 Received: from localhost (234.77.63.94.rev.vodafone.pt [94.63.77.234]) by pokefinder.org (Postfix) with ESMTPSA id 19EC92C0095; Tue, 10 Sep 2019 20:46:54 +0200 (CEST) Date: Tue, 10 Sep 2019 19:46:53 +0100 From: Wolfram Sang To: Luca Ceresoli Cc: Peter Rosin , jacopo mondi , "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 , Vladimir Zapolskiy Subject: Re: [RFC,v2 2/6] i2c: add I2C Address Translator (ATR) support Message-ID: <20190910184653.GB5581@kunai> References: <20190723203723.11730-1-luca@lucaceresoli.net> <20190723203723.11730-3-luca@lucaceresoli.net> <20190901143101.humomdehy5ee73sk@vino> <20bac324-c4d3-270c-5175-0a7f261fd760@lucaceresoli.net> <51dede3c-545b-b66a-5e89-9e889d784eb9@axentia.se> <2d770b36-9521-820d-726a-bc9b52048ef8@lucaceresoli.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <2d770b36-9521-820d-726a-bc9b52048ef8@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 --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > I still have to examine in depth all of the problems in the i2c-mux > documented in Documentation/i2c/i2c-topology (thanks for having written > those docs!), but at first sight it looks like the ATR is not going to > introduce big problems because of how it works. Assuming we are using the previously discussed NEEDS_ATR flag for the adapter instead of the attach/detach callbacks: Can't we then simply understand an ATR as a generic 1:1 mapping device which can be setup when registering an adapter? When we add an adapter using i2c_add_adapter, we have: .-----. Slave X @ 0x10 .-----. | | | | CPU |--A--| ATR |---+---- B `-----' | | `-----' When we use i2c_add_mux_adapter, we have: Slave X @ 0x10 .-----. .-----. | .-----. | |---| ATR |---+---- B | CPU |--A--| MUX | '-----' `-----' | | .-----. | |---| ATR |---+---- C `-----' '-----' | Slave Y @ 0x10 That way we could keep the topology handling solely to the mux-core. Am I overlooking something? --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl1375gACgkQFA3kzBSg KbYJow/+JCThTpeS2XICmf9Q3MrO1dOKBMlUgPruJRw4irTMMkrMProjr3EhIYCw 7LuYkhW8Pessu8F9PbIJ9iU6IDb2UC5+Ao16IdbWYauY/Ij3ayhXsUd3ECl19lo4 SjbUynLbxbch6xzw4nitl1Vg8pxH1eVHA+3wi60O2eGBr2WHTouAMHa5YI6a6fw6 5MkxCxS4A08Ss0TUKZhJvl+7WttM5uigTmTsaI8FQLS0T+Z5rlxQIQR0CMP3ZyOR 1Fc/sndLvWOK5lRk/+v76LC7lFYEXa9ePLqql9IqP00u0qTO+wE+l3t51R5oTjpj poXtKqLcjtfyue7efqfYm+rQDu39I9lEguZsp8OivuYQlCkWzRu/IRYSxQSsBmbd 37XvMAHedHMQy4PIhzRSq9MtprK6RcMgFvUxf3fr/05WW+P2udby4gluEI3ba4lo MydbdFgf3rJfLkJ0TjC3GplUjDbffGmQ/uLvcwyxC1i3FCsQrK10NsUScZPg/oM9 KJjwa06l9ua0MrwDMq1s/3eqcWXCV9kyaIu1bE9CT6hLmJd7yacadcFRo5WqgVK1 qGBofVZbgsIrerqrYcKdXGS9vFCbsEZP6NQ2JpKHbiEITBy9Cqi1g2Jjo82byCqE BtyGllOLEvVIpm8938c9epfklbGk+ZIlWVJciamn1gG89j3bI/4= =3L8E -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ--