소스 검색

regulator: core: Log when we bring constraints into range

This aids in debugging problems triggered by the regulator core applying
its constraints, we could potentially crash immediately after updating
the voltage if the constraints are buggy.

Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown 9 년 전
부모
커밋
45a91e8f76
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      drivers/regulator/core.c

+ 2 - 0
drivers/regulator/core.c

@@ -935,6 +935,8 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
 		}
 
 		if (target_min != current_uV || target_max != current_uV) {
+			rdev_info(rdev, "Bringing %duV into %d-%duV\n",
+				  current_uV, target_min, target_max);
 			ret = _regulator_do_set_voltage(
 				rdev, target_min, target_max);
 			if (ret < 0) {