linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Prathamesh Shete <pshete@nvidia.com>,
	jonathanh@nvidia.com, linux-gpio@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] pinctrl: tegra: Add support to display pin function
Date: Fri, 29 Sep 2023 14:26:47 +0200	[thread overview]
Message-ID: <ZRbCh8F79WYvJ9Ni@orome.fritz.box> (raw)
In-Reply-To: <20230928085319.0b09bf7d@booty>

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

On Thu, Sep 28, 2023 at 08:53:19AM +0200, Luca Ceresoli wrote:
> Hello Linus, Prathamesh,
> 
> On Wed, 27 Sep 2023 10:54:15 +0200
> Linus Walleij <linus.walleij@linaro.org> wrote:
> 
> > On Mon, Sep 25, 2023 at 6:30 PM Luca Ceresoli <luca.ceresoli@bootlin.com> wrote:
> > 
> > > The symptom is that i2c3 is not working anymore, the I2C lines being
> > > always high. No other known issues at the moment.  
> > 
> > Hm....
> > 
> > >> +     {"nvidia,function",             TEGRA_PINCONF_PARAM_FUNCTION},  
> > >
> > > FYI, I reduced your patch to only this line plus the one in the
> > > pinctrl-tegra.h and the problem appears as well.  
> > 
> > I think there is a conflict now, that the pinconf is "stealing" the function
> > assignment from the pinmux call.
> > 
> > It's just a debugprint, I will revert the patch, Luca can investigate and you
> 
> Thanks for the quick revert Linus.
> 
> > can test a new patch then we will merge that.
> 
> Prathamesh, if you send a new patch it would be great if you can Cc: me so I
> can test it.

I was able to reproduce this on tegra20-trimslice, and it looks indeed
that the "shortcut" of supporting this through the pinconf "framework"
doesn't work. In addition to the pinmux now no longer getting applied
(exactly why that is I don't think I understand), it also leads to weird
things in other parts of the debugfs output. For example the code now
ends up trying to read a u32 from the nvidia,function property, which is
actually a string. That seems to be fine, but obviously it doesn't yield
the value that is expected for a function and messes up the config param
which will then later on fail to properly display.

Anyway, turns out the correct implementation is even shorter. I've sent
out a patch.

Thierry

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

      reply	other threads:[~2023-09-29 12:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 13:55 [PATCH] pinctrl: tegra: Add support to display pin function Prathamesh Shete
2023-07-12 15:05 ` Thierry Reding
2023-07-13  8:21   ` [PATCH v2] " Prathamesh Shete
2023-07-14  9:47     ` Thierry Reding
2023-07-14 10:22       ` Jon Hunter
2023-07-14 11:35         ` [PATCH v3] " Prathamesh Shete
2023-07-20 19:35           ` Linus Walleij
2023-09-25 16:30           ` Luca Ceresoli
2023-09-27  8:54             ` Linus Walleij
2023-09-28  6:53               ` Luca Ceresoli
2023-09-29 12:26                 ` Thierry Reding [this message]

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=ZRbCh8F79WYvJ9Ni@orome.fritz.box \
    --to=thierry.reding@gmail.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=luca.ceresoli@bootlin.com \
    --cc=pshete@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).