Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2755416imm; Fri, 20 Jul 2018 04:29:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf8u/OYjdrpRP0x7WtkovZ6+CfjtCH/Oq+mpiBhiQvtYiGQh1EvtwgFJBRn4JZwmN6F8Vy0 X-Received: by 2002:a65:4c02:: with SMTP id u2-v6mr1779134pgq.364.1532086142489; Fri, 20 Jul 2018 04:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532086142; cv=none; d=google.com; s=arc-20160816; b=0XP814HntmNVGmU3jE9LWiOQdMSEwO9O377+SCQwLkLKj7pwdN9kidtca6/tv2u9Ke 9ffu0Br9O6tUz9L1Bn5lfGxenA5wTdq0KFQ47tMucGVtdSklMX8yhW4QvwWElIDDa+6D D7S8VgFnbtezgp08xShdsejaGtEuGQiwWE+EG3b0FxD3xrXTUwyg+t2W4TBxh9OvFQiq U3C20tOKleJybEJmiIWkq8i1b6t2tpVrEJcUhKkGQDa4KP35wlojvoyJuJkXUui3EYWj ExDhE51Wpk0ZhebUBNWvxs0FfJO7RI1hxpU3PBtfaAqNeaYpDqhQk+vEzbxYKApDnlDU GuAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=SqJ4GtMi/P88XgAFrR3gDyoz1BqU7PUjBI9FD/Ec8gs=; b=hD2w8z391TCVkW3UXQpMlLTk3m0unbQpne1HwteKgFqMrWkz/jzJthX7ioSlcF1yOe l8qDeG84/PAjYU23569q9Tos/FClUY4vc0fLxSu4o9xJchXftbm/9tq3y25UpCqyZfSN fvPrpvBmSFzTc/dYOavHGQb0ubLjsPXQ8+GGaPNJKxarjNuUP/Vld0ilyddA1bYtk/x1 KjEn0KakV7uINRnRgvFd7MgGzBWwmtiI0hdpzDL2DktEh5DWge4Es6aUcTvIfdYbSi1w 7BiV74ccvogoBm+jJUIMv5pFlYTO8xOKYl0PU+UWe7XjYIJfoF7F4+hQ5qnbjyV5hVyk uzfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=M+L3+bzP; 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 k19-v6si1474838pls.477.2018.07.20.04.28.47; Fri, 20 Jul 2018 04:29:02 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=M+L3+bzP; 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 S1728404AbeGTMQC (ORCPT + 99 others); Fri, 20 Jul 2018 08:16:02 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:43249 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727822AbeGTMQC (ORCPT ); Fri, 20 Jul 2018 08:16:02 -0400 Received: by mail-lf1-f65.google.com with SMTP id m12-v6so1571159lfc.10; Fri, 20 Jul 2018 04:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SqJ4GtMi/P88XgAFrR3gDyoz1BqU7PUjBI9FD/Ec8gs=; b=M+L3+bzPcu2bASF+TlWTXXAmOUhrIiYhNQN27Zv8A7m6zouoWOpFhv38vKaYBf5S6H 78fOGaSCoTRVQ9GQgTY8axULUq48dFlof48Gcy+W+95LXvRuynWVi2y54GBgVwY5/Gbl u1iop/AkABgNblF3AskFndrKToI/U8GwYxBmZkK4xs2hT7B2Yzagz+sLv3rUtQmAtLmk zmpqOjc12FdD+gvdwkLB3PIbipT6EQw2GJtu+K6Rek1BMPzdKl2ntUebgCSmMLoSXtQe coTZjHyYrsEavFdTGt032Vn/9MaTnuGzuPCaYG07x9T5oEVgpl88qKOmxOuW4kkVT5XP 5X9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SqJ4GtMi/P88XgAFrR3gDyoz1BqU7PUjBI9FD/Ec8gs=; b=sEWSnOnmWbwmQ5aHdo+FuDAH0i2jLFXTml5k9hmGIDb8zehMZ1FPYH0VuhAaF6Hjhu zvt1PSReif2rwjbUvsQZlTGOy7APKkj/v+msuZlGdWxKmOb1UrUT9jJLjO+UwNQYdMsb BmBM5SpHAXeT3oBJTDFKhN9l+aafRYeYo2/0gXM39cVagFsH+I8iYlirNiuM8JAi8pjD goC2+5gGyWpCQnoI/CWFvtJFRVikXeofJnDWvt4Y1Qi23rEgPCK/Q7kHMlXch0k1b4FN IqPhXPSfBG6VPbd11ivX8/gfhB85w33OqfMJ8th/PuMz1iEV69IIsxBlo1bs5AIfRSvr gwuA== X-Gm-Message-State: AOUpUlGsdPP0sgk+SUPiO5fPCYBsH1cCiiE7Ozvhb5m3H6kHigPc5bv/ JxwNdyWVxuf0x+cLpVX/G+v6eYca0sJLrwn73nQ= X-Received: by 2002:a19:ea5c:: with SMTP id i89-v6mr1163751lfh.19.1532086091357; Fri, 20 Jul 2018 04:28:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:41c1:0:0:0:0:0 with HTTP; Fri, 20 Jul 2018 04:28:10 -0700 (PDT) In-Reply-To: <21b269c5-a3a7-c5de-c81e-c9c9301ae13e@axentia.se> References: <20180719152930.3715-1-boris.brezillon@bootlin.com> <2ab0ab75-2df0-2714-f007-c33b25481016@axentia.se> <20180720101206.tv7nsoanwo5ftnia@ninjato> <21b269c5-a3a7-c5de-c81e-c9c9301ae13e@axentia.se> From: Arnd Bergmann Date: Fri, 20 Jul 2018 13:28:10 +0200 X-Google-Sender-Auth: Ix89EmYESe-t8dONXgRe3c3D0Ac Message-ID: Subject: Re: [PATCH v6 00/10] Add the I3C subsystem To: Peter Rosin Cc: Wolfram Sang , Boris Brezillon , linux-i2c@vger.kernel.org, Jonathan Corbet , "open list:DOCUMENTATION" , Greg Kroah-Hartman , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , DTML , Linux Kernel Mailing List , Vitor Soares , Geert Uytterhoeven , Linus Walleij , Xiang Lin , linux-gpio@vger.kernel.org, Sekhar Nori , Przemyslaw Gaj Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 20, 2018 at 1:13 PM, Peter Rosin wrote: > On 2018-07-20 12:57, Arnd Bergmann wrote: >> * What I understand from reading i2c-demux-pinctrl.c, a slave device >> will only ever be observable from one master at a time, when you >> switch over, all children get removed on one master and added to >> the other one, to be probed again by their respective drivers. >> I can see this as a useful feature on i3c as well, in particular to >> deal with the situation where we have i2c slaves connected to a >> pinmux that can switch them between an i3c master and an >> i2c-only master (possibly a gpio based one). That particular use >> case however doesn't seem to fix well in the current code, which >> is structure around i3c buses. > > It's pretty easy to come up with examples where this reprobing is > not desirable at all. E.g. if one of the involved I2C devices is > a HDMI encoder (I have a TDA19988 here) sitting in the middle of the > graphics pipeline. Blink-blink on the screen because some *other* > unrelated device needed to be accessed by an alternative master. Not > pretty. Agreed, we definitely don't want to reprobe all devices during normal operation for i3c master handover. What is the least contrived use case that you can think of where we would want to use one master to talk to one device on the bus, but another master to talk to another device on the same bus? I still hope that we can decide that this is not a useful scenario at all. If we find a case in which it is needed, we could still deal with it like this: - enumerate all slaves connected to the bus for each of the two masters - mark each slave as status="enabled" in at most one of the buses, and as disabled everywhere else - Use dynamic handover according to the bus protocol to switch masters without having Linux even know that the two buses are shared. That scenario would then fall completely into the "secondary master handover" category but require no special handling in the i3c layer beyond what we need for secondary masters that are managed by something outside of the kernel's score (a microcontroller, firmware, ...). Arnd