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: 13862 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3201715wru; Tue, 1 Nov 2022 13:54:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4sB3hKfpybZSqjiaddw5K77JqGqsBz0TedStCVkFkd7vUhkEkgKKoh0zXIDkqZ7Use81wT X-Received: by 2002:a17:90b:38c:b0:212:fe14:4ba0 with SMTP id ga12-20020a17090b038c00b00212fe144ba0mr39488733pjb.138.1667336080076; Tue, 01 Nov 2022 13:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667336080; cv=none; d=google.com; s=arc-20160816; b=aDawuIiPs70DjLAq/wB5L1/vSYGVv+STKT6T0SlgsVRBzVjy6r89/hKw4AVIHH6U+B fv5T3rL4BFDMZ5rE2YGZxTUL0r9HHHm7IGnB4VDc8y73jvKGw1dkQoYb35wdGFUrBxWo yTz3jkriw0+MYZG51hiqAwmqH0MVXvhzta0NV/d/r2hzZytdA4tjxZCDy8VuW/NQITL5 jqL+21xr6o8ClT0o+uo83C970WXdOdtIa5DOKq0dpobTwfVkh3Dtc+3CuG+/WKWZINs9 XsnuvSRANNFvvAg3SwzskiKcmNeEaW2fptSaJrU6+hOfN9aA3235uNUcz+BKF3lFK54v DyNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=FU4rKyhF5EOMlKF3LPjf/v+NqtgVh2q+3HeQZZdYZXc=; b=SfQLAyeZUdtLztI+i5PmjJUYYQHrQHid5/f0e3BOlLEFoQ6YNVusmTc01jMXRmgdGu yl60f44gwAC5jwC2RtSy+HeCbLNUpdeIHZuksapSTA/6LGneo6WuxtoANHzB9XMwT32e 0nMBZBn2TIxC8kCAmtaAuwlP9Asons8LnLgH8b1SHfU0qH94T/h3chnX4YfYRi+K/Qis 16EfeHwY3eyDFG7t3l6FRj4EMTuazcnRmErHsfOUy1RALSmXOtyKRixHjMkH6eixtg28 eCa/Rmn3Afp4ZF+flpcjYXVE2Z+00y/NOsDOMANLk1rmkG2Bbeoy/Sb4yz6lNYhF7pLC i3FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=h6DUCLW4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a170903244b00b001871fac7ddasi10561120pls.462.2022.11.01.13.54.26; Tue, 01 Nov 2022 13:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=h6DUCLW4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbiKAUw5 (ORCPT + 99 others); Tue, 1 Nov 2022 16:52:57 -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-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 X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, SUSPICIOUS_RECIPS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748328597757468337?= X-GMAIL-MSGID: =?utf-8?q?1748328597757468337?= 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) ...