Stanley Chu 0487fff766 scsi: ufs: Fix regulator load and icc-level configuration
Currently if a regulator has "<name>-fixed-regulator" property in device
tree, it will skip current limit initialization.  This lead to a zero
"max_uA" value in struct ufs_vreg.

However, "regulator_set_load" operation shall be required on regulators
which have valid current limits, otherwise a zero "max_uA" set by
"regulator_set_load" may cause unexpected behavior when this regulator is
enabled or set as high power mode.

Similarly, in device's icc_level configuration flow, the target icc_level
shall be updated if regulator also has valid current limit, otherwise a
wrong icc_level will be calculated by zero "max_uA" and thus causes
unexpected results after it is written to device.

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Acked-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:11:35 -04:00
..
2019-03-16 12:51:50 -07:00
2018-12-18 23:19:21 -05:00
2019-03-19 17:38:20 -04:00
2019-03-09 16:53:47 -08:00
2019-03-09 16:53:47 -08:00
2019-03-09 16:53:47 -08:00
2019-03-09 16:53:47 -08:00
2019-03-16 12:51:50 -07:00
2019-03-09 16:53:47 -08:00
2019-03-16 12:51:50 -07:00
2019-03-02 11:39:54 -08:00
2018-12-18 23:19:21 -05:00
2018-12-18 23:19:21 -05:00
2018-06-19 22:02:25 -04:00
2018-12-18 23:19:21 -05:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:58:35 -05:00
2018-12-18 23:19:21 -05:00
2018-12-28 14:48:06 -08:00
2019-03-18 16:46:14 -04:00
2018-12-18 23:13:12 -05:00
2018-12-18 23:19:21 -05:00
2018-11-06 21:31:28 -05:00
2019-03-09 16:53:47 -08:00
2019-03-16 12:51:50 -07:00
2018-12-18 23:19:21 -05:00
2019-02-05 21:28:52 -05:00
2018-12-28 14:48:06 -08:00
2018-12-18 23:13:12 -05:00
2019-03-09 16:53:47 -08:00
2018-11-07 13:42:32 -07:00
2018-11-07 13:42:32 -07:00
2018-12-28 14:48:06 -08:00
2018-06-04 07:58:06 -07:00
2018-06-19 22:02:25 -04:00
2019-03-27 21:04:52 -04:00
2019-02-12 22:33:00 -05:00
2018-06-12 16:19:22 -07:00
2018-12-18 23:19:21 -05:00
2019-02-05 21:29:49 -05:00
2018-12-18 23:19:21 -05:00
2018-12-28 14:48:06 -08:00
2018-12-28 14:48:06 -08:00