mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
97fb5e8d9b
Based on 1 normalized pattern(s): 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 294 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
54 lines
1.7 KiB
C
54 lines
1.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef UFSHCD_PLTFRM_H_
|
|
#define UFSHCD_PLTFRM_H_
|
|
|
|
#include "ufshcd.h"
|
|
|
|
#define UFS_PWM_MODE 1
|
|
#define UFS_HS_MODE 2
|
|
|
|
struct ufs_dev_params {
|
|
u32 pwm_rx_gear; /* pwm rx gear to work in */
|
|
u32 pwm_tx_gear; /* pwm tx gear to work in */
|
|
u32 hs_rx_gear; /* hs rx gear to work in */
|
|
u32 hs_tx_gear; /* hs tx gear to work in */
|
|
u32 rx_lanes; /* number of rx lanes */
|
|
u32 tx_lanes; /* number of tx lanes */
|
|
u32 rx_pwr_pwm; /* rx pwm working pwr */
|
|
u32 tx_pwr_pwm; /* tx pwm working pwr */
|
|
u32 rx_pwr_hs; /* rx hs working pwr */
|
|
u32 tx_pwr_hs; /* tx hs working pwr */
|
|
u32 hs_rate; /* rate A/B to work in HS */
|
|
u32 desired_working_mode;
|
|
};
|
|
|
|
int ufshcd_get_pwr_dev_param(struct ufs_dev_params *dev_param,
|
|
struct ufs_pa_layer_attr *dev_max,
|
|
struct ufs_pa_layer_attr *agreed_pwr);
|
|
int ufshcd_pltfrm_init(struct platform_device *pdev,
|
|
const 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_ */
|