| 334 | } |
| 335 | |
| 336 | rt_bool_t rt_regulator_is_enabled(struct rt_regulator *reg) |
| 337 | { |
| 338 | if (!reg) |
| 339 | { |
| 340 | return -RT_EINVAL; |
| 341 | } |
| 342 | |
| 343 | if (reg->reg_np->ops->is_enabled) |
| 344 | { |
| 345 | return reg->reg_np->ops->is_enabled(reg->reg_np); |
| 346 | } |
| 347 | |
| 348 | return rt_atomic_load(®->reg_np->enabled_count) > 0; |
| 349 | } |
| 350 | |
| 351 | static rt_err_t regulator_set_voltage(struct rt_regulator_node *reg_np, int min_uvolt, int max_uvolt) |
| 352 | { |
no outgoing calls
no test coverage detected