MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / regulator_disable

Function regulator_disable

components/drivers/regulator/regulator.c:279–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279static rt_err_t regulator_disable(struct rt_regulator_node *reg_np)
280{
281 rt_err_t err = RT_EOK;
282
283 if (reg_np->ops->disable)
284 {
285 err = reg_np->ops->disable(reg_np);
286
287 if (!err)
288 {
289 if (reg_np->param->off_on_delay)
290 {
291 regulator_delay(reg_np->param->off_on_delay);
292 }
293
294 err = regulator_notifier_call_chain(reg_np, RT_REGULATOR_MSG_DISABLE, RT_NULL);
295 }
296 }
297
298 if (!err && reg_np->parent)
299 {
300 err = regulator_disable(reg_np->parent);
301 }
302
303 return err;
304}
305
306rt_err_t rt_regulator_disable(struct rt_regulator *reg)
307{

Callers 2

rt_regulator_unregisterFunction · 0.70
rt_regulator_disableFunction · 0.70

Calls 2

regulator_delayFunction · 0.85

Tested by

no test coverage detected