From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2B34C07E95 for ; Tue, 13 Jul 2021 15:56:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF0E9610A7 for ; Tue, 13 Jul 2021 15:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237121AbhGMP73 (ORCPT ); Tue, 13 Jul 2021 11:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237091AbhGMP72 (ORCPT ); Tue, 13 Jul 2021 11:59:28 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D90CAC0613DD; Tue, 13 Jul 2021 08:56:38 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id w15so21980272pgk.13; Tue, 13 Jul 2021 08:56:38 -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=FkUgRBuDDTuqSHeo8ZDHf6GNDnL7WlSVrrAS8awCmls=; b=gf0iGBX6WEkKHEx5ckstlflxSmHtZ5pqmRY2XWAPU0zIsNdXL3qkkkomZqAb8Txu5G MR5MfE1LLk0UAPdLcRvhcmco4g3ZyHdjWgqS3aVG/dAA2bgKvzMnNzcUtmgNkE3q/qDQ 1HyDEtxtPN7gPn8ri156mEAh49yZS4WVs0Ojbd77+fMU/r9NXqcNcaJET5WmKMatqEBk A9wqKP5P2Z0EULu71ssrDsMf41XDTSBpL5lRtA1GuAuAX5OoOUbGdJh+eSwRIEyCikZV G0/12w8OUyKayhpFW7cU/nu8LBdZQA3H6hy3LcSV6z6ubYQ4GcS3dJbjKCiKqMxq9YSA h+fQ== 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=FkUgRBuDDTuqSHeo8ZDHf6GNDnL7WlSVrrAS8awCmls=; b=rtPH4ilMXpiebx7D/lzvPYoFlNzelOMzy+g/IltssfRxtfV9/G8/N7ZnjcwYZyfTKy v4AEn86gzLmOW/cCAMzIq2IVHrspVTyDqDaZRHtlqZBm1QrX4RBpXqAEVmKrLYA3DmTb TJS8KrhAHroHk1YrdjORuXMr47LMsBCG44ppT7Rl1SZ4jkwPqxxls5SUsuxzK+Fcz2q2 BjAWVmQnLVkjCIleIYGAKpbJYphrMP1yfzf8emXPhbIrjhW9RWclMBOpOB0KRAHE42Vz sxmXur0LOKJ12mK1bHnbSykKhP8WGG/rCxr+JZ5BYlwt7FUlu4ulSCHT0qsJmY3CtHM4 mxoA== X-Gm-Message-State: AOAM532rCpB9LG78jkkZmYZ7agP9PBxLS3SAGCD+KollE9i13hEEy/6P rR5WLfsSo5bgLacPnGrPaZXoLGpgxw7AvDXZQkw= X-Google-Smtp-Source: ABdhPJxan9EflnhwmIouyYlhigesmxK4vLk5tZ2D7f8d76++4SNktmkv0Rk1kAGD/vXHsqATGr0E+TfD6rTthFEEtjU= X-Received: by 2002:a63:d014:: with SMTP id z20mr4898653pgf.203.1626191798398; Tue, 13 Jul 2021 08:56:38 -0700 (PDT) MIME-Version: 1.0 References: <20210708224226.457224-1-djrscally@gmail.com> <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> In-Reply-To: <20210713152454.GC4098@sirena.org.uk> From: Andy Shevchenko Date: Tue, 13 Jul 2021 18:55:59 +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: platform-driver-x86@vger.kernel.org On Tue, Jul 13, 2021 at 6:25 PM Mark Brown wrote: > On Tue, Jul 13, 2021 at 12:32:26AM +0100, Daniel Scally wrote: > > I do think it can simplify driver code too; a lot of them aren't written > > to parse platform data to get the init data, as they're just relying on > > reading it from devicetree so in the event that we get more cases like > > this, we need to modify those drivers to look for platform data too. On > > the other hand, even the drivers that don't directly call > > of_get_regulator_init_data() still do that lookup during the > > regulator_of_get_init_data() call in regulator_register(), so the ones > > that do parse platform data for init_data structs will check DT as part > > of regulator_register() anyway. Imitating that seems simpler to me. > > 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? Converting code from OF to fwnode APIs in most cases is smooth and doesn't add any overhead to the codebase, -- With Best Regards, Andy Shevchenko