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 9DD56C4338F for ; Sun, 25 Jul 2021 20:33:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80F7960EB4 for ; Sun, 25 Jul 2021 20:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbhGYTxT (ORCPT ); Sun, 25 Jul 2021 15:53:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbhGYTxT (ORCPT ); Sun, 25 Jul 2021 15:53:19 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25640C061757 for ; Sun, 25 Jul 2021 13:33:49 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id e14so9222389plh.8 for ; Sun, 25 Jul 2021 13:33:49 -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=okugLEzlTny+fzrF2Q1ytbwzo6iSoRoq0kbMzA1eNts=; b=An4ymJBEXfKS/Pft32azhmP7KpqnLdx4GWQmew2ex1OMsa61A31/R98Kgi+Ak3HTDQ TWqc3ounA4whs7NKJePj64C1Y396A94qOLIUfuicdsJ/7J9ZgQcGpChF1uueiL2mDBFR u3DWRcwpeWQ/Y86eSMPxDv8GBE4KcsBC8BywfPHYGULYAxdYwP3nMGbtQSvslCyj784x KdFkqAgS26tnCqjU9bsCT3Rn63yNgJGsSOk5CCE/OlS+p/obNMwafGvFSxBo1RCgXt01 BQnK2WyfRNxwr79D4tx/a5YRh/r0BWXdnx8nRBpQ5wURAynvzLJ682AVRHo8UpRYa67/ +L2w== 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=okugLEzlTny+fzrF2Q1ytbwzo6iSoRoq0kbMzA1eNts=; b=DF9VpzAgVRk3c+Aa3OWwLv0pdi/4TW+c2tn8+C0BxXdKbI9UjW313eo8IcaGQDDcMo f6g/BZAHgPt0ugBPiF7Z0i3F13J0VrdeEVZ0p1HVYY0s5O1UT1mi3ZnJ+ObsBqA8nfwq 8cKQOak2fkIt4sRTAGrzzW6RaeGjpZMixho+nxtaq1OAGcrneUITvzNWok7Pf26hwh3V z5nlAHkoqJqv54aC8LpLgDNpcgiSSICvSmYEgPlJlqyhJo9cd4T4eht4b+go3VSSOQIR p84EhHgt9CMHZEHTv2FOQopQFlUjQ0djR/Y8dIZj352s5jO1hrl/NXxl8rDH3VhxKFt8 Bmhg== X-Gm-Message-State: AOAM530pg/ie4CiAoZW85R1SA1CKTyDgB1fSIeIsTa339VVt26w1zQZv b5NsfCqlwZXmkaDa/Ub1inUMiE7SwcUjvsOM1T0= X-Google-Smtp-Source: ABdhPJzYHTQttZutVxtX3A2Bgu4c32yVDm3ICGY99R5yGpkpRdxHucBc1VxNkjtBlMQbcSWuA+Q5BSIXam07Tk3gygI= X-Received: by 2002:a63:cf0a:: with SMTP id j10mr15242577pgg.4.1627245228719; Sun, 25 Jul 2021 13:33:48 -0700 (PDT) MIME-Version: 1.0 References: <20210725172458.487343-1-jic23@kernel.org> <20210725172458.487343-3-jic23@kernel.org> In-Reply-To: <20210725172458.487343-3-jic23@kernel.org> From: Andy Shevchenko Date: Sun, 25 Jul 2021 23:33:12 +0300 Message-ID: Subject: Re: [PATCH 2/2] iio:adc:ad7124: Convert to fwnode handling of child node parsing. To: Jonathan Cameron Cc: linux-iio , Lars-Peter Clausen , Michael Hennerich , Alexandru Tachici , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sun, Jul 25, 2021 at 8:22 PM Jonathan Cameron wrote: > > From: Jonathan Cameron > > Also use device_get_match_data() rather than of specific variant. > These changes enable use of this binding on ACPI platforms via PRP0001. > Whilst it's possible no one will ever do so, this is part of a general > effort to clear out examples from IIO that might be copied into new > drivers. > > It may appear that this change drops the check for status = disabled, > but in reality it does not because the of property code uses > of_get_next_available_child(). This driver may well fail to probe > if disabled is ever actually set though due to the need for > complete concurrent child nodes. A future series might resolve > that restriction. Perhaps we need to have ... > + device_for_each_child_node(dev, child) > + st->num_channels++; > + device_get_child_node_count() ? ... > - for_each_available_child_of_node(np, child) { > + device_for_each_child_node(dev, child) { Isn't this fwnode_for_each_available_child_node() better to use? ... So the gaps I see are device_get_available_child_node_count() and device_for_each_available_child_node() Both of them I think are easy to add and avoid possible breakage. -- With Best Regards, Andy Shevchenko