linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Ryan.Wanner@microchip.com>
To: <linux-gpio@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linus.walleij@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <Claudiu.Beznea@microchip.com>
Subject: GPIO set config argument value difference in pinconf and gpiolib
Date: Mon, 15 May 2023 08:21:35 +0000	[thread overview]
Message-ID: <120117b6-feda-e7aa-4f09-a126a0747388@microchip.com> (raw)

Hello,

I have a question about gpiochip_generic_config function. I noticed when
calling this function the pin configuration is incorrect for
push-pull/open-drain in pinctrl-at91-pio4. I traced this down to a
argument value that is incorrect, this is extracted from the config
using pinconf_to_config_argument. The pinctrl driver processes this
config argument value correctly but when gpiolib calls this function
that value is not passed causing the argument to be 0 in the function
atmel_conf_pin_config_group_set. I see this same structure in other
pinctrl drivers as well.

It seems that gpio_set_config is called which hard codes 0 into
gpio_set_config_with_arugment function call making the argument 0 when
passed into the pinctrl set config function. It seems that the correct
way would to mimic the gpio_set_bias function handling of this argument
value. Doing a small local test seems to confirm my suggestion.

Best,
Ryan Wanner


             reply	other threads:[~2023-05-15  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15  8:21 Ryan.Wanner [this message]
2023-05-15  9:50 ` GPIO set config argument value difference in pinconf and gpiolib andy.shevchenko

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=120117b6-feda-e7aa-4f09-a126a0747388@microchip.com \
    --to=ryan.wanner@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.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 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).