[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7hy1xznej1.fsf@baylibre.com>
Date: Tue, 14 Jun 2022 14:03:46 -0700
From: Kevin Hilman <khilman@...libre.com>
To: Jerome NEANNE <jneanne@...libre.com>, lgirdwood@...il.com,
broonie@...nel.org, robh+dt@...nel.org, nm@...com,
kristo@...nel.org, will@...nel.org, lee.jones@...aro.org,
jneanne@...libre.com
Cc: narmstrong@...libre.com, msp@...libre.com, j-keerthy@...com,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC PATCH 2/5] mfd: drivers: Add TI TPS65219 PMIC support
Jerome NEANNE <jneanne@...libre.com> writes:
> The TPS65219 is a power management IC PMIC designed
> to supply a wide range of SoCs
> in both portable and stationary applications.
> Any SoC can control TPS65219 over a standard I2C interface.
>
> It contains the following components:
> - Regulators.
> - Over Temperature warning and Shut down.
> - GPIOs
> - Multi Function Pins (MFP)
>
> This patch adds support for tps65219 mfd device. At this time only
> the functionalities listed below are made available:
>
> - Regulators probe and functionalities
> - warm and cold reset support
> - SW shutdown support
>
> Signed-off-by: Jerome NEANNE <jneanne@...libre.com>
[...]
> +/**
> + * pmic_rst_restart: trig tps65219 reset to SOC.
> + *
> + * Trigged via notifier
> + */
> +static int pmic_rst_restart(struct notifier_block *this,
> + unsigned long mode, void *cmd)
> +{
> + struct tps65219 *tps;
> +
> + tps = container_of(this, struct tps65219, nb);
> + if (tps != NULL) {
> + if (WARMNCOLD)
This value is hard-coded to 1 in the header, so war reset will always be
done.
> + tps65219_warm_reset(tps);
> + else
> + tps65219_cold_reset(tps);
Doesn't the reboot_notifier get a value like REBOOT_WARM,
REBOOT_COLD etc (c.f. enum in linux/reboot.h) so you could properly select?
Kevin
Powered by blists - more mailing lists