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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DEDFCCA482 for ; Sun, 5 Jun 2022 03:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347815AbiFEDlm (ORCPT ); Sat, 4 Jun 2022 23:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347641AbiFEDlk (ORCPT ); Sat, 4 Jun 2022 23:41:40 -0400 Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 243D04EDD0 for ; Sat, 4 Jun 2022 20:41:39 -0700 (PDT) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-2ff7b90e635so115703837b3.5 for ; Sat, 04 Jun 2022 20:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8D/HSJdgvaLuLG5xNuCfkPKEmuWt/pvFegiJ6KrnY3I=; b=mKSUfps2jQlGQKb0Pj23vVrDLYVfTCLfU2eGOHO0w5RekTl50sZCBIWYc422QqsHPk /XxL89nyYHDRl97kUmDpzp8WH5h11lP4O0uUOKfMu2TnxilV4Z3H1a8ixh/gPQip4l40 wv9fe46cZQak2RrkCbgmMKFh6esgjYM7h7RAsIe8vxQcm5WHJgj462Nkln6ihNULbmh5 yKfql9QWwKpLtxGT6bBf9EVswVowh7YRTqi2uL7N1OXTRp8+5RQKQQC4NnLd+bozSnNH FjM1/Y2XwKhaUsQuFhdiKo8uc4DelbeZzUjCAGel2Nl/dlbPYYEsMvzYu7ek9W7Wbjzm hm/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8D/HSJdgvaLuLG5xNuCfkPKEmuWt/pvFegiJ6KrnY3I=; b=Si/RaYZc/r6kMdAYRBNHuKYpLSs3djXNKbNIgI8nERujAejok5PIoOL8jWP9+muxPl 54Z908RxsSMRJz+gVZAnI162tydSk6/+IHgyRaKK3AgA3JHpCSpgHSFCFStJkx+cBC/+ 6rq7qoMsSY2E1wV2npi8Q4xBxvpdYbAboLziDgJ/waTtrxtJZseHpL6Lslb6R65o9VqB xUMwIVZjW7xY6FAr9KUE/QqcXQVlvac/RoOIEjThp1c+7R3Vzwa1APfDrgDHmPQIj0Xa CcNlD5CrbKu/cZfyNib922CTiFePP7fFooiP6ezmFjTncTjaTSJ2E3J/i4Kz+N63FrTC DWLQ== X-Gm-Message-State: AOAM531hTHuUn5eB0Qc372/AHeC+JXm4x1xDNBQ6t1EIWUdt8xk3sc4b A4sXj9mmsQcIto8VkduEy91B8SrG9V+FXLJ8JfXI5Q== X-Google-Smtp-Source: ABdhPJw562eb7reVPGNJbod3DV69zufo9T9SJHMXkVI4U3mBg/CR3ExMEoEaOQg+VaLP57X91Nj9UD9yZKT138G+/JQ= X-Received: by 2002:a81:1a4c:0:b0:30c:8363:e170 with SMTP id a73-20020a811a4c000000b0030c8363e170mr18860130ywa.455.1654400497941; Sat, 04 Jun 2022 20:41:37 -0700 (PDT) MIME-Version: 1.0 References: <20220526081550.1089805-1-saravanak@google.com> <20220526081550.1089805-3-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Sat, 4 Jun 2022 20:41:01 -0700 Message-ID: Subject: Re: [RFC PATCH v1 2/9] pinctrl: devicetree: Delete usage of driver_deferred_probe_check_state() To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Len Brown , Pavel Machek , Joerg Roedel , Will Deacon , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Linus Walleij , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Hideaki YOSHIFUJI , David Ahern , Mark Brown , Rob Herring , Yoshihiro Shimoda , John Stultz , Nathan Chancellor , Sebastian Andrzej Siewior , Android Kernel Team , Linux Kernel Mailing List , Linux PM list , Linux IOMMU , netdev , "open list:GPIO SUBSYSTEM" , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, May 30, 2022 at 2:22 AM Geert Uytterhoeven wrote: > > Hi Saravana, > > Thanks for your patch! > > On Thu, May 26, 2022 at 10:16 AM Saravana Kannan wrote: > > Now that fw_devlink=on by default and fw_devlink supports > > "pinctrl-[0-8]" property, the execution will never get to the point > > 0-9? > > oh, it's really 0-8: > > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl0, "pinctrl-0", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl1, "pinctrl-1", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl2, "pinctrl-2", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl3, "pinctrl-3", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl4, "pinctrl-4", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL) > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL) > > Looks fragile, especially since we now have: > > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi: > pinctrl-9 = <&i2cmux_9>; > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi: pinctrl-10 > = <&i2cmux_10>; > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi: pinctrl-11 > = <&i2cmux_11>; > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi: pinctrl-12 > = <&i2cmux_pins_i>; Checking for pinctrl-* and then verifying if * matches %d would be more complicated and probably more expensive compared to listing pinctrl-[0-8]. Especially because more than 50% of pinctrl-* properties in DT files are NOT pinctrl-%d. So back when we merged this, Rob and I agreed [0-8] was good enough for now and we can add more if we needed to. Also, when I checked back then, all the pinctrl-5+ properties ended up pointing to the same suppliers as the lower numbered ones. So it didn't make a difference. Ok, I just checked linux-next all the pinctrl-9+ instances and it's still true that they all point to the same supplier pointed to by pinctrl-[0-8]. So yeah, it looks fragile, but is not broken and it's more efficient than looking for pinctrl-%d or adding more pinctrl-xx entries. So, let's fix it if it actually breaks? Not going to oppose a patch if anyone wants to make it more complete. -Saravana > > > where driver_deferred_probe_check_state() is called before the supplier > > has probed successfully or before deferred probe timeout has expired. > > > > So, delete the call and replace it with -ENODEV. > > > > Signed-off-by: Saravana Kannan > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds