lkml.org 
[lkml]   [2023]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/2] mfd: tps6586x: register restart handler
From
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

\
 
 \ /
  Last update: 2023-03-27 01:10    [W:0.046 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site