Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp451679pxb; Wed, 25 Aug 2021 07:07:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1B2ocjvbgjZd9nwLd3HwMIdJMANMyoRQsRRHB+oEl5Bxl93IrLYN2yuJHk1h6/DTwwKyA X-Received: by 2002:a92:440f:: with SMTP id r15mr29445085ila.51.1629900435349; Wed, 25 Aug 2021 07:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629900435; cv=none; d=google.com; s=arc-20160816; b=tIoLm1zPHTaE/VF0E5w8ZHEcysY+J8jVPH2iHy1dfwchZHrtZIFm8KnAO74xwMyKJQ slXrB+hgeCgW4RMVUKUtoWjJ9FmWpOuJ8b2uTZ341Lk5s92mFRWc7jhNb7rCmcEfju57 /OgzkdZO9w71rA7WuyukitFH0FvZz8lr8HSoCjdIwOl49BSQfwnXKLnmVpN2WuaGhSwO pLkYkX6f0OYCiJ+c8pr1hGfAFwklNXY8uw1GIblz4YR6SWVEF6CSJSwKtx113wcOWsxj ipwmvDVMCni2QkJrzi2DChe2egxoKaferih1dd+KFKjlD+iuEmTIJdoI19Ldvr/Yr3jG 2Ayw== 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=bG08E4Gia2XDoAIM/iOC42vDXK501X3iSKLxu2zFcTk=; b=IY1nYZ0DUaNpXcIYH0QhXLK/WW2uic7MwS9sHEV86Bbb47JApDw+XtiswDW5ud03oj vR/vbd7lH9lFGmRrXQ50Y6jwZYixIznByD6m8lnj+5Xy2cwUyATmlWQ7X1wXBLEMa4WL V9+6zBLejndNbrO1hnovSjCmMYEgTLmXdxa3JWgfQTdcqIsMbQ+5AhnHq1vedUZrUB32 z8zoERqRCBpaaXf2eiTvEdsO/+2esIpCa/4knWA/KmsNa7aNbSpGzKlbApnLlWrhbUhZ qcyHAQ+TIq2PvKICj5VQjjtgQUoZtRVYcwDXYucYKSzLUf5aee/Idg9YzcoTU5DnDrI9 bFWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cIEE9mrs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si13130669ioo.36.2021.08.25.07.07.02; Wed, 25 Aug 2021 07:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cIEE9mrs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240294AbhHYOEm (ORCPT + 99 others); Wed, 25 Aug 2021 10:04:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231927AbhHYOEk (ORCPT ); Wed, 25 Aug 2021 10:04:40 -0400 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 27B25C061757; Wed, 25 Aug 2021 07:03:55 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 88FAB24F; Wed, 25 Aug 2021 16:03:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1629900233; bh=XStmeZO8laUiqm+2DGzqMZYC9eT61xuHqTB/62k3p1U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cIEE9mrsTLqpabwSaeJh1pBEwOBJN00cPbceah7LZuwSaS2JoH+UyBOm9FOFRXFbR mj6aAs3ZaOQPkazphk/YZvtgfnMmFE/D5m/NYi0MHVSXtR0IG9ALByfqtEPmp/35qr P1/AUwJI+eTYUE4njzppa1S3rWTiIgpSa/DKZWQE= Date: Wed, 25 Aug 2021 17:03:41 +0300 From: Laurent Pinchart To: Mark Brown Cc: Andy Shevchenko , Daniel Scally , Linux Kernel Mailing List , Platform Driver , Liam Girdwood , Hans de Goede , Mark Gross , Maximilian Luz , Kieran Bingham , Sakari Ailus Subject: Re: [RFC PATCH v2 1/3] regulator: core: Add regulator_lookup_list Message-ID: References: <20210824230620.1003828-1-djrscally@gmail.com> <20210824230620.1003828-2-djrscally@gmail.com> <20210825103301.GC5186@sirena.org.uk> <20210825113013.GD5186@sirena.org.uk> <20210825131139.GG5186@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 25, 2021 at 04:59:36PM +0300, Laurent Pinchart wrote: > Hello, > > CC'ing Sakari. With Sakari's correct address. > On Wed, Aug 25, 2021 at 02:11:39PM +0100, Mark Brown wrote: > > On Wed, Aug 25, 2021 at 03:26:37PM +0300, Andy Shevchenko wrote: > > > On Wed, Aug 25, 2021 at 2:30 PM Mark Brown wrote: > > > > > > No, what was proposed for regulator was to duplicate all the the DT > > > > binding code in the regulator framework so it parses fwnodes then have > > > > an API for encoding fwnodes from C data structures at runtime. The bit > > > > where the data gets joined up with the devices isn't the problem, it's > > > > the duplication and fragility introduced by encoding everything into > > > > an intermediate representation that has no purpose and passing that > > > > around which is the problem. > > > > > The whole exercise with swnode is to minimize the driver intrusion and > > > evolving a unified way for (some) of the device properties. V4L2 won't > > > > The practical implementation for regulators was to duplicate a > > substantial amount of code in the core in order to give us a less type > > safe and more indirect way of passing data from onen C file in the > > kernel to another. This proposal is a lot better in that it uses the > > existing init_data and avoids the huge amounts of duplication, it's just > > not clear from the changelog why it's doing this in a regulator specific > > manner. > > > > *Please* stop trying to force swnodes in everywhere, take on board the > > feedback about why the swnode implementation is completely inappropriate > > for regulators. I don't understand why you continue to push this so > > hard. swnodes and fwnodes are a solution to a specific problem, they're > > not the answer to every problem out there and having to rehash this > > continually is getting in the way of actually discussing practical > > workarounds for these poorly implemented ACPI platforms. > > > > > like what you are suggesting exactly because they don't like the idea > > > of spreading the board code over the drivers. In some cases it might > > > even be not so straightforward and easy. > > > > > Laurent, do I understand correctly the v4l2 expectations? > > > > There will be some cases where swnodes make sense, for example where the > > data is going to be read through the fwnode API since the binding is > > firmware neutral which I think is the v4l case. On the other hand > > having a direct C representation is a very common way of implementing > > DMI quirk tables, and we have things like the regulator API where > > there's off the shelf platform data support and we actively don't want > > to support fwnode. > > From a camera sensor point of view, we want to avoid code duplication. > Having to look for regulators using OF lookups *and* platform data in > every single sensor driver is not a good solution. This means that, from > a camera sensor driver point of view, we want to call regulator_get() > (or the devm_ version) with a name, without caring about who establishes > the mapping and how the lookup is performed. I don't care much > personally if this would be implemented through swnode or a different > mechanism, as long as the implementation can be centralized. -- Regards, Laurent Pinchart