From: Niall Leonard via B4 Submission Endpoint <devnull+nl250060.ncr.com@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Niall Leonard <nl250060@ncr.com>
Subject: [PATCH v2 0/2] Introduce new optional property to mark port as write only.
Date: Tue, 31 Jan 2023 13:49:36 +0000 [thread overview]
Message-ID: <20230126-gpio-mmio-fix-v2-0-38397aace340@ncr.com> (raw)
Some electronics do not allow the data regsister to be read without
corrupting the existing data on the port. It a quirk of the board
design.
e.g. I have a couple of boards where the electronics engineer decided
to only use the chip select line, so no read/write signal is connected.
This means that reading the address activates the chip select and drives
the contents of the data bus to the port.This makes it impossible to
read the last data written to the port.
This solution is to use the existing shadow data register 'bgpio_data'.
It can be used to return the last value written to the port by the read
operation.
This is enabled for a particular port using a new flag and a new
device tree property "no-input" to allow it to be selected on a board by
board basis. This means it will only effect hardware that requests it.
Signed-off-by: Niall Leonard <nl250060@ncr.com>
---
Changes in v2:
- Description of change updated to clarify why it is needed.
- Patches squashed as per request during review.
- wd,mbl-gpio bindings updated to yaml format.
- Link to v1: https://lore.kernel.org/r/20230126-gpio-mmio-fix-v1-0-8a20ce0e8275@ncr.com
---
Niall Leonard (2):
dt-bindings: improve wb,mbl-gpio binding documentation.
gpio: mmio: Use new flag BGPIOF_NO_INPUT.
.../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 -----------
.../devicetree/bindings/gpio/wd,mbl-gpio.yaml | 78 ++++++++++++++++++++++
drivers/gpio/gpio-mmio.c | 24 ++++++-
include/linux/gpio/driver.h | 1 +
4 files changed, 100 insertions(+), 41 deletions(-)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230126-gpio-mmio-fix-1a69d03ec9e7
Best regards,
--
Niall Leonard <nl250060@ncr.com>
next reply other threads:[~2023-01-31 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 13:49 Niall Leonard via B4 Submission Endpoint [this message]
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
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=20230126-gpio-mmio-fix-v2-0-38397aace340@ncr.com \
--to=devnull+nl250060.ncr.com@kernel.org \
--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=nl250060@ncr.com \
--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;
as well as URLs for NNTP newsgroup(s).