Received: by 2002:ac8:1418:0:b0:3ab:920c:4c8b with SMTP id k24csp5409514qtj; Wed, 4 Jan 2023 07:45:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXswhVK7yPZxFexS7lLlR9S+icWBhMfKNQzTYkHZ77iCXzB7SpWqteRhkDp61vBgmlxEeA18 X-Received: by 2002:a17:903:2d0:b0:192:b5b3:7ff5 with SMTP id s16-20020a17090302d000b00192b5b37ff5mr20085919plk.50.1672847149951; Wed, 04 Jan 2023 07:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672847149; cv=none; d=google.com; s=arc-20160816; b=BlUPo6sDe4k5QsQ5X9k7iIzdqD7n8wNHxa4zBObEO9/q7xIqaE9v559k/+d3UeeVdP v4Ak/fkOsfgfhT0H0pjIbQ67ZLeIVbZeKVVKLRpz6+HZXMQWTFHvQWE3RWP62MxPVnli 3Mp3744oojFaF+uQpFPHamw6hxioGHbESShWHLZ7ckomnJxAvs8Q2j8EEG0pacASOMFx aX7tAKoDrbOwzjFdkuV3QoXJhOBM1ngFlow3SmjT+NHb6vB6CQRKmrpQ6wIXQjmofMTR Z+0jXf77Mh9A5/B7Ag/RF8O7+AXF5x+zxB6j74yozPjeZv0hpGna6+i3X6GpK7wBo6K3 Hd6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ptrY6MOVuxP7yRLri3iKiS5S6WhbxZOUjYleXoTa9SY=; b=XnvL+mXA/WLWebYkU6FDlQz3yVDkC+jAlcHPAHhWA3K0RH714qXn2gRXzbp2TfvFln XWbirRbDP24k5OcP9XAtJw3KjTHAQLqjz1Aou9KhF6eoCO4b1DTwJrJao6/aEpHzGj9q EjQhsVS+R/LaIT7hLfxd+VbqUxzbVuHxmPlXCSzWW+TdnIZn4Sj0VfeMxoW72vltbzHi MvBkQT1Z3921n4pkAZLDPO6GPKaLaKhm8JG9gWH1W0KohYcSQHpr4gqixBRhY26M6X3m 7cVKyEUe82tM/svew5dzvYVPubZgpwbdeF2fJOp7QTlCI9bYdMT1fjPMbzaiPWLbcuw3 QdLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=q+pL4xaI; 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 k14-20020a170902d58e00b00187480df4b3si29581621plh.277.2023.01.04.07.45.36; Wed, 04 Jan 2023 07:45:49 -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=q+pL4xaI; 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 S235146AbjADPo2 (ORCPT + 57 others); Wed, 4 Jan 2023 10:44:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbjADPnx (ORCPT ); Wed, 4 Jan 2023 10:43:53 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3704F32186; Wed, 4 Jan 2023 07:43:52 -0800 (PST) Received: from [192.168.1.15] (91-154-32-225.elisa-laajakaista.fi [91.154.32.225]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B2A6A16; Wed, 4 Jan 2023 16:43:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1672847029; bh=IyEthoqXLLLXgAkjpraP/KrqPHrSmAQnx85oOhUw2vc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=q+pL4xaI70OOGuj4RfI7cAaxlSVWPaTT5dFD5EYBcAcrWbwsvxJlsnF+voaMlD2qh qDpFiTp9ZH8uIqseEKUQr96aFAzGAWaVHyUd1TD+0zqoiBApOMV2KAX0MajuuB2jD1 CXgHdyleGZT0YeL8+FxbQXcvXLTZgBc2FEVr9TG4= Message-ID: <16a34c6c-2af7-797d-8dfb-bcd4d9c0f690@ideasonboard.com> Date: Wed, 4 Jan 2023 17:43:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v5 7/8] media: i2c: add DS90UB913 driver Content-Language: en-US To: Laurent Pinchart 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 , =?UTF-8?Q?Krzysztof_Ha=c5=82asa?= , Marek Vasut 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> From: Tomi Valkeinen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 04/01/2023 17:32, Laurent Pinchart wrote: > 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. Good point. However, we don't know who will use ATR or how ATR is going to be used. Using it the same way i2c-mux is used, there's no problem and platform data is not needed. Using it in this split manner we do with FPDLink does bring up the problem. And using i2c-mux in the split manner would also bring up the same problem. So maybe there's some neat solution out there that would solve the issue for both i2c-atr and i2c-mux, but it escapes me at the moment. Tomi