Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2359100rwd; Fri, 26 May 2023 05:42:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dDGjhoLvk2v7yvh7aVOnCyMVMCWXmkMMbRGOfIIXvOz7xvJNeuf5yRvUpZJEllfYIzuqc X-Received: by 2002:a05:6a20:12c6:b0:10b:97c8:2e12 with SMTP id v6-20020a056a2012c600b0010b97c82e12mr2209093pzg.60.1685104940995; Fri, 26 May 2023 05:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685104940; cv=none; d=google.com; s=arc-20160816; b=mQ18rkSBuUS5tG0JSfIcU6WzpWZxU93jnDtqUeu1RBU6fYT4BOl1auPwYc59kuU2Sp eHz+S5Bv96My651khfTyFoWaKnPVnDWTJCcUPwe1yVq55DT7tNdP42oeL5aB6ohF+PvT JSf66r6e9oDj5ZqJxgjPKxhoSAvGSU8KqOpx0WRWOqrPc5+KOxQAryCCY3RU3Yq4HBJ9 nYbdrTgKRkTkiuOL31LJICB7CR2NNrZByTBbI62MwIOoWoQHb/8mmI2zGa+ksc3HdpRX fcWhQoR4uIrwIQNcoqm8WuKMemrhuwbLtbjYMZ/7+kM9NpOxB1TxB9JibOcJtRCctSwE UUHA== 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=qs34JzNiVRl4b2e/FfxvYd1zSDbIvD7rTBt6yG8u7ZQ=; b=U/R7iRnXpueOGBI3ioDq/P0KRoPiNKmruHPBlVIoiJZd563YWr4eP7VjKGKE17fMYc FGBTCzLZuYBPEXQBeh/rF91Me4FMCCfEvX1EqFn64EN5K9CIJIDsCWSG50OOSk+TK1zn pNcfY788kTVoHLciaE0EFivlz8ML4GQOuB1ohErh6op+E2zlMJVxcC2+Kn+fZAAFRkJ+ XzbZQrho9sRmYGvIQOyJA/U0nY5ql2xFLgAIr2xItLVKWrY4yFKnXbnHi283aqcRcEPH uyAvO/HQB2I32n3gWPt2ue4hEIMQ21hcCwLkQJjXohwXKIp+9it5dSOHogkbpR/1EkzC RzuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=D1uQXQWf; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p23-20020a639517000000b00530740b4bcbsi3415296pgd.342.2023.05.26.05.42.06; Fri, 26 May 2023 05:42:20 -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=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=D1uQXQWf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243501AbjEZMaG (ORCPT + 99 others); Fri, 26 May 2023 08:30:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243570AbjEZM3u (ORCPT ); Fri, 26 May 2023 08:29:50 -0400 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25404E6C for ; Fri, 26 May 2023 05:29:29 -0700 (PDT) Received: by mail-vs1-xe31.google.com with SMTP id ada2fe7eead31-4393c1b8d1cso162548137.0 for ; Fri, 26 May 2023 05:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1685104168; x=1687696168; 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=qs34JzNiVRl4b2e/FfxvYd1zSDbIvD7rTBt6yG8u7ZQ=; b=D1uQXQWfbis8V/HHd+efA4wAeLIvY5uO+GGez7KOL8eDaYp0T8yU/iORvAMJz+bg51 yDIhzb1MXXU3BNFWLSAX5a1qnBhfbecDUamjfP76Q3Sc213VTBs23JGsQZU7uQbHTO2f hkVqMWjWe9noohA7TMTCo3xGbm0ZkJ89OLGin9QtS2DMMj+0LOIkfo5+4NbCVIHrSvZd IJFsTRlcccKFmRD3f2bLl9OjVMU9UG93kZIPX/U1vAhgdMwHMZEcZzHOU7YXK+fnBDUl jxp4zbbvwe64F55RfAAeiFSM8nK7zei00gMzx0WmN4fQLRXSEEZ1cQmYqwgll/Q2nJm8 E5iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685104168; x=1687696168; 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=qs34JzNiVRl4b2e/FfxvYd1zSDbIvD7rTBt6yG8u7ZQ=; b=KlRlL9IukhdV+0de/vUH6D9PSoFJ0zyihl8KCT7Ri/+LI3eRlQzsjriNC4bmVWp8jT 5kPBWS3URzF2XOyOZ8SVTh4p1TKT4T0QIy9y+eEJeK1M63YeXl38jfsHVX9cUro/xOoa IE7sqfBOdSeY77PcdedcYTpU8+Q9pjncUp3E4GQEpauFW3a5f8mRtlP/LfHNTAWLtOPv Wwt50xkbDq46JmE9FROu6D8AxOeq8ngx5VVCGi1Eebate9vnxjWRozo+bchgxQN8sdFK QPGTQDnkCKDCluKf4tta5AvADq61aexmGFHC/o5LRV5bYE84spaclh7Zhj3Uf5FK0DEk ncgw== X-Gm-Message-State: AC+VfDyI0mLgsf7LvuJqLybKA8xILVFwl9B0Ix2BDLSR8xxmfq6igu5+ pfjjw5ZH39J46bq07qXZpzIzCVTZJvqFF3/TyTWj8g== X-Received: by 2002:a05:6102:c5:b0:437:e137:3346 with SMTP id u5-20020a05610200c500b00437e1373346mr390286vsp.14.1685104168771; Fri, 26 May 2023 05:29:28 -0700 (PDT) MIME-Version: 1.0 References: <20230524105021.9418-1-pshete@nvidia.com> In-Reply-To: <20230524105021.9418-1-pshete@nvidia.com> From: Bartosz Golaszewski Date: Fri, 26 May 2023 14:29:17 +0200 Message-ID: Subject: Re: [PATCH v4] gpio: tegra186: Check GPIO pin permission before access. To: Prathamesh Shete Cc: linus.walleij@linaro.org, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, smangipudi@nvidia.com, Manish Bhardwaj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 24, 2023 at 12:50=E2=80=AFPM Prathamesh Shete wrote: > > This change checks if we have the necessary permission to > access the GPIO. For devices that have support for virtualisation > we need to check both the TEGRA186_GPIO_VM_REG and the > TEGRA186_GPIO_SCR_REG registers. For device that do not have > virtualisation support for GPIOs we only need to check the > TEGRA186_GPIO_SCR_REG register. > > Signed-off-by: Manish Bhardwaj > Signed-off-by: Prathamesh Shete > Acked-by: Thierry Reding > Reviewed-by: Linus Walleij > Acked-by: Jon Hunter > --- Applied, thanks! Bart