forked from Minki/linux
scsi: ufs: Export regulator functions
Export below regulator functions to allow vendors to customize regulator configuration in their own platforms. int ufshcd_populate_vreg(struct device *dev, const char *name, struct ufs_vreg **out_vreg); int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg); Link: https://lore.kernel.org/r/20220616053725.5681-10-stanley.chu@mediatek.com Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
42b1928360
commit
1d6f9decb6
@ -8415,7 +8415,7 @@ static int ufshcd_setup_hba_vreg(struct ufs_hba *hba, bool on)
|
||||
return ufshcd_toggle_vreg(hba->dev, info->vdd_hba, on);
|
||||
}
|
||||
|
||||
static int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg)
|
||||
int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@ -8431,6 +8431,7 @@ static int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg)
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufshcd_get_vreg);
|
||||
|
||||
static int ufshcd_init_vreg(struct ufs_hba *hba)
|
||||
{
|
||||
|
@ -109,8 +109,8 @@ out:
|
||||
}
|
||||
|
||||
#define MAX_PROP_SIZE 32
|
||||
static int ufshcd_populate_vreg(struct device *dev, const char *name,
|
||||
struct ufs_vreg **out_vreg)
|
||||
int ufshcd_populate_vreg(struct device *dev, const char *name,
|
||||
struct ufs_vreg **out_vreg)
|
||||
{
|
||||
char prop_name[MAX_PROP_SIZE];
|
||||
struct ufs_vreg *vreg = NULL;
|
||||
@ -145,6 +145,7 @@ out:
|
||||
*out_vreg = vreg;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufshcd_populate_vreg);
|
||||
|
||||
/**
|
||||
* ufshcd_parse_regulator_info - get regulator info from device tree
|
||||
|
@ -32,5 +32,7 @@ void ufshcd_init_pwr_dev_param(struct ufs_dev_params *dev_param);
|
||||
int ufshcd_pltfrm_init(struct platform_device *pdev,
|
||||
const struct ufs_hba_variant_ops *vops);
|
||||
void ufshcd_pltfrm_shutdown(struct platform_device *pdev);
|
||||
int ufshcd_populate_vreg(struct device *dev, const char *name,
|
||||
struct ufs_vreg **out_vreg);
|
||||
|
||||
#endif /* UFSHCD_PLTFRM_H_ */
|
||||
|
@ -1199,6 +1199,8 @@ void ufshcd_map_desc_id_to_length(struct ufs_hba *hba, enum desc_idn desc_id,
|
||||
|
||||
u32 ufshcd_get_local_unipro_ver(struct ufs_hba *hba);
|
||||
|
||||
int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg);
|
||||
|
||||
int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd);
|
||||
|
||||
int ufshcd_exec_raw_upiu_cmd(struct ufs_hba *hba,
|
||||
|
Loading…
Reference in New Issue
Block a user