Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp912475lko; Tue, 13 Jul 2021 12:49:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFFWg6UEcUqnf+X7Q7q6keFTu7Qi7g8eAa5p6x9gPawE8SmLVTBpP/qAFj18dbz7F6rpmG X-Received: by 2002:a05:6638:33a6:: with SMTP id h38mr2274708jav.130.1626205764670; Tue, 13 Jul 2021 12:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626205764; cv=none; d=google.com; s=arc-20160816; b=sLDuVDAeGzc1sAVULqSVm7ZFCi14p1AF/w7RcSv3nRx0osbxLlJASsJN47rON3q0Dj 7s+3cjOShIwoJoENB4D//0+L7paQWAUdjQuVhMS9yC80s1Q/triQNP7nZBARjmx0ogFF pmqkDFgzVOQanLibbQ2Mq1UX7AXquICL9i2b1ooufkyBiMUpj1roeX27QwvwEq92Zz0u 5hA9rAULyE5m+w6HtWHHBqMaIgSXLl0Eg9GiRnRS4yqjRuN2CH5+1BowPVkF2TnLVj7T bumglJ6dQEBTg45wH7NumlWt95T066KRonlmnTmUJ/h657wKi5k21Gdf8LQWJOD/HpCx wjXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hUO4z88FjFShb0tr7ebTCI1mlDYypbUNdBXF8PiD+/Q=; b=lwcZLBY+Nfk/2M/dPS+9TQ4lw/KzqH0VveF7hvFyBH7Muzv1NzGHBMF64RucWo3J6a dmhSyI1mCJgNS5Rb/rvJRS9/KGnwu7q8Ht9aERHtpOuQhpCpMz26MWvFiRUlTY2MA0Ad eDDpx69EXhaK9pcxipsiPXRfHPg9NMXm2zR7njf6G+zwdpmfEhPTmiFWnMKijwIRIASd zpoD8EW/vWFdmcZeWQEBr8xmVS4Z4MUApNCi3yURg4NSrKAYmpiLLG2yjvIG3LPSDYFF +R3AOu6RnkZ0JRgd+N/6lfwuq1tMJ2tu21MOxpMU+J9U04XJKnT8oSaa/G1hHgFBk7QJ xG9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S2gpv6iu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si22908732ilv.2.2021.07.13.12.49.12; Tue, 13 Jul 2021 12:49:24 -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 header.i=@gmail.com header.s=20161025 header.b=S2gpv6iu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235061AbhGMTuH (ORCPT + 99 others); Tue, 13 Jul 2021 15:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234728AbhGMTt7 (ORCPT ); Tue, 13 Jul 2021 15:49:59 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851BDC0613DD; Tue, 13 Jul 2021 12:47:09 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id cu14so7420856pjb.0; Tue, 13 Jul 2021 12:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hUO4z88FjFShb0tr7ebTCI1mlDYypbUNdBXF8PiD+/Q=; b=S2gpv6iuoIz8KMmME9waddrFut/+xO1c/4fJ0KphbAOcyf7xLe4QKpsyQelvdnLhcD hxCt7L77sSih+iTVfj+VAcaCzDp2/GbnGrVFT119jUVnEDPZr0AVJJBQ/eaKK06E0Q/H 9LPxKtXJyl+5rlCReHeEoEnvWiHdlffy9tiWNmyzsaTSFuD1TzIcMYN3DhKGYsP5qYZZ nRALrm9DVfdD5tqNfx8iile/54ugLaVcLzDZIrcbjyMJjGR0vMAvWyb+7lO0ve0mAiaf h8hpteyD0NzKDZw5lEuJovSDjBEx8d4GLticXBfNjCV2mplHAFtHPab5uXvpdM1MjmTe TN1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hUO4z88FjFShb0tr7ebTCI1mlDYypbUNdBXF8PiD+/Q=; b=VJWJZ43y97rrSu9AMJjQHgdZDfE56Chea/Abad1DsWQSG9Bhky4w/K6LRjpaOkIZZI u9Xy/iBXvKb1dcw7jeVItpQhhjwb2sOU2ci3zdQ94vUdLuYuoVZItdLfYAvoi0pfSJeD XK8X1GroiaHll35CcYtPv5B+9ipEt+BHkT+jLfYeLCFpVTCwU8N3MeXs22fJrZzmb6sn wR90wKXEd4XlQ4eem2t3l3KUpaxsV/EkZZeIeiCrKokFFvIniyOXnhxAR6oEpgjfoHWR djOlG+Nsc2Vv6VIgSkJowObxZ4OkCkwc8E7rpnzkBXrOQ3ZTWOaYvL/LMcjAmdb+WfbD Lv+A== X-Gm-Message-State: AOAM530hW+eZZKs9GdA9d2g6Cx/HtryCpSfRTVYEgrgH0R7hF9weo2Hb hoKjEKic2ffjz7bpYiaNFZAR6tw2BvY6h2paoxk= X-Received: by 2002:a17:90a:17ad:: with SMTP id q42mr900534pja.181.1626205629007; Tue, 13 Jul 2021 12:47:09 -0700 (PDT) MIME-Version: 1.0 References: <20210709170426.GC4112@sirena.org.uk> <20210712124223.GB4435@sirena.org.uk> <20210712133428.GD4435@sirena.org.uk> <20210712170120.GG4435@sirena.org.uk> <20210713152454.GC4098@sirena.org.uk> <20210713181837.GE4098@sirena.org.uk> In-Reply-To: <20210713181837.GE4098@sirena.org.uk> From: Andy Shevchenko Date: Tue, 13 Jul 2021 22:46:29 +0300 Message-ID: Subject: Re: [RFC PATCH 0/2] Add software node support to regulator framework To: Mark Brown Cc: Daniel Scally , Linux Kernel Mailing List , Platform Driver , Hans de Goede , Mark Gross , Maximilian Luz , Liam Girdwood , Laurent Pinchart , kieran.bingham@ideasonboard.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 13, 2021 at 9:19 PM Mark Brown wrote: > > On Tue, Jul 13, 2021 at 06:55:59PM +0300, Andy Shevchenko wrote: > > On Tue, Jul 13, 2021 at 6:25 PM Mark Brown wrote: > > > > The driver code is trivial boilerplate, assuming someone doesn't go and > > > implement a helper to register stuff separately like I suggested. The > > > proposed swnode stuff would involve duplicating the DT parsing code. > > > This seems like a whole lot of effort for something that provides a > > > worse result than either of the existing things. > > > I'm not sure I follow. Where did you see the duplication when I saw > > the other way around? > > The current patch consists entirely of additions, it does not remove any > existing code at all, the diffstat is: > > 5 files changed, 174 insertions(+) Ah, okay, you are talking with regard to the current patch. I talked in generic terms. > > Converting code from OF to fwnode APIs in most cases is smooth and > > doesn't add any overhead to the codebase, > > We explicitly do not want to attempt to parse regulator properties out > of ACPI platform descriptions because using the regulator binding on > ACPI platforms conflicts with the ACPI model for power management and > we really don't want to encourage platforms to attempt to mix and match > here, it's not going to lead to anything robust. System integrators > that need this sort of OS visible low level power management really > should be working with the UEFI forum to get an ACPI specification for > it, or if they don't really need it fixing up their AML to DTRT. No-one is objecting to this. I agree that integration of regulators and ACPI should be done in a specific way if needed at all. > If you were to say that we could bodge around that by somehow forcing > this binding to exist only for swnodes when running on ACPI systems then > we'd still have the problems with creating something with worse tooling > than what's there already. Of course, no objections to this. > Like I said in the other mail fwnode is a nice hack for systems that are > using ACPI but have hardware that's doing something totally outside the > ACPI model to allow them to reuse work that's been done for DT, it's not > a universal solution to the lack of appropriate support for describing > modern systems in ACPI. In some (I suppose rear) cases it may be used by DT-enabled platforms as well. I can imagine the case when you have a system in ROM and only what you can do to change DTB there is either use DT overlays (which seems to be not working, plenty of gaps there according to a Wiki I saw once) or do something in the board files. So, if you replace "ACPI" with the "firmware resource provider" in the above paragraph, I will agree 100% with you. -- With Best Regards, Andy Shevchenko