summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:18 +0200
commite5fc57847e7a68ad4a662e9799afb103211e4073 (patch)
treefba7865660b3acf477eac3998affeeca83e57638 /drivers
parentd11999163ba62a239022d7ba98bc524730575db8 (diff)
parente208e049f98de40157eb3d8f8f7cbb61147a5040 (diff)
downloadbarebox-e5fc57847e7a68ad4a662e9799afb103211e4073.tar.gz
barebox-e5fc57847e7a68ad4a662e9799afb103211e4073.tar.xz
Merge branch 'for-next/reset-source'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/da9053.c5
-rw-r--r--drivers/mfd/da9063.c5
-rw-r--r--drivers/watchdog/stm32_iwdg.c3
3 files changed, 3 insertions, 10 deletions
diff --git a/drivers/mfd/da9053.c b/drivers/mfd/da9053.c
index b156bf113f..1faba813be 100644
--- a/drivers/mfd/da9053.c
+++ b/drivers/mfd/da9053.c
@@ -214,7 +214,6 @@ static int da9053_set_timeout(struct watchdog *wd, unsigned timeout)
static void da9053_detect_reset_source(struct da9053_priv *da9053)
{
- unsigned int priority;
enum reset_src_type type;
int ret;
u8 val;
@@ -236,9 +235,7 @@ static void da9053_detect_reset_source(struct da9053_priv *da9053)
else
return;
- priority = of_get_reset_source_priority(da9053->dev->device_node);
-
- reset_source_set_priority(type, priority);
+ reset_source_set_device(da9053->dev, ltype);
ret = da9053_reg_write(da9053, DA9053_FAULTLOG_REG, val);
if (ret < 0)
diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c
index a7fff2c5bf..5f77e5935b 100644
--- a/drivers/mfd/da9063.c
+++ b/drivers/mfd/da9063.c
@@ -161,7 +161,6 @@ static void da9063_detect_reset_source(struct da9063 *priv)
{
int ret;
u8 val;
- unsigned int priority;
enum reset_src_type type;
ret = i2c_read_reg(priv->client, DA9063_REG_FAULT_LOG, &val, 1);
@@ -180,9 +179,7 @@ static void da9063_detect_reset_source(struct da9063 *priv)
else
return;
- priority = of_get_reset_source_priority(priv->dev->device_node);
-
- reset_source_set_priority(type, priority);
+ reset_source_set_device(priv->dev, type);
}
static void da9063_restart(struct restart_handler *rst)
diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
index 7c2dc077af..20536cb4ab 100644
--- a/drivers/watchdog/stm32_iwdg.c
+++ b/drivers/watchdog/stm32_iwdg.c
@@ -182,8 +182,7 @@ static int stm32_set_reset_reason(struct regmap *rcc)
}
}
- reset_source_set_priority(type, RESET_SOURCE_DEFAULT_PRIORITY);
- reset_source_set_instance(type, instance);
+ reset_source_set_prinst(type, RESET_SOURCE_DEFAULT_PRIORITY, instance);
pr_info("STM32 RCC reset reason %s (MP_RSTSR: 0x%08x)\n",
reset_source_name(), reg);