On Mon, Feb 25, 2019 at 9:56 AM Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote: > +static irqreturn_t gpmi_pwr_good_irq(int irq, void *dev_id) > +{ > + struct gpmi_nand_data *this = dev_id; > + int level; > + > + level = gpiod_get_value_cansleep(this->pwrgood_gpio); > + if (level) { > + mutex_lock(&this->nand.power_lock); > + } else { > + mutex_unlock(&this->nand.power_lock); > + dev_info(this->dev, "Spurious Power Failure detected\n"); > + } Hmm, not sure if it is wise to unlock after the power-low pin was toggled. Do you have a guarantee that the system, and most important the NAND chip, is in a well defined state after the power returns? -- Thanks, //richard ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/