All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Linus Walleij" <linusw@kernel.org>,
	"Alex Elder" <elder@riscstar.com>,
	"Bartosz Golaszewski" <brgl@kernel.org>
Cc: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Sashiko" <sashiko-bot@kernel.org>
Subject: Re: [PATCH v3 2/2] gpio: regmap: Don't set a fixed direction line
Date: Tue, 12 May 2026 09:00:18 +0200	[thread overview]
Message-ID: <DIGI632TIZUG.2PJQLJWL90TYD@kernel.org> (raw)
In-Reply-To: <20260511-regmap-gpio-sparse-fixed-dir-v3-2-1429ec453be7@kernel.org>

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

On Mon May 11, 2026 at 9:43 PM CEST, Linus Walleij wrote:
> If a GPIO line has a fixed direction, report an error
> is a consumer anyway tries to set the direction to
> something other than what it is hardcoded to.
>
> This didn't happen much before because what we supported was
> all lines input or output and then the implementer would
> probably not specify the direction registers, but with
> sparse fixed direction we can have a mixture so let's take
> this into account.
>
> As a consequence, since gpio_regmap_set_direction() can
> now fail, alter the semantics in
> gpio_regmap_direction_output() such that we first check
> if we can set the direction to output before we set the
> value and the direction.
>
> Suggested-by: Sashiko <sashiko-bot@kernel.org>
> Link: https://sashiko.dev/#/patchset/20260507-regmap-gpio-sparse-fixed-dir-v1-1-a2e5855e2701%40kernel.org
> Signed-off-by: Linus Walleij <linusw@kernel.org>

Reviewed-by: Michael Walle <mwalle@kernel.org>

-michael

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

  parent reply	other threads:[~2026-05-12  7:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 19:43 [PATCH v3 0/2] Support sparse unidirectional GPIO lines Linus Walleij
2026-05-11 19:43 ` [PATCH v3 1/2] gpio: regmap: Support sparsed fixed direction Linus Walleij
2026-05-11 21:06   ` Alex Elder
2026-05-12  6:55   ` Michael Walle
2026-05-11 19:43 ` [PATCH v3 2/2] gpio: regmap: Don't set a fixed direction line Linus Walleij
2026-05-11 21:06   ` Alex Elder
2026-05-11 21:45     ` Linus Walleij
2026-05-12  9:55       ` Bartosz Golaszewski
2026-05-12  7:00   ` Michael Walle [this message]
2026-05-12  9:54 ` [PATCH v3 0/2] Support sparse unidirectional GPIO lines 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=DIGI632TIZUG.2PJQLJWL90TYD@kernel.org \
    --to=mwalle@kernel.org \
    --cc=brgl@kernel.org \
    --cc=elder@riscstar.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashiko-bot@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.