Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1822414rwr; Thu, 20 Apr 2023 23:23:51 -0700 (PDT) X-Google-Smtp-Source: AKy350ag8zYqzpwx9dD6zGMzG0Yoi3qkMe5pecqBmNFZ/wcV8UQeaWWxetz0EjTeHSZC+cCgZDrF X-Received: by 2002:a17:902:e18c:b0:1a6:fe25:4138 with SMTP id y12-20020a170902e18c00b001a6fe254138mr3509922pla.59.1682058230858; Thu, 20 Apr 2023 23:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682058230; cv=none; d=google.com; s=arc-20160816; b=SlwYzJr89JAaFaPdDznJxK0CGW1C+9/k03KtCGKcQN4mSKGN7X6vjDTY3BXL/+XHAh fhIdmujZuYPEmqkqk6hiDlz/iCuw8bwMw+oT/Y0iVD7YxFK/YLJXLuA2/+VaRdICfkPq jEFfq36oS5VThZQYAE3MNxVWvVwTohOI51sJEbjz9yLE0EGeALghVuito44IXjVaMR+Z sF3acGOpeMSg5RLJkMI77DatjOw1/4f1GT8OvzOCjXNRFswIoVsOYILvMM4MdRnr+hHT OXVDS9QB2k5XRxCarVomuKr3kHYRiV1x3ybM7jcX5MHiJDu1CYaf7bE4d8gHRR6MfA8h aJrA== 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 :content-language:references:to:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=cX8VEnn9Rf156XEmBwiPl32OLHMXchFRUpjTNXOzKBA=; b=hr5fKkUMRk1uuj3t4tRkfKVDu3lKAgqKQh/CCzKFxCGQGfRDR5YXciZbk/FcpLvpmr Eg9WjMvTmx2OG0wapC0ahhtu8qDxHo1jUFNtaITIr9Hex6LIN0Rf2ZCuny2oCyXQZQC6 pPbw/OwJESTmU6qOG0OiUiQOiJjOFl2odkZk1MumOZUAnxFWrM3/YX0xwuBaT32TnhGY 2aKg3R/zj0f6j3hksgtIfqnRVp4xcwaFsNpgDKWxfm+Wkf6lxoUHq00PoI8lU7EmBEJk JZUQdw8Vgjtv74lIXdM4GJMvnRjycZRQUO0XIJtFVlk4donAu54TiX2bq9cZORp+B+Lt iKDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Va3dxkvs; 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 p10-20020a170902780a00b001a8143865f4si3357781pll.613.2023.04.20.23.23.36; Thu, 20 Apr 2023 23:23:50 -0700 (PDT) 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=Va3dxkvs; 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 S229830AbjDUGTg (ORCPT + 99 others); Fri, 21 Apr 2023 02:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbjDUGSy (ORCPT ); Fri, 21 Apr 2023 02:18:54 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AFA8358B; Thu, 20 Apr 2023 23:18:50 -0700 (PDT) Received: from [192.168.88.20] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DAFE510A; Fri, 21 Apr 2023 08:18:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1682057919; bh=54AEpK2Lhks/cVE8toCu23zDhRa6jQHC/5KdhVgYezI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Va3dxkvsdQ0eQN9H8oz9zrTcH3cjJzFk73BL8dfCFTpDK8wpKkwCm9y5HG9EeGGa+ O6RL2BPT2azgOJAV6lrlpVqNTrLkByDqNa5qqzt39xVf+QgtJXSRcRvkZlXcSQWhda Fxwcf2ziNwo+tcdcDPzHc35JdJy4rzFp3JCBgIJQ= Message-ID: <9130e2da-dcd1-e6aa-ed0a-935f79727f84@ideasonboard.com> Date: Fri, 21 Apr 2023 09:18:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v10 5/8] dt-bindings: media: add TI DS90UB960 FPD-Link III Deserializer To: Wolfram Sang , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Luca Ceresoli , Andy Shevchenko , Matti Vaittinen , Laurent Pinchart , Mauro Carvalho Chehab , Peter Rosin , Liam Girdwood , Mark Brown , Sakari Ailus , Michael Tretter , Hans Verkuil , Mike Pagano , =?UTF-8?Q?Krzysztof_Ha=c5=82asa?= , Marek Vasut , Satish Nagireddy , Rob Herring , Laurent Pinchart References: <20230222132907.594690-1-tomi.valkeinen@ideasonboard.com> <20230222132907.594690-6-tomi.valkeinen@ideasonboard.com> Content-Language: en-US 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 20/04/2023 21:47, Wolfram Sang wrote: > Hi Tomi, > >> How does this sound: >> >> - If "i2c-alias-pool" is present in the DT data of the device passed to >> i2c_atr_new(), i2c_atr_new() will parse the property. i2c-atr.c will export >> functions to get a new alias and to release a previously reserved alias. The >> driver can use those functions in attach/detach_client() callbacks. In other >> words, the alias pool management wouldn't be fully automatic inside the >> i2c-atr, but it would provide helpers for the driver to do the common work. >> >> - If "i2c-alias-pool" is not present, i2c-atr.c will behave as it does now, >> and expects the driver to manage the aliases. > > So, how does a driver manage the aliases without a pool of available > addresses? I can't imagine another way right now. > > In general, your above proposal sounds good to me. With my lack of > imagination regarding a different alias handling, I could also see that > i2c-atr already provides the alias to the attach callback. But if you > teach me another way of alias handling, then I could agree that your > proposal makes sense as is. Oh, my imagination doesn't go so far to give you concrete examples. If the driver has to do runtime decisions on the pool, a fixed pool handled by the i2c-atr won't work. But why exactly would there be runtime events affecting the pool... I don't know. Maybe that doesn't matter here. We can start with the i2c-atr providing the alias to the attach callback, and if we ever need something else, the (kernel internal) API can be changed accordingly. The DT bindings should be fine in either case. Tomi