hwmon: (mr75203) skip reset-control deassert for SOCs that don't support it
Don't fail the probe function and don't deassert the reset controller if a "reset" property doesn't exist in the device tree. Change is done for SOCs that don't support a reset controller. Signed-off-by: Eliav Farber <farbere@amazon.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220908152449.35457-10-farbere@amazon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
5b5e91652e
commit
493372f5d3
@ -541,14 +541,17 @@ static int mr75203_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
pvt->rst = devm_reset_control_get_exclusive(dev, NULL);
|
||||
pvt->rst = devm_reset_control_get_optional_exclusive(dev, NULL);
|
||||
if (IS_ERR(pvt->rst))
|
||||
return dev_err_probe(dev, PTR_ERR(pvt->rst),
|
||||
"failed to get reset control\n");
|
||||
|
||||
ret = pvt_reset_control_deassert(dev, pvt);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "cannot deassert reset control\n");
|
||||
if (pvt->rst) {
|
||||
ret = pvt_reset_control_deassert(dev, pvt);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret,
|
||||
"cannot deassert reset control\n");
|
||||
}
|
||||
|
||||
ret = regmap_read(pvt->c_map, PVT_IP_CONFIG, &val);
|
||||
if(ret < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user