Commit 4a001c96 authored by Etienne Carriere's avatar Etienne Carriere Committed by Jonathan Cameron

iio: dac: stm32-dac: use reset controller only at probe time

This change removes the reset controller reference from the local
DAC instance since it is used only at probe time.
Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
Signed-off-by: default avatarFabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 0013ccaa
...@@ -20,13 +20,11 @@ ...@@ -20,13 +20,11 @@
/** /**
* struct stm32_dac_priv - stm32 DAC core private data * struct stm32_dac_priv - stm32 DAC core private data
* @pclk: peripheral clock common for all DACs * @pclk: peripheral clock common for all DACs
* @rst: peripheral reset control
* @vref: regulator reference * @vref: regulator reference
* @common: Common data for all DAC instances * @common: Common data for all DAC instances
*/ */
struct stm32_dac_priv { struct stm32_dac_priv {
struct clk *pclk; struct clk *pclk;
struct reset_control *rst;
struct regulator *vref; struct regulator *vref;
struct stm32_dac_common common; struct stm32_dac_common common;
}; };
...@@ -94,6 +92,7 @@ static int stm32_dac_probe(struct platform_device *pdev) ...@@ -94,6 +92,7 @@ static int stm32_dac_probe(struct platform_device *pdev)
struct regmap *regmap; struct regmap *regmap;
struct resource *res; struct resource *res;
void __iomem *mmio; void __iomem *mmio;
struct reset_control *rst;
int ret; int ret;
if (!dev->of_node) if (!dev->of_node)
...@@ -148,11 +147,11 @@ static int stm32_dac_probe(struct platform_device *pdev) ...@@ -148,11 +147,11 @@ static int stm32_dac_probe(struct platform_device *pdev)
priv->common.vref_mv = ret / 1000; priv->common.vref_mv = ret / 1000;
dev_dbg(dev, "vref+=%dmV\n", priv->common.vref_mv); dev_dbg(dev, "vref+=%dmV\n", priv->common.vref_mv);
priv->rst = devm_reset_control_get_exclusive(dev, NULL); rst = devm_reset_control_get_exclusive(dev, NULL);
if (!IS_ERR(priv->rst)) { if (!IS_ERR(rst)) {
reset_control_assert(priv->rst); reset_control_assert(rst);
udelay(2); udelay(2);
reset_control_deassert(priv->rst); reset_control_deassert(rst);
} }
if (cfg && cfg->has_hfsel) { if (cfg && cfg->has_hfsel) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment