lkml.org 
[lkml]   [2019]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mfd: rk808: Always use poweroff when requested
Date
Am Montag, 9. Dezember 2019, 12:57:46 CET schrieb Soeren Moch:
> With the device tree property "rockchip,system-power-controller" we
> explicitly request to use this PMIC to power off the system. So always
> register our poweroff function, even if some other handler (probably
> PSCI poweroff) was registered before.
>
> Signed-off-by: Soeren Moch <smoch@web.de>

Sounds very sensible
Reviewed-by: Heiko Stuebner <heiko@sntech.de>


> ---
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/mfd/rk808.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
> index a69a6742ecdc..616e44e7ef98 100644
> --- a/drivers/mfd/rk808.c
> +++ b/drivers/mfd/rk808.c
> @@ -550,7 +550,7 @@ static int rk808_probe(struct i2c_client *client,
> const struct mfd_cell *cells;
> int nr_pre_init_regs;
> int nr_cells;
> - int pm_off = 0, msb, lsb;
> + int msb, lsb;
> unsigned char pmic_id_msb, pmic_id_lsb;
> int ret;
> int i;
> @@ -674,16 +674,9 @@ static int rk808_probe(struct i2c_client *client,
> goto err_irq;
> }
>
> - pm_off = of_property_read_bool(np,
> - "rockchip,system-power-controller");
> - if (pm_off && !pm_power_off) {
> + if (of_property_read_bool(np, "rockchip,system-power-controller")) {
> rk808_i2c_client = client;
> pm_power_off = rk808->pm_pwroff_fn;
> - }
> -
> - if (pm_off && !pm_power_off_prepare) {
> - if (!rk808_i2c_client)
> - rk808_i2c_client = client;
> pm_power_off_prepare = rk808->pm_pwroff_prep_fn;
> }
>
> --
> 2.17.1
>




\
 
 \ /
  Last update: 2019-12-09 13:33    [W:0.070 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site