[PATCH 2/2] mfd: add new driver for P1 PMIC from SpacemiT
Jure Repinc
jlp at holodeck1.com
Tue Dec 31 11:42:56 PST 2024
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 at jabber.org
Matrix: @jlp:matrix.org
Mastodon/ActivityPub: @JRepin at mstdn.io
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4066 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20241231/7f5c28a9/attachment.p7s>
More information about the linux-riscv
mailing list