mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Leonard, Niall" <Niall.Leonard@ncr.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] gpio: mmio: Use new flag BGPIOF_NO_INPUT.
Date: Mon, 13 Mar 2023 13:56:24 +0000	[thread overview]
Message-ID: <ace51cc4-aa77-7ac0-b83f-12057a9bbae6@ncr.com> (raw)
In-Reply-To: <Y+jds9U1PgYpXBHT@smile.fi.intel.com>

On 12/02/2023 12:38, Andy Shevchenko wrote:
> *External Message* - Use caution before opening links or attachments
> 
> On Tue, Jan 31, 2023 at 01:49:38PM +0000, Niall Leonard wrote:
>> Add new flag BGPIOF_NO_INPUT to header file.
>> Use the existing shadow data register 'bgpio_data' to allow
>> the last written value to be returned by the read operation
>> when BGPIOF_NO_INPUT flag is set.
>> Ensure this change only applies to the specific binding "wd,mbl-gpio".
> 
> I'm wondering why do we need that.
> 
> I mean the reading back the (possible cached) output value is the right thing
> to do by default for GPIO (in output mode) or GPO. So, instead you can simply
> check the current direction of the pin and return (cached) value.
> 
> Or did I miss something?
> 
My thinking here was that I don't want to break any existing code which 
relies on the read always reading the physical port.
I'm going to rethink my approach here as I'm starting to think the 
better approach would be to modify the gpio-74xx-mmio.c driver to cater 
for this hardware.

Regards,
Niall.

  reply	other threads:[~2023-03-13 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 13:49 [PATCH v2 0/2] Introduce new optional property to mark port as write only Niall Leonard via B4 Submission Endpoint
2023-01-31 13:49 ` [PATCH v2 1/2] dt-bindings: improve wb,mbl-gpio binding documentation Niall Leonard via B4 Submission Endpoint
2023-02-01  8:27   ` Krzysztof Kozlowski
2023-02-07  9:49     ` Leonard, Niall
2023-02-07 10:48       ` Krzysztof Kozlowski
2023-01-31 13:49 ` [PATCH v2 2/2] gpio: mmio: Use new flag BGPIOF_NO_INPUT Niall Leonard via B4 Submission Endpoint
2023-02-12 12:38   ` Andy Shevchenko
2023-03-13 13:56     ` Leonard, Niall [this message]
2023-03-13 14:11       ` 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=ace51cc4-aa77-7ac0-b83f-12057a9bbae6@ncr.com \
    --to=niall.leonard@ncr.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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

all inboxes | Powered by JetHome®