From patchwork Tue Nov 1 20:51:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siarhei Volkau X-Patchwork-Id: 621182 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 4C1CDC433FE for ; Tue, 1 Nov 2022 20:52:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbiKAUwx (ORCPT ); Tue, 1 Nov 2022 16:52:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbiKAUwn (ORCPT ); Tue, 1 Nov 2022 16:52:43 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF36C1AD8C; Tue, 1 Nov 2022 13:52:42 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id v7so3762185wmn.0; Tue, 01 Nov 2022 13:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FU4rKyhF5EOMlKF3LPjf/v+NqtgVh2q+3HeQZZdYZXc=; b=h6DUCLW4bcvhWlk4H9dT+0bGh+SkyGHgGG/Dh1ItyNpuBj/WZVybdtxohiLFuSyT/M eqPmDf87aaotwQiATl58kQQ0axyTSZ8lqmSBAYlo9gFXIP0nC0fuw9Ou3Auj+iEkFWHF 3YfmE3LwoBDBbvhKRSQBP457Koa5pmCWk+Seo4CeFYMJ2y8Fnta03pZPH96D2WULO+XU XhJihb3kusaPqWidAMqnX5MiG3V9BUT0nUA/H+k5ryqa71XjdkEgLBqfDdZbLCIjI69n DUt8M04LHN+RExViivMmp8d/a21OgjYpk14/6q7kdylGEjC+hqG82V1qcjILelcEoQw2 4kcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FU4rKyhF5EOMlKF3LPjf/v+NqtgVh2q+3HeQZZdYZXc=; b=7M/1RiIzu6gLIyD2OjKbUilfPj1ph5PXoSnLmHSVlpUUzLmpb0vQTwbsX3zWSjT08y wfOMd5PKOyLsNu5FGN2JwxJkKtr38vm7DpTDEYJmVdYULctqgBd/ITtai2kdVWYK3syC H9Ib0rog0u8xmHaAB/pbx3rOEGGwr2fJ6xz0eO3ZgnIwlQA3P1NgPt76ZZQRgdkHO4s/ /N+f90wCgSIv3vgS7LNSvRsq5CNT+nBTyo3le3Z1xKC9oqHD9c5J0NsxBR/K703CkUlt dmiTVxMGD6AjkUMfkcnmqgTdCrjaAwitVdCWctzI+02H7QFwpB5CoLERcPvfE3/++gbK NEhg== X-Gm-Message-State: ACrzQf3tmG97V7lAy9KQhCCPrHqey9IdamaoegJWS92Ysuw/zbFpJi52 DFtMzn3CI1+AplPGotfI/vg4x7fGO3+sVw== X-Google-Smtp-Source: AMsMyM7dsLc7vy5CeFFe4S6XwXjY3CjXinJ+EYdS+XsP3csiL9UWC9DVxC1s33otPZJqOH8nYMcIXw== X-Received: by 2002:a05:600c:310b:b0:3cf:33c4:bc7 with SMTP id g11-20020a05600c310b00b003cf33c40bc7mr13185680wmo.25.1667335961270; Tue, 01 Nov 2022 13:52:41 -0700 (PDT) Received: from hp-power-15.localdomain (mm-167-8-212-37.vitebsk.dynamic.pppoe.byfly.by. [37.212.8.167]) by smtp.gmail.com with ESMTPSA id jb1-20020a05600c54e100b003c6b874a0dfsm11854413wmb.14.2022.11.01.13.52.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:52:40 -0700 (PDT) From: Siarhei Volkau Cc: Siarhei Volkau , Linus Walleij , Jonathan Corbet , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] docs/pinctrl: fix pinctrl_select_state examples Date: Tue, 1 Nov 2022 23:51:58 +0300 Message-Id: <20221101205159.1468069-2-lis8215@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221101205159.1468069-1-lis8215@gmail.com> References: <20221101205159.1468069-1-lis8215@gmail.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The function requires two arguments. Signed-off-by: Siarhei Volkau --- Documentation/driver-api/pin-control.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst index 71eefe5a0..19a41c68d 100644 --- a/Documentation/driver-api/pin-control.rst +++ b/Documentation/driver-api/pin-control.rst @@ -1238,7 +1238,7 @@ default state like this:: return PTR_ERR(foo->s); } - ret = pinctrl_select_state(foo->s); + ret = pinctrl_select_state(foo->p, foo->s); if (ret < 0) { /* FIXME: clean up "foo" here */ return ret; @@ -1411,14 +1411,14 @@ on the pins defined by group B:: foo_switch() { /* Enable on position A */ - ret = pinctrl_select_state(s1); + ret = pinctrl_select_state(p, s1); if (ret < 0) ... ... /* Enable on position B */ - ret = pinctrl_select_state(s2); + ret = pinctrl_select_state(p, s2); if (ret < 0) ... From patchwork Tue Nov 1 20:51:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siarhei Volkau X-Patchwork-Id: 620713 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 80C6BC43217 for ; Tue, 1 Nov 2022 20:52:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbiKAUwv (ORCPT ); Tue, 1 Nov 2022 16:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbiKAUwo (ORCPT ); Tue, 1 Nov 2022 16:52:44 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7C2418B34; Tue, 1 Nov 2022 13:52:43 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id n39-20020a05600c3ba700b003cf71011cddso1355801wms.1; Tue, 01 Nov 2022 13:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BcZrSM0NMDEUGkRu1zNxv5heHBVcDpwHzAaIVD3JgIk=; b=ZS3GLTdZqJ53CpP+xPle8E1+BSh/wmgbOKPfFiRRm6QVT3RHkrzF8Dtkz+nR+SsOQN IrVsiL7Aqf4FOb12Ne7xjiSN0NWtxGj3TaIP3MZktbdcA3XpB1qj3RQBq4SJjInTcGQK M7ZjT4qBlpNEUq693Uhx+uhhwek7ODLtM8N4OThyZJFF+slhZBi5xRt3N68EFk5P6pcI aPPDGMmNS4joo6fPiWOKW80ElZvZ59vqAJptJRy79sKhUGx+eB9mzwzucRG0UBU2Rs+d a4lEg6LZcC7PXVGki45XLylwsoNjsUltJ2D8eFx1KnNneakddUWdNcU1O1CUN/hLtao3 vzug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BcZrSM0NMDEUGkRu1zNxv5heHBVcDpwHzAaIVD3JgIk=; b=YdpQCyRF6X1OhL1fKc27cxfBk4CGgiKSp97NsBXa258r9Sm9CrY8klRYhZZeqBpwBn bCyOGn2//QKZgK+96OxbUz/ClMYK8+jFXSVAsmkFHzP/3WzJCYJL40wITeOUdqHBCdO9 T3EIMVT43qNT68aJLQGUW04HSwTA7icCzD6L50LMqdQCRJ7shBaUjxJv/tIl2MDyu0Do uYTim9bLuLQiu5jaTvnwIbdmnqHF462AA3KeqBEATaycCi40HZP0od5qJsvEJDZR+08G DdzmeSJMuawluDzXZGiWpVZTtRj2RQSGzC8dq3EbAgFIlSBI8WvdLfaVMYNNrLlTFT1T MaGA== X-Gm-Message-State: ACrzQf14bPTbcV+eetzIiJYvYdOiA9v4X2eghqo/blQqB+uydTt0OWEB gKevTd4qDDT2fpuTUX/nlcY= X-Google-Smtp-Source: AMsMyM6gk8mDOEiGyHIxhwlExnrHZFmtZtZ7p7Q4ccWgyzAeOaB/W8T7TR4QdHIbV5SfLLliCpzPsQ== X-Received: by 2002:a05:600c:4d08:b0:3cf:674a:d3c2 with SMTP id u8-20020a05600c4d0800b003cf674ad3c2mr12728240wmp.157.1667335962502; Tue, 01 Nov 2022 13:52:42 -0700 (PDT) Received: from hp-power-15.localdomain (mm-167-8-212-37.vitebsk.dynamic.pppoe.byfly.by. [37.212.8.167]) by smtp.gmail.com with ESMTPSA id jb1-20020a05600c54e100b003c6b874a0dfsm11854413wmb.14.2022.11.01.13.52.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:52:42 -0700 (PDT) From: Siarhei Volkau Cc: Siarhei Volkau , Linus Walleij , Jonathan Corbet , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] docs/pinctrl: fix runtime pinmuxing example Date: Tue, 1 Nov 2022 23:51:59 +0300 Message-Id: <20221101205159.1468069-3-lis8215@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221101205159.1468069-1-lis8215@gmail.com> References: <20221101205159.1468069-1-lis8215@gmail.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The example declares "struct pinctrl *p" but refers to "foo->p" which isn't declared in the context of the example. Signed-off-by: Siarhei Volkau --- Documentation/driver-api/pin-control.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst index 19a41c68d..0022e930e 100644 --- a/Documentation/driver-api/pin-control.rst +++ b/Documentation/driver-api/pin-control.rst @@ -1399,11 +1399,11 @@ on the pins defined by group B:: if (IS_ERR(p)) ... - s1 = pinctrl_lookup_state(foo->p, "pos-A"); + s1 = pinctrl_lookup_state(p, "pos-A"); if (IS_ERR(s1)) ... - s2 = pinctrl_lookup_state(foo->p, "pos-B"); + s2 = pinctrl_lookup_state(p, "pos-B"); if (IS_ERR(s2)) ... }