[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3082943.DJkKcVGEfx@excalibur>
Date: Tue, 31 Dec 2024 20:42:56 +0100
From: Jure Repinc <jlp@...odeck1.com>
To: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Troy Mitchell <troymitchell988@...il.com>, linux-riscv@...ts.infradead.org
Cc: linux-riscv@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Troy Mitchell <TroyMitchell988@...il.com>,
Troy Mitchell <troymitchell988@...il.com>
Subject: Re: [PATCH 2/2] mfd: add new driver for P1 PMIC from SpacemiT
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@...ber.org
Matrix: @jlp:matrix.org
Mastodon/ActivityPub: @JRepin@...dn.io
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4066 bytes)
Powered by blists - more mailing lists