Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2024944rdb; Tue, 3 Oct 2023 08:09:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEeftnHvfVd0yaK19ITVQbSIcKMX4RNAGBWmF1SMQTqo2wtkr9V3mvl3+iS7S7wy0oxznCn X-Received: by 2002:a05:6a00:2d87:b0:68f:ca4a:efd with SMTP id fb7-20020a056a002d8700b0068fca4a0efdmr14081139pfb.9.1696345751322; Tue, 03 Oct 2023 08:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696345751; cv=none; d=google.com; s=arc-20160816; b=ymp1UiooPsESBUl0ZFbxLczp05a01QdmV9RdccIfnuvFdWVlDiKb9bszdDbzTAfueQ O23BhyzK8gmX2xU/qxvpp7jqf6BR2OqTETjOCfw8bb3JEmRPVBJBpC0lYL0Cfpoz/20i le5TkL+qThkT8VPw7V4cIq/HLi19Hur1bNeQLeb/fMEi02MGp5iRfZMs+Wl/H86L/Xju 5TLB3wOYJJVyNwBi1iIgE5Rjd4bQV3zdWWA/1Bj2PKF3a4jAMNRrzhB9us5L5yE35bjC q0aV3KkvwpsqbVMqWh8KG58pOSqo5S1XQsXcdFJNCWyeGvcg3aHW6KAKJ6Wg9vKNTNP2 Va8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=s8z9u1jazZxUkm/2qxN8EBAJw5LUMMLBIMP/RABmSXQ=; fh=YzFeta9wbBtFdHfbuNysZnSe7+crMJ4Xa6Ln/x8p/7A=; b=KGcdExI6UQCRvM/TrXx0zf5RT9QILMnT3OyFBzkUFt4kcj7Bh81mClkTecjD9aXtJ0 nZgz5Ke2bH+/mJpIQzIarY/xJ3lGW0NAFElYABYgZw/WqMWv9dOXcDnBS6ypz+L6Vk48 fP+JtsnFsE9WXxIE8kGHuFvt1Pk5JoV779eZ96UoWP8/yL9+lXApXvdyuEbgxDMlgvRK fse9GCgG3/YKUP3mxQPdieS2pSnnrNE0w61LZFMCjSOoxYXGcClUGsfS36Il+e5dFepM XBO10ilDfTRTFVSc3TJsLYLkc8fbL7+1ULmEJFGOQUO2FUQkU3F4kJbI61VLqwJ9Vuc8 6YKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AYaiOOQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x5-20020a654145000000b0056b4065299esi1572896pgp.621.2023.10.03.08.09.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 08:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AYaiOOQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 435848164694; Tue, 3 Oct 2023 08:09:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235536AbjJCPIz (ORCPT + 99 others); Tue, 3 Oct 2023 11:08:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjJCPIy (ORCPT ); Tue, 3 Oct 2023 11:08:54 -0400 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F35B7A7; Tue, 3 Oct 2023 08:08:51 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3af608eb34bso590306b6e.1; Tue, 03 Oct 2023 08:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696345731; x=1696950531; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=s8z9u1jazZxUkm/2qxN8EBAJw5LUMMLBIMP/RABmSXQ=; b=AYaiOOQ2r5bkQh3vjr7U1UslHnG7ZY5NCJkRLI9rlK6f9kjS8ib4ZKRGigV0THvfiR aKNC/srzCNqx36i0sDDpVCTSlLnEIjJkyIpCmiuqU4uBhxgVsbiNTmp9U4WR2f9f1c9I jWcmE92dOyLe/ZOgM3qHKpeoAujOyIDqajfbeCYeMqnaw3B0k1NGlb1HHmT3hhZedjX8 kT8bj1sCRS35rs3a671Vxmaiis32DQAxUUzBON9serkOd6wQdAWEkszFM4Js6ab2gSXK x4XKYqNS/G5+whkX6Viw577DWJ4r6E//RatS47XKt5mVCOsG7R+GvquZZ3m2RMH1WGNE PPkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696345731; x=1696950531; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s8z9u1jazZxUkm/2qxN8EBAJw5LUMMLBIMP/RABmSXQ=; b=qtcgZRz75BewlEp7/iLR8DcHwezIXFIIDHUDMdMtnLSqrrx7L8ZvNeSJLj6VT/Eu3Y 6OqgAxYBe4Fx3zXAzwJ/9fXFhd5xL0axqPsksoUjTPYAMxrrXDdPpVUAO+Mn07OJvWp3 hDnw9LdV52UyeeyiUgZGLKbB9aVRuzYiV3qNPFWmWkcbEj3twTyEkLFYsmYwh9F30KnQ vjNg0gh+1er8o5C7HgWeHXmtQ7T0XhwleO2dr1jxXFquu7GG5L1vaKAC7Wdf6On2RiOK 0i3x/5JzDEwROHt8kG1pO3oHY4gCtKtUUVfIxxVfKKwsO42a5IC7iHp9x5yvvmfxnCJ+ 5aDA== X-Gm-Message-State: AOJu0YzN7AEysVKlnKqQf5WMEqR/ip4upIA1yOXDxHgAuDiWIrlz1cCS bj8QKaCRNtaC6DiwAvAkx76x6g4MVouMoUXkndKgh4CeOL6qiA== X-Received: by 2002:a05:6808:92:b0:3a8:5fd6:f4cf with SMTP id s18-20020a056808009200b003a85fd6f4cfmr15122566oic.22.1696345731263; Tue, 03 Oct 2023 08:08:51 -0700 (PDT) MIME-Version: 1.0 References: <20231003145114.21637-1-brgl@bgdev.pl> <20231003145114.21637-3-brgl@bgdev.pl> In-Reply-To: <20231003145114.21637-3-brgl@bgdev.pl> From: Andy Shevchenko Date: Tue, 3 Oct 2023 18:08:15 +0300 Message-ID: Subject: Re: [PATCH 02/36] pinctrl: provide new GPIO-to-pinctrl glue helpers To: Bartosz Golaszewski Cc: Linus Walleij , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 08:09:08 -0700 (PDT) On Tue, Oct 3, 2023 at 5:51=E2=80=AFPM Bartosz Golaszewski = wrote: > > From: Bartosz Golaszewski > > Currently the pinctrl GPIO helpers all take a number from the global > GPIO numberspace - of which we're trying to get rid of as argument. > > These helpers are almost universally called from GPIOLIB driver > callbacks which take a pointer to the backing gpio_chip and the > controller-relative offset as arguments. > > Let's provide improved variants of these functions that match the > GPIOLIB signatures as the first step in removing the older flavor. ... > +#include + blank line here > #include > #include > #include ... > EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); > +/* This function is deprecated and will be removed. Don't use. */ Shouldn't the same / similar comment be added to pinctrl_gpio_can_use_line() above? ... > + * pinctrl_gpio_request_new() - request a single pin to be used as GPIO "new" is too broad and too odd suffix, what I would see as a better alternative(s) is (are): pinctrl_gpiochip_request() pinctrl_gpio_chip_request() pinctrl_gc_request() (sorted by personal preference from high to low). The similar comment to all of them. ... > * This function should *ONLY* be used from gpiolib-based GPIO drivers, > - * as part of their gpio_free() semantics, platforms and individual driv= ers > - * shall *NOT* request GPIO pins to be muxed out. > + * as part of their gpio_request() semantics, platforms and individual d= rivers > + * shall *NOT* request GPIO pins to be muxed in. Hmm... This looks like a fix to the previous code that can even be backport= ed. > */ --=20 With Best Regards, Andy Shevchenko