On 30/12/2024 11:02, Troy Mitchell wrote: > +static int spacemit_pmic_shutdown(struct sys_off_data *data) > +{ > + int ret; > + struct spacemit_pmic *pmic = data->cb_data; > + > + ret = regmap_update_bits(pmic->regmap, > + pmic->match_data->shutdown.reg, > + pmic->match_data->shutdown.bit, > + pmic->match_data->shutdown.bit); > + if (ret) > + dev_err(data->dev, "failed to reboot device!"); reboot -> shutdown > + if (match_data->shutdown.reg) { > + ret = devm_register_sys_off_handler(&client->dev, > + SYS_OFF_MODE_POWER_OFF_PREPARE, > + SYS_OFF_PRIO_HIGH, > + &spacemit_pmic_shutdown, > + pmic); > + if (ret) > + return dev_err_probe(&client->dev, > + ret, > + "failed to register restart handler"); restart -> shutdown Have a great time, Jure Repinc -- Jabber/XMPP: JLP@xxxxxxxxxx Matrix: @jlp:matrix.org Mastodon/ActivityPub: @JRepin@xxxxxxxx
Attachment:
smime.p7s
Description: S/MIME cryptographic signature