lkml.org 
[lkml]   [2022]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 2/5] mfd: drivers: Add TI TPS65219 PMIC support
Date
Jerome NEANNE <jneanne@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@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

\
 
 \ /
  Last update: 2022-06-14 23:04    [W:0.166 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site