aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Packham <[email protected]>2019-03-29 15:13:21 +1300
committerRichard Weinberger <[email protected]>2019-05-06 21:46:45 +0200
commit64d14c6fe040361ff6aecb825e392cf97837cd9e (patch)
tree134505dd87f03cba84338bef0bc3b329ef64a46c
parentfb899d3b2a622874cbb5daf9eb8c0fba19844648 (diff)
mtd: maps: physmap: Store gpio_values correctly
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: <[email protected]> Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
-rw-r--r--drivers/mtd/maps/physmap-core.c2
1 files changed, 2 insertions, 0 deletions
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)