Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13426825rwl; Wed, 4 Jan 2023 08:02:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdCblN7EX20g1TsakzA9U4pNv0eeEZvXCFfLjgaqabGeURQJGQR1Xv6L6sOaggalcdhFaN X-Received: by 2002:a17:902:a70c:b0:189:dcc3:e4a1 with SMTP id w12-20020a170902a70c00b00189dcc3e4a1mr48916027plq.9.1672848166703; Wed, 04 Jan 2023 08:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672848166; cv=none; d=google.com; s=arc-20160816; b=PzUMJ/6ki39DUGlBDyHJS2TtC7pq1XbyX8boFkzrcpR5tsDnTwr4KbKDTaET+UfvZo kQUhJcSAdyfXWBXjj89LuEBpB8T0Tzk0XLbT7GUPrqr+BG9Dj8RwPYyqpD21BgJEagMq joGDU+bhpuQzOe73dUJ/KtRh5gXfvFRCE/LoZXop9d/+kDx52TJvD5eisaOkr5RWxfk0 +wP1Rl3bW+MKcThaqzxzmlxCzhVtjSRIxICc4Y0DahDBhjTOC76PmYvlBK96kBD22zkv zOLQDVWHahsv1viLPrP3KzhqqBLHr+oHqicBfSh4xeMc5HsNmof1bRdycuuZkBAPjgh+ dZvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0tYpmCo10RwzihjUwm/97cNXR2cV4c7CV+yHj54MH8Q=; b=JV1LZTNCvhP0UG85VmFJg3tmya7lQXKcZsy4gRMyemwrdyoCVhOJl4hyJuPHK2l0MN sTI/9WEsa0hzNMqzGtbygX6RB5itN1n98lEs6Mn1w2plXF6Nv3dDuyyMGnP7CArhtKAV JeY97xBqdBzXoBB3iCRau7UPP/Siwqst2mzNYUftwZBGdGYvr8M2osq8R+qWDHE5pWIo AoRHjVVfMxG6qmnXwPYiDr1QJwXWvateEMuOj+6Tem9bkWiOqLQGwIS+qNaa2XW3AriD Law2OcZXSPXs/JUf7fMcnybHJYZUI6uc92UrfLCpAvqmxNmwMkXdRXbR0FYvmz/MdzGu kIOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=kzDkr2em; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170903018600b0018930cc84c0si37931471plg.574.2023.01.04.08.02.38; Wed, 04 Jan 2023 08:02:46 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=kzDkr2em; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239264AbjADPcX (ORCPT + 57 others); Wed, 4 Jan 2023 10:32:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjADPcV (ORCPT ); Wed, 4 Jan 2023 10:32:21 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363C61B9D6; Wed, 4 Jan 2023 07:32:20 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2A0D4A16; Wed, 4 Jan 2023 16:32:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1672846337; bh=yKSmdm+JkNCC/zelXC0/m5mbL7/v+Rt6f44V0yse8gk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kzDkr2em0T+eszSyTIq5zC4hfox4eOSQy9RfJzMq6Wa50fS3TGgEy8JYUxo55aoC4 F4WD/vrN01zPxGI9FuZyJotneId+z61mECD7QSAhQTJ7GjNYPtdcRPyTfPixBeUywW rVjyaMPCkqWllZ53B1wDNQ0vRr4i64Ox9Ya8KAbo= Date: Wed, 4 Jan 2023 17:32:13 +0200 From: Laurent Pinchart To: Tomi Valkeinen Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Wolfram Sang , Luca Ceresoli , Andy Shevchenko , Matti Vaittinen , Mauro Carvalho Chehab , Peter Rosin , Liam Girdwood , Mark Brown , Sakari Ailus , Michael Tretter , Shawn Tu , Hans Verkuil , Mike Pagano , Krzysztof =?utf-8?Q?Ha=C5=82asa?= , Marek Vasut Subject: Re: [PATCH v5 7/8] media: i2c: add DS90UB913 driver Message-ID: References: <20221208104006.316606-1-tomi.valkeinen@ideasonboard.com> <20221208104006.316606-8-tomi.valkeinen@ideasonboard.com> <4d349785-ca37-d930-db3c-2581bba9fde0@ideasonboard.com> <7ddd576f-6e8a-7581-178c-2e8575227811@ideasonboard.com> <61729020-0977-521a-6137-3bd89f300652@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 Wed, Jan 04, 2023 at 04:13:17PM +0200, Tomi Valkeinen wrote: > On 04/01/2023 15:55, Laurent Pinchart wrote: > > Hi Tomi, > > > > On Mon, Dec 26, 2022 at 09:25:34PM +0200, Tomi Valkeinen wrote: > >> On 26/12/2022 18:56, Laurent Pinchart wrote: > >>> On Wed, Dec 14, 2022 at 08:36:47AM +0200, Tomi Valkeinen wrote: > >>>> On 14/12/2022 08:29, Tomi Valkeinen wrote: > >>>> > >>>>>> wondering if the struct device of the DS90UB913 could be passed instead > >>>>>> of the port, to avoid passing the port throught > >>>>>> ds90ub9xx_platform_data. > >>>>> > >>>>> Interesting thought. That would limit the number of remote i2c busses to > >>>>> one, though. Not a problem for FPD-Link, but I wonder if that's assuming > >>>>> too much for the future users. Then again, this is an in-kernel API so > >>>>> we could extend it later if needed. So I'll try this out and see if I > >>>>> hit any issues. > >>>> > >>>> Right, so the issue with this one would be that it would prevent a > >>>> single device uses. E.g. a single chip which acts as an ATR (similar to > >>>> i2c-mux chips), i.e. it contains both the main and the remote i2c busses. > >>> > >>> I don't think I understand this, sorry. > >> > >> What you are suggesting above means that we'd have a separate device for > >> each port of the ATR. Which is fine in our current case, as the i2c > >> master busses are behind separate remote devices. > >> > >> But if you consider a case similar to i2c-mux, where we have a single > >> chip with the slave bus and, say, 4 master busses. We would probably > >> have only a single device for that. > > > > Hmmm... Yes you're right, it won't work in that case. Maybe we could > > have two functions, the existing i2c_atr_add_adapter(), and another one > > that wraps it ? It would be nice if we could get rid of the platform > > data for the UB913 and UB953 drivers. > > I wouldn't mind that at all, but we already have the bc_rate there. And > I have a feeling that we might need more if we implement more features. Indeed. I feel that platform data is a bit of a hack here, but maybe it's not that bad. > And we also have the atr pointer there. Or do you think that could be > dropped also? In your mail above you only mention the port, but maybe > the deser could register the serializer device and port to the ATR, and > then the ser could just use its device pointer instead of atr & port. I was wondering if we could drop the atr pointer too, yes. I'm not sure how, and there's no urgency to fix this. My main concern is that new drivers should ideally not be forced to use platform data just for ATR support, if they don't use it already for something else. -- Regards, Laurent Pinchart