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 ba32ce95cb ("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>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Chris Packham 2019-03-29 15:13:21 +13:00 committed by Richard Weinberger
parent fb899d3b2a
commit 64d14c6fe0
1 changed files with 2 additions and 0 deletions

View File

@ -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)