[RFC PATCH 2/5] mfd: drivers: Add TI TPS65219 PMIC support

Kevin Hilman khilman at baylibre.com
Tue Jun 14 14:03:46 PDT 2022


Jerome NEANNE <jneanne at baylibre.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 at baylibre.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



More information about the linux-arm-kernel mailing list