From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F252C282DD for ; Wed, 8 Jan 2020 13:32:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC7F62067D for ; Wed, 8 Jan 2020 13:32:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="o7ELkoOe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbgAHNcI (ORCPT ); Wed, 8 Jan 2020 08:32:08 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:46804 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbgAHNcI (ORCPT ); Wed, 8 Jan 2020 08:32:08 -0500 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C60D152F; Wed, 8 Jan 2020 14:32:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1578490326; bh=Pobrlhmqc6PtlGm7VqiJXf2RU2NMg6C4wsRkYYh1+uw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o7ELkoOeO92pzbS4grY5jnXjzdNt/3XOu6+nkMiE2gvV6puMGXJaV1q60I7Tly2xO TykbVfCanVtu9JOQLDd38wVIIeomkguEJL3IBjkom4xGkJF4A+ssSDXm4RiOtaihij bJab3OfTw8iAJwL3UT6iwgWrTGhce4DYMsDpFhzU= Date: Wed, 8 Jan 2020 15:31:53 +0200 From: Laurent Pinchart To: Wolfram Sang Cc: Luca Ceresoli , Wolfram Sang , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham , Jacopo Mondi , Vladimir Zapolskiy Subject: Re: [RFC PATCH 3/5] i2c: core: add function to request an alias Message-ID: <20200108133153.GB4884@pendragon.ideasonboard.com> References: <20191231161400.1688-1-wsa+renesas@sang-engineering.com> <20191231161400.1688-4-wsa+renesas@sang-engineering.com> <20200101165515.GC6226@pendragon.ideasonboard.com> <20200102211327.GB1030@kunai> <20200103001056.GJ4843@pendragon.ideasonboard.com> <20200107171357.GO4871@pendragon.ideasonboard.com> <20200108132708.GC834@kunai> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200108132708.GC834@kunai> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Wed, Jan 08, 2020 at 02:27:08PM +0100, Wolfram Sang wrote: > > > > It would be nice, but I'm not sure this is really doable. Say the DT for > > > board X lists all the used slave addresses. Then the kernel would assume > > > all the other addresses are available. But then somebody includes the DT > > > of board X in the DT for product Z, based on board X + add-on board Y. > > > Add-on board Y has 2 I2C chips, but only one is described in DT. Now the > > > kernel still thinks it knows all the used address, but this is wrong. > > > > That's the fault of the system integrator though. We can't prevent > > people from making incorrect DT, and we shouldn't go to great length to > > still support them. > > Currently, there is no paradigm that all I2C busses must be fully > described. Enforcing it now all of a sudden is not too user-friendly, > or? We're only enforcing it for systems that want to make use of this new API, so it's not breaking backward compatibility. > Especially since calling read_byte once is not necessarily "great > length" in my book. If you have 8 cameras on a 400kHz bus, the 8 * 18 > bits should take 360us if I am not mistaken? That's assuming the first scanned address is free. There could also be I2C-controller I2C muxes or gates in front of the bus. Things can quickly get more expensive. -- Regards, Laurent Pinchart