Commit 64d14c6f authored by Chris Packham's avatar Chris Packham Committed by Richard Weinberger
Browse files

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 ba32ce95 ("mtd: maps: Merge gpio-addr-flash.c into physmap-core.c")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent fb899d3b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)