regulator: Enable supply regulator if child rail is enabled.
PATCH 1/1 regulator: Enable supply regulator if child rail is enabled.
During regulator_register, the rail is set on the provided machine constraints and if it is enabled then it is also require to enable the supply regulator. This will make sure that:
1. Proper reference count for supply regulator to be maintain.
2. Supply regulator should be enable when given rail is enabled.
---
When given rail is registered and if it has machine constratins to enable the rail then it is also require to enable the supply rail for a given rail. This will make sure that given rail is enabled and proper reference count is maintained for the supply rail to avoid disable of supply rail even child rail is enabled.
drivers/regulator/core.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/regulator/core.c +8 -0
@@ -2801,6 +2801,14 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, ret =set_supply (rdev, r);if (ret <0 ) goto scrub; + +/* Enable supply if rail is enabled */ +if (rdev->desc->ops->is_enabled && + rdev->desc->ops->is_enabled (rdev)) { + ret =regulator_enable (rdev->supply); +if (ret <0 ) + goto scrub; + } }/* add consumers devices */
Signature · 1 line
1.7.1.1
Mark Brown
AppliedQuoted 8 lines · Laxman Dewangan
During
regulator_register, the rail is set on the provided machine constraints and if it is enabled then it is also require to enable the supply regulator. This will make sure that:
1. Proper reference count for supply regulator to be maintain.
2. Supply regulator should be enable when given rail is enabled.Signed-off-by Laxman Dewangan <[email protected]>
Applied, thanks.
Quoted 5 lines
When given rail is registered and if it has machine constratins to enable the rail then it is also require to enable the supply rail for a given rail. This will make sure that given rail is enabled and proper reference count is maintained for the supply rail to avoid disable of supply rail even child rail is enabled.
Why is this not in the changelog?
Quoted 13 lines
From: Mark Brown [mailto:[email protected]]
Sent: Monday, January 02, 2012 5:06 PMQuoted 8 lines
During
regulator_register, the rail is set on the provided machine constraints and if it is enabled then it is also require to enable the supply regulator. This will make sure that:
1. Proper reference count for supply regulator to be maintain.
2. Supply regulator should be enable when given rail is enabled.Signed-off-by Laxman Dewangan <[email protected]>Applied, thanks.
Quoted 7 lines
Quoted 5 lines
When given rail is registered and if it has machine constratins to enable the rail then it is also require to enable the supply rail for a given rail. This will make sure that given rail is enabled and proper reference count is maintained for the supply rail to avoid disable of supply rail even child rail is enabled.
Why is this not in the changelog?
I think this is in just different wording for explaining the change.
Quoted 3 lines · Laxman Dewangan
Quoted 1 line
Why is this not in the changelog?
I think this is in just different wording for explaining the change.
If something like this is worth saying it should be in the changelog so that anyone finding the patch in git can see it too - in general stuff after the --- should be things like differences from previous versions of the patch or information about dependencies that need to be taken care of when applying that don't matter once the patch is applied.