forked from Minki/linux
47555a5c8a
This change turns the UFS variant (SCSI_UFS_QCOM) into a UFS a platform device. In order to do so a few additional changes are required: 1. The ufshcd-pltfrm is no longer serves as a platform device. Now it only serves as a group of platform APIs such as PM APIs (runtime suspend/resume, system suspend/resume etc), parsers of clocks, regulators and pm_levels from DT. 2. What used to be the old platform "probe" is now "only" a pltfrm_init() routine, that does exactly the same, but only being called by the new probe function of the UFS variant. Reviewed-by: Rob Herring <robherring2@gmail.com> Reviewed-by: Gilad Broner <gbroner@codeaurora.org> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Tested-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#ifndef UFSHCD_PLTFRM_H_
|
|
#define UFSHCD_PLTFRM_H_
|
|
|
|
#include "ufshcd.h"
|
|
|
|
int ufshcd_pltfrm_init(struct platform_device *pdev,
|
|
struct ufs_hba_variant_ops *vops);
|
|
void ufshcd_pltfrm_shutdown(struct platform_device *pdev);
|
|
|
|
#ifdef CONFIG_PM
|
|
|
|
int ufshcd_pltfrm_suspend(struct device *dev);
|
|
int ufshcd_pltfrm_resume(struct device *dev);
|
|
int ufshcd_pltfrm_runtime_suspend(struct device *dev);
|
|
int ufshcd_pltfrm_runtime_resume(struct device *dev);
|
|
int ufshcd_pltfrm_runtime_idle(struct device *dev);
|
|
|
|
#else /* !CONFIG_PM */
|
|
|
|
#define ufshcd_pltfrm_suspend NULL
|
|
#define ufshcd_pltfrm_resume NULL
|
|
#define ufshcd_pltfrm_runtime_suspend NULL
|
|
#define ufshcd_pltfrm_runtime_resume NULL
|
|
#define ufshcd_pltfrm_runtime_idle NULL
|
|
|
|
#endif /* CONFIG_PM */
|
|
|
|
#endif /* UFSHCD_PLTFRM_H_ */
|