]> Pileus Git - ~andy/linux/blobdiff - drivers/regulator/of_regulator.c
regulator: of: Added a property to indicate bypass mode support
[~andy/linux] / drivers / regulator / of_regulator.c
index 66ca769287ab3427aa9ac8695ad5a67ca5dc77c3..f3c8f8f9dc39d48e8b586cb808cfdc568ae67d27 100644 (file)
@@ -61,6 +61,9 @@ static void of_get_regulation_constraints(struct device_node *np,
        else /* status change should be possible if not always on. */
                constraints->valid_ops_mask |= REGULATOR_CHANGE_STATUS;
 
+       if (of_property_read_bool(np, "regulator-allow-bypass"))
+               constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS;
+
        ramp_delay = of_get_property(np, "regulator-ramp-delay", NULL);
        if (ramp_delay)
                constraints->ramp_delay = be32_to_cpu(*ramp_delay);