@@ -4562,7 +4562,7 @@ static int ptp_ocp_dpll_direction_set(const struct dpll_pin *pin,
4562
4562
return - EOPNOTSUPP ;
4563
4563
mode = direction == DPLL_PIN_DIRECTION_INPUT ?
4564
4564
SMA_MODE_IN : SMA_MODE_OUT ;
4565
- return ptp_ocp_sma_store_val (bp , 0 , mode , sma_nr );
4565
+ return ptp_ocp_sma_store_val (bp , 0 , mode , sma_nr + 1 );
4566
4566
}
4567
4567
4568
4568
static int ptp_ocp_dpll_frequency_set (const struct dpll_pin * pin ,
@@ -4583,7 +4583,7 @@ static int ptp_ocp_dpll_frequency_set(const struct dpll_pin *pin,
4583
4583
tbl = bp -> sma_op -> tbl [sma -> mode ];
4584
4584
for (i = 0 ; tbl [i ].name ; i ++ )
4585
4585
if (tbl [i ].frequency == frequency )
4586
- return ptp_ocp_sma_store_val (bp , i , sma -> mode , sma_nr );
4586
+ return ptp_ocp_sma_store_val (bp , i , sma -> mode , sma_nr + 1 );
4587
4587
return - EINVAL ;
4588
4588
}
4589
4589
@@ -4600,7 +4600,7 @@ static int ptp_ocp_dpll_frequency_get(const struct dpll_pin *pin,
4600
4600
u32 val ;
4601
4601
int i ;
4602
4602
4603
- val = bp -> sma_op -> get (bp , sma_nr );
4603
+ val = bp -> sma_op -> get (bp , sma_nr + 1 );
4604
4604
tbl = bp -> sma_op -> tbl [sma -> mode ];
4605
4605
for (i = 0 ; tbl [i ].name ; i ++ )
4606
4606
if (val == tbl [i ].value ) {
0 commit comments