linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thierry Reding" <thierry.reding@gmail.com>
To: "Prathamesh Shete" <pshete@nvidia.com>,
	<linus.walleij@linaro.org>, <brgl@bgdev.pl>,
	<jonathanh@nvidia.com>, <treding@nvidia.com>,
	<linux-gpio@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <mochs@nvidia.com>, <csoto@nvidia.com>, <jamien@nvidia.com>,
	<smangipudi@nvidia.com>
Subject: Re: [PATCH] gpio: tegra186: Fix tegra186_gpio_is_accessible() check
Date: Fri, 19 Apr 2024 13:40:33 +0200	[thread overview]
Message-ID: <D0O2KG09X87O.1UR0G6BXCEJ5E@gmail.com> (raw)
In-Reply-To: <20240416123501.12916-1-pshete@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 1158 bytes --]

On Tue Apr 16, 2024 at 2:35 PM CEST, Prathamesh Shete wrote:
> The controller has several register bits describing access control
> information for a given GPIO pin. When SCR_SEC_[R|W]EN is unset, it
> means we have full read/write access to all the registers for given GPIO
> pin. When SCR_SEC[R|W]EN is set, it means we need to further check the
> accompanying SCR_SEC_G1[R|W] bit to determine read/write access to all
> the registers for given GPIO pin.
>
> This check was previously declaring that a GPIO pin was accessible
> only if either of the following conditions were met:
>
>   - SCR_SEC_REN + SCR_SEC_WEN both set
>
>     or
>
>   - SCR_SEC_REN + SCR_SEC_WEN both set and
>     SCR_SEC_G1R + SCR_SEC_G1W both set
>
> Update the check to properly handle cases where only one of
> SCR_SEC_REN or SCR_SEC_WEN is set.
>
> Fixes: b2b56a163230 ("gpio: tegra186: Check GPIO pin permission before access.")
> Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
> ---
>  drivers/gpio/gpio-tegra186.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-04-19 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 12:35 [PATCH] gpio: tegra186: Fix tegra186_gpio_is_accessible() check Prathamesh Shete
2024-04-19 11:40 ` Thierry Reding [this message]
2024-04-22 12:00 ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D0O2KG09X87O.1UR0G6BXCEJ5E@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=csoto@nvidia.com \
    --cc=jamien@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mochs@nvidia.com \
    --cc=pshete@nvidia.com \
    --cc=smangipudi@nvidia.com \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).