mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
vout: support vout meas ctrl [1/1]
PD#SWPL-237823 Problem: no vout meas ctrl Solution: add vout meas ctrl Verify: t6x Change-Id: I8ea8d204014893ad95654a6186ab71345c01846c Signed-off-by: congyang.huang <congyang.huang@amlogic.com>
This commit is contained in:
committed by
gerrit autosubmit
parent
864c11cb26
commit
13fef23744
@@ -1445,7 +1445,7 @@
|
||||
};
|
||||
|
||||
vout_mux: vout_mux {
|
||||
compatible = "amlogic, vout_mux-t6d";//use t6d
|
||||
compatible = "amlogic, vout_mux-t6x";
|
||||
status = "okay";
|
||||
clocks = <&clkc CLKID_FCLK_DIV5>, <&clkc CLKID_VDIN_MEAS>;
|
||||
clock-names = "fclk_div5", "vdin_meas_clk";
|
||||
|
||||
@@ -136,6 +136,24 @@ static unsigned int vout_vs_measure_dft(int index)
|
||||
return fr;
|
||||
}
|
||||
|
||||
static unsigned int vout_vs_measure_dft_t6x(int index)
|
||||
{
|
||||
unsigned int val, fr = 0;
|
||||
unsigned long long clk_msr;
|
||||
|
||||
if (index > 1)
|
||||
return 0;
|
||||
if (vout_vdo_meas_init == 0)
|
||||
return 0;
|
||||
|
||||
clk_msr = vdin_meas_clk_val;
|
||||
clk_msr *= 1000;
|
||||
val = vout_vcbus_read(VPU_VENC_RO_MEAS0);
|
||||
fr = vout_do_div(clk_msr, val);
|
||||
|
||||
return fr;
|
||||
}
|
||||
|
||||
static unsigned int vout_vs_measure_high_res_dft(int index)
|
||||
{
|
||||
unsigned int val[2], fr;
|
||||
@@ -500,6 +518,15 @@ static struct vout_mux_data_s vout_mux_match_data_txhd2 = {
|
||||
.clear_viu_mux = NULL,
|
||||
};
|
||||
|
||||
static struct vout_mux_data_s vout_mux_match_data_t6x = {
|
||||
.msr_clk = NULL,
|
||||
.vs_cnt_measure = vout_vs_cnt_measure_dft,
|
||||
.vs_measure = vout_vs_measure_dft_t6x,
|
||||
.msr_ctrl_init = vout_meas_ctrl_init_dft,
|
||||
.update_viu_mux = vout_viu_mux_update_default_txhd2,
|
||||
.clear_viu_mux = NULL,
|
||||
};
|
||||
|
||||
static struct vout_mux_data_s vout_mux_match_data_t7 = {
|
||||
.msr_clk = NULL,
|
||||
.vs_cnt_measure = vout_vs_cnt_measure_dft,
|
||||
@@ -595,6 +622,10 @@ static const struct of_device_id vout_mux_dt_match_table[] = {
|
||||
.compatible = "amlogic, vout_mux-t6w",
|
||||
.data = &vout_mux_match_data_txhd2,
|
||||
},
|
||||
{
|
||||
.compatible = "amlogic, vout_mux-t6x",
|
||||
.data = &vout_mux_match_data_t6x,
|
||||
},
|
||||
#endif
|
||||
{}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user