mtd: rawnand: Provide helper for polling GPIO R/B pin

Each controller driver having access to NAND R/B pin over GPIO would
have to reimplement the polling loop otherwise.

Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
Janusz Krzysztofik
2018-10-15 21:41:28 +02:00
committed by Miquel Raynal
parent 41d6f0d07d
commit b0e137ad24
2 changed files with 35 additions and 0 deletions

View File

@@ -1346,4 +1346,8 @@ void nand_release(struct nand_chip *chip);
*/
int nand_soft_waitrdy(struct nand_chip *chip, unsigned long timeout_ms);
struct gpio_desc;
int nand_gpio_waitrdy(struct nand_chip *chip, struct gpio_desc *gpiod,
unsigned long timeout_ms);
#endif /* __LINUX_MTD_RAWNAND_H */