Skip to content

Commit

Permalink
Rev minor versions
Browse files Browse the repository at this point in the history
Whitespace cleanup
  • Loading branch information
Tom Richardson committed Jun 24, 2020
1 parent ce23497 commit 3bfb2d8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 38 deletions.
3 changes: 1 addition & 2 deletions availink/avl62x1/avl62x1_top.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status)

safe_mutex_unlock(&i2cctl_fe_mutex);

if (!r && lock == avl62x1_status_locked)
if (!r && lock == avl62x1_status_locked)
{
*status = FE_HAS_SIGNAL | FE_HAS_CARRIER |
FE_HAS_VITERBI | FE_HAS_SYNC |
Expand All @@ -908,7 +908,6 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status)
*status = FE_HAS_SIGNAL;
}


return r;
}

Expand Down
2 changes: 1 addition & 1 deletion availink/avl62x1/sdk_src/avl62x1_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//build number = increment on every change to implementation
#define AVL62X1_VER_MAJOR 3
#define AVL62X1_VER_MINOR 8
#define AVL62X1_VER_BUILD 2
#define AVL62X1_VER_BUILD 3

#define AVL62X1_CHIP_ID 0x62615ca8

Expand Down
76 changes: 42 additions & 34 deletions availink/avl68x2/avl68x2_top.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,37 +185,42 @@ static long i2cctl_dev_ioctl(struct file *file, unsigned int cmd, unsigned long
if (_IOC_NR(cmd) > I2CCTL_IOC_MAXNR)
return -ENOTTY;


req = (struct i2cctl_ioctl_lock_req *)arg;

switch (cmd)
{
case I2CCTL_IOCLOCK:
if(req->demod) {
mutex_lock(&i2cctl_fe_mutex);
p_debug_lvl(4,"locked demod");
if (req->demod)
{
mutex_lock(&i2cctl_fe_mutex);
p_debug_lvl(4, "locked demod");
}
if(req->tuner) {
mutex_lock(&i2cctl_tuneri2c_mutex);
p_debug_lvl(4,"locked tuner");
if (req->tuner)
{
mutex_lock(&i2cctl_tuneri2c_mutex);
p_debug_lvl(4, "locked tuner");
}
break;
case I2CCTL_IOCUNLOCK:
if(req->demod) {
if(mutex_is_locked(&i2cctl_fe_mutex)) {
mutex_unlock(&i2cctl_fe_mutex);
p_debug_lvl(4,"unlocked demod");
}
if (req->demod)
{
if (mutex_is_locked(&i2cctl_fe_mutex))
{
mutex_unlock(&i2cctl_fe_mutex);
p_debug_lvl(4, "unlocked demod");
}
}
if(req->tuner) {
if(mutex_is_locked(&i2cctl_tuneri2c_mutex)) {
mutex_unlock(&i2cctl_tuneri2c_mutex);
p_debug_lvl(4,"unlocked tuner");
}
if (req->tuner)
{
if (mutex_is_locked(&i2cctl_tuneri2c_mutex))
{
mutex_unlock(&i2cctl_tuneri2c_mutex);
p_debug_lvl(4, "unlocked tuner");
}
}
break;
default: /* redundant, as cmd was checked against MAXNR */
p_error("Unknown IOCTL %d",cmd);
p_error("Unknown IOCTL %d", cmd);
return -ENOTTY;
}

Expand Down Expand Up @@ -366,7 +371,7 @@ static int diseqc_set_voltage(
p_debug("voltage 18");
break;
default:
safe_mutex_unlock(&i2cctl_fe_mutex);
safe_mutex_unlock(&i2cctl_fe_mutex);
return -EINVAL;
}
ret = avl68x2_demod_set_gpio(AVL_Pin37, pwr, priv->chip);
Expand All @@ -386,7 +391,7 @@ static int avl68x2_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)

if (enable)
{
mutex_lock(&i2cctl_tuneri2c_mutex);
mutex_lock(&i2cctl_tuneri2c_mutex);
ret = avl68x2_demod_i2c_passthru_on(priv->chip);
}
else
Expand Down Expand Up @@ -1264,43 +1269,46 @@ static int avl68x2_read_status(struct dvb_frontend *fe, enum fe_status *status)
(priv->chip->chip_pub->i2c_addr >> AVL_DEMOD_ID_SHIFT) &
AVL_DEMOD_ID_MASK;

if(bs_states[demod_id].bs_mode) {
if(bs_states[demod_id].info.progress == 100)
if (bs_states[demod_id].bs_mode)
{
if (bs_states[demod_id].info.progress == 100)
*status = FE_HAS_LOCK;
else
*status = FE_NONE;
return AVL_EC_OK;
}

mutex_lock(&i2cctl_fe_mutex);

ret = avl68x2_demod_get_lock_status(&lock, priv->chip);

if(debug > 1) {
ret |= avl68x2_demod_get_snr (&SNR_x100db, priv->chip);
ret = (int)avl68x2_demod_get_per(&ber, priv->chip);
printk("read status %d, snr = %d, per = %d\n",*status, SNR_x100db, ber);
if (debug > 1)
{
ret |= avl68x2_demod_get_snr(&SNR_x100db, priv->chip);
ret = (int)avl68x2_demod_get_per(&ber, priv->chip);
printk("read status %d, snr = %d, per = %d\n",
*status, SNR_x100db, ber);
}

safe_mutex_unlock(&i2cctl_fe_mutex);
if (!ret && lock == AVL_STATUS_LOCK)

if (!ret && lock == AVL_STATUS_LOCK)
{
*status = FE_HAS_SIGNAL | FE_HAS_CARRIER |
FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK;
ret |= get_frontend(fe, &fe->dtv_property_cache);
avl68x2_set_lock_led(fe,1);
avl68x2_set_lock_led(fe, 1);
}
else
{
*status = FE_HAS_SIGNAL;
avl68x2_set_lock_led(fe,0);
avl68x2_set_lock_led(fe, 0);
}


#if INCLUDE_STDOUT
if(debug > 2) {
printk("%s",read_stdout(fe));
if (debug > 2)
{
printk("%s", read_stdout(fe));
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion availink/avl68x2/sdk_src/avl68x2_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//build number = increment on every change to implementation
#define AVL68X2_VER_MAJOR 2
#define AVL68X2_VER_MINOR 19
#define AVL68X2_VER_BUILD 1
#define AVL68X2_VER_BUILD 2

#define AVL68XX 0x68624955

Expand Down

0 comments on commit 3bfb2d8

Please sign in to comment.