Skip to content

Commit 64d14c6

Browse files
cpackham-atlnzrichardweinberger
authored andcommitted
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 ba32ce9 ("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>
1 parent fb899d3 commit 64d14c6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/mtd/maps/physmap-core.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ static void physmap_set_addr_gpios(struct physmap_flash_info *info,
132132

133133
gpiod_set_value(info->gpios->desc[i], !!(BIT(i) & ofs));
134134
}
135+
136+
info->gpio_values = ofs;
135137
}
136138

137139
#define win_mask(order) (BIT(order) - 1)

0 commit comments

Comments
 (0)