mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
UPSTREAM: scsi: ufs: Allow regulators being always-on
Introduce a flag "always_on" in struct ufs_vreg to allow vendors to keep
the regulator always-on.
Bug: 188004633
Change-Id: Ib54d7a19056e6fb4b9d3008ab7cbe0ab6fa23523
(cherry picked from commit f8162ac70e)
Link: https://lore.kernel.org/r/20201207054955.24366-2-stanley.chu@mediatek.com
Reviewed-by: Andy Teng <andy.teng@mediatek.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -512,6 +512,7 @@ struct ufs_query_res {
|
|||||||
struct ufs_vreg {
|
struct ufs_vreg {
|
||||||
struct regulator *reg;
|
struct regulator *reg;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
bool always_on;
|
||||||
bool enabled;
|
bool enabled;
|
||||||
int min_uV;
|
int min_uV;
|
||||||
int max_uV;
|
int max_uV;
|
||||||
|
|||||||
@@ -8106,7 +8106,7 @@ static int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (!vreg || !vreg->enabled)
|
if (!vreg || !vreg->enabled || vreg->always_on)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = regulator_disable(vreg->reg);
|
ret = regulator_disable(vreg->reg);
|
||||||
|
|||||||
Reference in New Issue
Block a user