• Stanley Chu's avatar
    scsi: ufs: Change "<name>-max-microamp" to non-mandatory property · 12e3ffb9
    Stanley Chu authored
    In dt-bindings for ufs, "<name>-max-microamp" property indicates current
    limit and is mandatory if "<name>-fixed-regulator" is not defined on a
    specified regulator.
    
    However, in some platforms, regulators without "<name>-fixed-regulator"
    property may not need to define their current limit because they may want
    to define voltage range only for proper voltage switching in different
    power modes, especially for vcc, vccq or vccq2.
    
    Currently missing "<name>-max-microamp" property in device tree will lead
    initialization to fail, thus such limitation shall be resolved to tolerate
    this kind of regulators.
    
    After resolving this, regulators without "<name>-max-microamp" property
    will have undefined "max current" value, i.e., zero value in "max_uA" field
    in struct ufs_vreg. Because we do bypass current switching operation (by
    regulator_set_load) in case of undefined current limit, this patch shall be
    safe.
    Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
    Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
    Acked-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    12e3ffb9
ufshcd-pltfrm.c 12.4 KB