mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
video: rockchip: mpp: rename functions in mpp_hw_ops
mpp_hw_ops->power_on -> mpp_hw_ops->clk_on mpp_hw_ops->power_off -> mpp_hw_ops->clk_off Change-Id: I65a5eb27a4a65512caa7bc184b63e6ae43e98043 Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
@@ -185,16 +185,16 @@ int mpp_power_on(struct mpp_dev *mpp)
|
||||
pm_runtime_get_sync(mpp->dev);
|
||||
pm_stay_awake(mpp->dev);
|
||||
|
||||
if (mpp->hw_ops->power_on)
|
||||
mpp->hw_ops->power_on(mpp);
|
||||
if (mpp->hw_ops->clk_on)
|
||||
mpp->hw_ops->clk_on(mpp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mpp_power_off(struct mpp_dev *mpp)
|
||||
{
|
||||
if (mpp->hw_ops->power_off)
|
||||
mpp->hw_ops->power_off(mpp);
|
||||
if (mpp->hw_ops->clk_off)
|
||||
mpp->hw_ops->clk_off(mpp);
|
||||
|
||||
pm_runtime_mark_last_busy(mpp->dev);
|
||||
pm_runtime_put_autosuspend(mpp->dev);
|
||||
@@ -1626,12 +1626,12 @@ int mpp_dev_probe(struct mpp_dev *mpp,
|
||||
|
||||
/* read hardware id */
|
||||
if (hw_info->reg_id >= 0) {
|
||||
if (mpp->hw_ops->power_on)
|
||||
mpp->hw_ops->power_on(mpp);
|
||||
if (mpp->hw_ops->clk_on)
|
||||
mpp->hw_ops->clk_on(mpp);
|
||||
|
||||
hw_info->hw_id = mpp_read(mpp, hw_info->reg_id);
|
||||
if (mpp->hw_ops->power_off)
|
||||
mpp->hw_ops->power_off(mpp);
|
||||
if (mpp->hw_ops->clk_off)
|
||||
mpp->hw_ops->clk_off(mpp);
|
||||
}
|
||||
|
||||
pm_runtime_put_sync(dev);
|
||||
@@ -1850,7 +1850,7 @@ int px30_workaround_combo_switch_grf(struct mpp_dev *mpp)
|
||||
pd_is_on = rockchip_pmu_pd_is_on(mpp->dev);
|
||||
if (!pd_is_on)
|
||||
rockchip_pmu_pd_on(mpp->dev);
|
||||
mpp->hw_ops->power_on(mpp);
|
||||
mpp->hw_ops->clk_on(mpp);
|
||||
|
||||
list_for_each_entry_safe(loop, n, &mpp->queue->mmu_list, link) {
|
||||
/* update iommu parameters */
|
||||
@@ -1863,7 +1863,7 @@ int px30_workaround_combo_switch_grf(struct mpp_dev *mpp)
|
||||
/* enable current iommu */
|
||||
ret = mpp_iommu_enable(mpp->iommu_info->iommu);
|
||||
|
||||
mpp->hw_ops->power_off(mpp);
|
||||
mpp->hw_ops->clk_off(mpp);
|
||||
if (!pd_is_on)
|
||||
rockchip_pmu_pd_off(mpp->dev);
|
||||
|
||||
|
||||
@@ -333,8 +333,8 @@ struct mpp_service {
|
||||
* struct mpp_hw_ops - context specific operations for device
|
||||
* @init Do something when hardware probe.
|
||||
* @exit Do something when hardware remove.
|
||||
* @power_on Get pm and enable clks.
|
||||
* @power_off Put pm and disable clks.
|
||||
* @clk_on Enable clocks.
|
||||
* @clk_off Disable clocks.
|
||||
* @get_freq Get special freq for setting.
|
||||
* @set_freq Set freq to hardware.
|
||||
* @reduce_freq Reduce freq when hardware is not running.
|
||||
@@ -343,8 +343,8 @@ struct mpp_service {
|
||||
struct mpp_hw_ops {
|
||||
int (*init)(struct mpp_dev *mpp);
|
||||
int (*exit)(struct mpp_dev *mpp);
|
||||
int (*power_on)(struct mpp_dev *mpp);
|
||||
int (*power_off)(struct mpp_dev *mpp);
|
||||
int (*clk_on)(struct mpp_dev *mpp);
|
||||
int (*clk_off)(struct mpp_dev *mpp);
|
||||
int (*get_freq)(struct mpp_dev *mpp,
|
||||
struct mpp_task *mpp_task);
|
||||
int (*set_freq)(struct mpp_dev *mpp,
|
||||
|
||||
@@ -851,7 +851,7 @@ static int iep2_init(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iep2_power_on(struct mpp_dev *mpp)
|
||||
static int iep2_clk_on(struct mpp_dev *mpp)
|
||||
{
|
||||
struct iep2_dev *iep = to_iep2_dev(mpp);
|
||||
|
||||
@@ -865,7 +865,7 @@ static int iep2_power_on(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iep2_power_off(struct mpp_dev *mpp)
|
||||
static int iep2_clk_off(struct mpp_dev *mpp)
|
||||
{
|
||||
struct iep2_dev *iep = to_iep2_dev(mpp);
|
||||
|
||||
@@ -936,8 +936,8 @@ static int iep2_reset(struct mpp_dev *mpp)
|
||||
|
||||
static struct mpp_hw_ops iep_v2_hw_ops = {
|
||||
.init = iep2_init,
|
||||
.power_on = iep2_power_on,
|
||||
.power_off = iep2_power_off,
|
||||
.clk_on = iep2_clk_on,
|
||||
.clk_off = iep2_clk_off,
|
||||
.get_freq = iep2_get_freq,
|
||||
.set_freq = iep2_set_freq,
|
||||
.reduce_freq = iep2_reduce_freq,
|
||||
|
||||
@@ -1389,7 +1389,7 @@ static int rkvdec_3328_exit(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rkvdec_power_on(struct mpp_dev *mpp)
|
||||
static int rkvdec_clk_on(struct mpp_dev *mpp)
|
||||
{
|
||||
struct rkvdec_dev *dec = to_rkvdec_dev(mpp);
|
||||
|
||||
@@ -1405,7 +1405,7 @@ static int rkvdec_power_on(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rkvdec_power_off(struct mpp_dev *mpp)
|
||||
static int rkvdec_clk_off(struct mpp_dev *mpp)
|
||||
{
|
||||
struct rkvdec_dev *dec = to_rkvdec_dev(mpp);
|
||||
|
||||
@@ -1612,8 +1612,8 @@ static int rkvdec_sip_reset(struct mpp_dev *mpp)
|
||||
|
||||
static struct mpp_hw_ops rkvdec_v1_hw_ops = {
|
||||
.init = rkvdec_init,
|
||||
.power_on = rkvdec_power_on,
|
||||
.power_off = rkvdec_power_off,
|
||||
.clk_on = rkvdec_clk_on,
|
||||
.clk_off = rkvdec_clk_off,
|
||||
.get_freq = rkvdec_get_freq,
|
||||
.set_freq = rkvdec_set_freq,
|
||||
.reduce_freq = rkvdec_reduce_freq,
|
||||
@@ -1622,8 +1622,8 @@ static struct mpp_hw_ops rkvdec_v1_hw_ops = {
|
||||
|
||||
static struct mpp_hw_ops rkvdec_px30_hw_ops = {
|
||||
.init = rkvdec_px30_init,
|
||||
.power_on = rkvdec_power_on,
|
||||
.power_off = rkvdec_power_off,
|
||||
.clk_on = rkvdec_clk_on,
|
||||
.clk_off = rkvdec_clk_off,
|
||||
.get_freq = rkvdec_get_freq,
|
||||
.set_freq = rkvdec_set_freq,
|
||||
.reduce_freq = rkvdec_reduce_freq,
|
||||
@@ -1633,8 +1633,8 @@ static struct mpp_hw_ops rkvdec_px30_hw_ops = {
|
||||
|
||||
static struct mpp_hw_ops rkvdec_3399_hw_ops = {
|
||||
.init = rkvdec_init,
|
||||
.power_on = rkvdec_power_on,
|
||||
.power_off = rkvdec_power_off,
|
||||
.clk_on = rkvdec_clk_on,
|
||||
.clk_off = rkvdec_clk_off,
|
||||
.get_freq = rkvdec_get_freq,
|
||||
.set_freq = rkvdec_set_freq,
|
||||
.reduce_freq = rkvdec_reduce_freq,
|
||||
@@ -1643,8 +1643,8 @@ static struct mpp_hw_ops rkvdec_3399_hw_ops = {
|
||||
|
||||
static struct mpp_hw_ops rkvdec_3368_hw_ops = {
|
||||
.init = rkvdec_init,
|
||||
.power_on = rkvdec_power_on,
|
||||
.power_off = rkvdec_power_off,
|
||||
.clk_on = rkvdec_clk_on,
|
||||
.clk_off = rkvdec_clk_off,
|
||||
.get_freq = rkvdec_3368_get_freq,
|
||||
.set_freq = rkvdec_set_freq,
|
||||
.reduce_freq = rkvdec_reduce_freq,
|
||||
@@ -1664,8 +1664,8 @@ static struct mpp_dev_ops rkvdec_v1_dev_ops = {
|
||||
static struct mpp_hw_ops rkvdec_3328_hw_ops = {
|
||||
.init = rkvdec_3328_init,
|
||||
.exit = rkvdec_3328_exit,
|
||||
.power_on = rkvdec_power_on,
|
||||
.power_off = rkvdec_power_off,
|
||||
.clk_on = rkvdec_clk_on,
|
||||
.clk_off = rkvdec_clk_off,
|
||||
.get_freq = rkvdec_3328_get_freq,
|
||||
.set_freq = rkvdec_set_freq,
|
||||
.reduce_freq = rkvdec_reduce_freq,
|
||||
|
||||
@@ -947,7 +947,7 @@ static int rkvenc_reset(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rkvenc_power_on(struct mpp_dev *mpp)
|
||||
static int rkvenc_clk_on(struct mpp_dev *mpp)
|
||||
{
|
||||
struct rkvenc_dev *enc = to_rkvenc_dev(mpp);
|
||||
|
||||
@@ -961,7 +961,7 @@ static int rkvenc_power_on(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rkvenc_power_off(struct mpp_dev *mpp)
|
||||
static int rkvenc_clk_off(struct mpp_dev *mpp)
|
||||
{
|
||||
struct rkvenc_dev *enc = to_rkvenc_dev(mpp);
|
||||
|
||||
@@ -1027,8 +1027,8 @@ static int rkvenc_set_freq(struct mpp_dev *mpp,
|
||||
static struct mpp_hw_ops rkvenc_hw_ops = {
|
||||
.init = rkvenc_init,
|
||||
.exit = rkvenc_exit,
|
||||
.power_on = rkvenc_power_on,
|
||||
.power_off = rkvenc_power_off,
|
||||
.clk_on = rkvenc_clk_on,
|
||||
.clk_off = rkvenc_clk_off,
|
||||
.get_freq = rkvenc_get_freq,
|
||||
.set_freq = rkvenc_set_freq,
|
||||
.reset = rkvenc_reset,
|
||||
|
||||
@@ -561,7 +561,7 @@ static int vdpu_init(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vdpu_power_on(struct mpp_dev *mpp)
|
||||
static int vdpu_clk_on(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vdpu_dev *dec = to_vdpu_dev(mpp);
|
||||
|
||||
@@ -573,7 +573,7 @@ static int vdpu_power_on(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vdpu_power_off(struct mpp_dev *mpp)
|
||||
static int vdpu_clk_off(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vdpu_dev *dec = to_vdpu_dev(mpp);
|
||||
|
||||
@@ -737,8 +737,8 @@ static int vdpu_reset(struct mpp_dev *mpp)
|
||||
|
||||
static struct mpp_hw_ops vdpu_v1_hw_ops = {
|
||||
.init = vdpu_init,
|
||||
.power_on = vdpu_power_on,
|
||||
.power_off = vdpu_power_off,
|
||||
.clk_on = vdpu_clk_on,
|
||||
.clk_off = vdpu_clk_off,
|
||||
.get_freq = vdpu_get_freq,
|
||||
.set_freq = vdpu_set_freq,
|
||||
.reduce_freq = vdpu_reduce_freq,
|
||||
@@ -747,8 +747,8 @@ static struct mpp_hw_ops vdpu_v1_hw_ops = {
|
||||
|
||||
static struct mpp_hw_ops vdpu_3288_hw_ops = {
|
||||
.init = vdpu_init,
|
||||
.power_on = vdpu_power_on,
|
||||
.power_off = vdpu_power_off,
|
||||
.clk_on = vdpu_clk_on,
|
||||
.clk_off = vdpu_clk_off,
|
||||
.get_freq = vdpu_3288_get_freq,
|
||||
.set_freq = vdpu_set_freq,
|
||||
.reduce_freq = vdpu_reduce_freq,
|
||||
@@ -757,8 +757,8 @@ static struct mpp_hw_ops vdpu_3288_hw_ops = {
|
||||
|
||||
static struct mpp_hw_ops vdpu_3368_hw_ops = {
|
||||
.init = vdpu_init,
|
||||
.power_on = vdpu_power_on,
|
||||
.power_off = vdpu_power_off,
|
||||
.clk_on = vdpu_clk_on,
|
||||
.clk_off = vdpu_clk_off,
|
||||
.get_freq = vdpu_3368_get_freq,
|
||||
.set_freq = vdpu_set_freq,
|
||||
.reduce_freq = vdpu_reduce_freq,
|
||||
|
||||
@@ -519,7 +519,7 @@ static int vdpu_px30_init(struct mpp_dev *mpp)
|
||||
return px30_workaround_combo_init(mpp);
|
||||
}
|
||||
|
||||
static int vdpu_power_on(struct mpp_dev *mpp)
|
||||
static int vdpu_clk_on(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vdpu_dev *dec = to_vdpu_dev(mpp);
|
||||
|
||||
@@ -531,7 +531,7 @@ static int vdpu_power_on(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vdpu_power_off(struct mpp_dev *mpp)
|
||||
static int vdpu_clk_off(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vdpu_dev *dec = to_vdpu_dev(mpp);
|
||||
|
||||
@@ -647,8 +647,8 @@ static int vdpu_reset(struct mpp_dev *mpp)
|
||||
|
||||
static struct mpp_hw_ops vdpu_v2_hw_ops = {
|
||||
.init = vdpu_init,
|
||||
.power_on = vdpu_power_on,
|
||||
.power_off = vdpu_power_off,
|
||||
.clk_on = vdpu_clk_on,
|
||||
.clk_off = vdpu_clk_off,
|
||||
.get_freq = vdpu_get_freq,
|
||||
.set_freq = vdpu_set_freq,
|
||||
.reduce_freq = vdpu_reduce_freq,
|
||||
@@ -657,8 +657,8 @@ static struct mpp_hw_ops vdpu_v2_hw_ops = {
|
||||
|
||||
static struct mpp_hw_ops vdpu_px30_hw_ops = {
|
||||
.init = vdpu_px30_init,
|
||||
.power_on = vdpu_power_on,
|
||||
.power_off = vdpu_power_off,
|
||||
.clk_on = vdpu_clk_on,
|
||||
.clk_off = vdpu_clk_off,
|
||||
.get_freq = vdpu_get_freq,
|
||||
.set_freq = vdpu_set_freq,
|
||||
.reduce_freq = vdpu_reduce_freq,
|
||||
|
||||
@@ -467,7 +467,7 @@ static int vepu_init(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vepu_power_on(struct mpp_dev *mpp)
|
||||
static int vepu_clk_on(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vepu_dev *enc = to_vepu_dev(mpp);
|
||||
|
||||
@@ -479,7 +479,7 @@ static int vepu_power_on(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vepu_power_off(struct mpp_dev *mpp)
|
||||
static int vepu_clk_off(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vepu_dev *enc = to_vepu_dev(mpp);
|
||||
|
||||
@@ -547,8 +547,8 @@ static int vepu_reset(struct mpp_dev *mpp)
|
||||
|
||||
static struct mpp_hw_ops vepu_v1_hw_ops = {
|
||||
.init = vepu_init,
|
||||
.power_on = vepu_power_on,
|
||||
.power_off = vepu_power_off,
|
||||
.clk_on = vepu_clk_on,
|
||||
.clk_off = vepu_clk_off,
|
||||
.get_freq = vepu_get_freq,
|
||||
.set_freq = vepu_set_freq,
|
||||
.reduce_freq = vepu_reduce_freq,
|
||||
|
||||
@@ -484,7 +484,7 @@ static int vepu_px30_init(struct mpp_dev *mpp)
|
||||
return px30_workaround_combo_init(mpp);
|
||||
}
|
||||
|
||||
static int vepu_power_on(struct mpp_dev *mpp)
|
||||
static int vepu_clk_on(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vepu_dev *enc = to_vepu_dev(mpp);
|
||||
|
||||
@@ -496,7 +496,7 @@ static int vepu_power_on(struct mpp_dev *mpp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vepu_power_off(struct mpp_dev *mpp)
|
||||
static int vepu_clk_off(struct mpp_dev *mpp)
|
||||
{
|
||||
struct vepu_dev *enc = to_vepu_dev(mpp);
|
||||
|
||||
@@ -564,8 +564,8 @@ static int vepu_reset(struct mpp_dev *mpp)
|
||||
|
||||
static struct mpp_hw_ops vepu_v2_hw_ops = {
|
||||
.init = vepu_init,
|
||||
.power_on = vepu_power_on,
|
||||
.power_off = vepu_power_off,
|
||||
.clk_on = vepu_clk_on,
|
||||
.clk_off = vepu_clk_off,
|
||||
.get_freq = vepu_get_freq,
|
||||
.set_freq = vepu_set_freq,
|
||||
.reduce_freq = vepu_reduce_freq,
|
||||
@@ -574,8 +574,8 @@ static struct mpp_hw_ops vepu_v2_hw_ops = {
|
||||
|
||||
static struct mpp_hw_ops vepu_px30_hw_ops = {
|
||||
.init = vepu_px30_init,
|
||||
.power_on = vepu_power_on,
|
||||
.power_off = vepu_power_off,
|
||||
.clk_on = vepu_clk_on,
|
||||
.clk_off = vepu_clk_off,
|
||||
.get_freq = vepu_get_freq,
|
||||
.set_freq = vepu_set_freq,
|
||||
.reduce_freq = vepu_reduce_freq,
|
||||
|
||||
Reference in New Issue
Block a user