From: Chris Packham <chris.packham@alliedtelesis.co.nz>
To: bbrezillon@kernel.org, computersforpeace@gmail.com,
dwmw2@infradead.org, marek.vasut@gmail.com, richard@nod.at,
robh+dt@kernel.org, mark.rutland@arm.com
Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Chris Packham <chris.packham@alliedtelesis.co.nz>,
stable@vger.kernel.org,
Boris Brezillon <boris.brezillon@collabora.com>
Subject: [PATCH v2 1/2] mtd: maps: physmap: Store gpio_values correctly
Date: Fri, 29 Mar 2019 15:13:21 +1300 [thread overview]
Message-ID: <20190329021322.6833-2-chris.packham@alliedtelesis.co.nz> (raw)
In-Reply-To: <20190329021322.6833-1-chris.packham@alliedtelesis.co.nz>
When the gpio-addr-flash.c driver was merged with physmap-core.c the
code to store the current gpio_values was lost. This meant that once a
gpio was asserted it was never de-asserted. Fix this by storing the
current offset in gpio_values like the old driver used to.
Fixes: commit ba32ce95cbd9 ("mtd: maps: Merge gpio-addr-flash.c into physmap-core.c")
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
---
Changes in v2:
- Cc stable, add Boris' review
drivers/mtd/maps/physmap-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/maps/physmap-core.c b/drivers/mtd/maps/physmap-core.c
index d9a3e4bebe5d..21b556afc305 100644
--- a/drivers/mtd/maps/physmap-core.c
+++ b/drivers/mtd/maps/physmap-core.c
@@ -132,6 +132,8 @@ static void physmap_set_addr_gpios(struct physmap_flash_info *info,
gpiod_set_value(info->gpios->desc[i], !!(BIT(i) & ofs));
}
+
+ info->gpio_values = ofs;
}
#define win_mask(order) (BIT(order) - 1)
--
2.21.0
next prev parent reply other threads:[~2019-03-29 2:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 2:13 [PATCH v2 0/2] mtd: physmap: Using gpio-addrs Chris Packham
2019-03-29 2:13 ` Chris Packham [this message]
2019-03-29 2:13 ` [PATCH v2 2/2] dt-binding: mtd: physmap: Add example using addr-gpios property Chris Packham
2019-04-06 6:05 ` Rob Herring
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=20190329021322.6833-2-chris.packham@alliedtelesis.co.nz \
--to=chris.packham@alliedtelesis.co.nz \
--cc=bbrezillon@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mark.rutland@arm.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=stable@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).