Messages in this thread | | | Date | Tue, 21 Mar 2023 05:07:44 +0300 | Subject | Re: [PATCH v2 2/2] mfd: tps6586x: register restart handler | From | Dmitry Osipenko <> |
| |
On 3/21/23 01:03, Benjamin Bara wrote: > +static int tps6586x_restart_handler(struct sys_off_data *data) > +{ > + unsigned long flags; > + struct device *tps6586x_dev = (struct device *)data->cb_data; > + > + /* bring pmic into HARD REBOOT state, enforce atomic i2c xfer */ > + local_irq_save(flags); > + tps6586x_set_bits(tps6586x_dev, TPS6586X_SUPPLYENE, SOFT_RST_BIT); > + local_irq_restore(flags);
Please change i2c_in_atomic_xfer_mode() to use preemptible() instead of irqs_disabled() and drop the local_irq_save/restore.
-- Best regards, Dmitry
| |