mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <jmaselbas@kalray.eu>
To: Sascha Hauer <sha@pengutronix.de>
Cc: Marco Felsch <m.felsch@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH] gpiolib: fix gpio-hog functionality
Date: Thu, 1 Jun 2023 18:09:32 +0200	[thread overview]
Message-ID: <ZHjCvPyB21Y2AWw+@tellis.lin.mbt.kalray.eu> (raw)
In-Reply-To: <20230601143209.GN18491@pengutronix.de>

On Thu, Jun 01, 2023 at 04:32:09PM +0200, Sascha Hauer wrote:
> On Thu, Jun 01, 2023 at 04:25:06PM +0200, Marco Felsch wrote:
> > This reverts commit 3641d381e63321016e3bf09504852a6b2a2f879b.
> > 
> > Since the of_xlate support the gpio-hog support is broken because the
> > 'gpio' property used to specify the gpio-hog pin does not contain any
> > phandle. Due to the fact that of_xlate was never implemented the easiest
> > way to fix the gpio-hog functionality is to revert the commit.
> 
> 3641d381e63321016e3bf09504852a6b2a2f879b was introduced for sunxi. As
> Jules is currently working on sunxi support this is likely needed soon,
> so what's the second easiest way?
I am not very familiar with the gpio-hog concept, what I understand is:

"gpio-hog" are a description of gpios config to be initialized early on.
The main difference with classic gpio is the omission of the phandle of
the gpio controller (since gpio-hog are expected to be a child node of
gpio controller). Correct me if I am wrong.

In this case the current version of of_hog_gpio fails since it calls
of_parse_phandle_with_args which expect the gpio to start with the controller
phandle.

My best guess would be to rework of_hog_gpio to not use of_parse_phandle_with_args
and probably not gpio_of_xlate

This sounds easier than a sync of barebox gpio code with linux.

Cheers
-- Jules








  parent reply	other threads:[~2023-06-01 16:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 14:25 Marco Felsch
2023-06-01 14:32 ` Sascha Hauer
2023-06-01 14:38   ` Marco Felsch
2023-06-01 15:28     ` Jules Maselbas
2023-06-01 15:50       ` Marco Felsch
2023-06-01 16:09   ` Jules Maselbas [this message]
2023-06-01 17:13     ` Marco Felsch
2023-06-02  7:54       ` Marco Felsch
2023-06-02  8:02         ` Jules Maselbas
2023-06-01 15:42 ` Johannes Zink

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=ZHjCvPyB21Y2AWw+@tellis.lin.mbt.kalray.eu \
    --to=jmaselbas@kalray.eu \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    --cc=sha@pengutronix.de \
    /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