mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
V4L/DVB (11129): cx231xx: Use generic names for each device block
Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
b1196126b0
commit
ecc67d108d
File diff suppressed because it is too large
Load Diff
@ -883,7 +883,7 @@ int cx231xx_dev_init(struct cx231xx *dev)
|
|||||||
|
|
||||||
/* init hardware */
|
/* init hardware */
|
||||||
/* Note : with out calling set power mode function,
|
/* Note : with out calling set power mode function,
|
||||||
colibri can not be set up correctly */
|
afe can not be set up correctly */
|
||||||
errCode = cx231xx_set_power_mode(dev, POLARIS_AVMODE_ANALOGT_TV);
|
errCode = cx231xx_set_power_mode(dev, POLARIS_AVMODE_ANALOGT_TV);
|
||||||
if (errCode < 0) {
|
if (errCode < 0) {
|
||||||
cx231xx_errdev
|
cx231xx_errdev
|
||||||
@ -893,17 +893,17 @@ int cx231xx_dev_init(struct cx231xx *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* initialize Colibri block */
|
/* initialize Colibri block */
|
||||||
errCode = cx231xx_colibri_init_super_block(dev, 0x23c);
|
errCode = cx231xx_afe_init_super_block(dev, 0x23c);
|
||||||
if (errCode < 0) {
|
if (errCode < 0) {
|
||||||
cx231xx_errdev
|
cx231xx_errdev
|
||||||
("%s: cx231xx_colibri init super block - errCode [%d]!\n",
|
("%s: cx231xx_afe init super block - errCode [%d]!\n",
|
||||||
__func__, errCode);
|
__func__, errCode);
|
||||||
return errCode;
|
return errCode;
|
||||||
}
|
}
|
||||||
errCode = cx231xx_colibri_init_channels(dev);
|
errCode = cx231xx_afe_init_channels(dev);
|
||||||
if (errCode < 0) {
|
if (errCode < 0) {
|
||||||
cx231xx_errdev
|
cx231xx_errdev
|
||||||
("%s: cx231xx_colibri init channels - errCode [%d]!\n",
|
("%s: cx231xx_afe init channels - errCode [%d]!\n",
|
||||||
__func__, errCode);
|
__func__, errCode);
|
||||||
return errCode;
|
return errCode;
|
||||||
}
|
}
|
||||||
@ -917,11 +917,11 @@ int cx231xx_dev_init(struct cx231xx *dev)
|
|||||||
return errCode;
|
return errCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flatiron related functions */
|
/* I2S block related functions */
|
||||||
errCode = cx231xx_flatiron_initialize(dev);
|
errCode = cx231xx_i2s_blk_initialize(dev);
|
||||||
if (errCode < 0) {
|
if (errCode < 0) {
|
||||||
cx231xx_errdev
|
cx231xx_errdev
|
||||||
("%s: cx231xx_flatiron initialize - errCode [%d]!\n",
|
("%s: cx231xx_i2s block initialize - errCode [%d]!\n",
|
||||||
__func__, errCode);
|
__func__, errCode);
|
||||||
return errCode;
|
return errCode;
|
||||||
}
|
}
|
||||||
|
@ -91,10 +91,10 @@ enum TS_PORT{
|
|||||||
#define EAVP_MASK 0x8
|
#define EAVP_MASK 0x8
|
||||||
enum EAV_PRESENT{
|
enum EAV_PRESENT{
|
||||||
NO_EXTERNAL_AV = 0x0, /* 0: No External A/V inputs
|
NO_EXTERNAL_AV = 0x0, /* 0: No External A/V inputs
|
||||||
(no need for Flatiron),
|
(no need for i2s blcok),
|
||||||
Analog Tuner must be present */
|
Analog Tuner must be present */
|
||||||
EXTERNAL_AV = 0x8 /* 1: External A/V inputs
|
EXTERNAL_AV = 0x8 /* 1: External A/V inputs
|
||||||
present (requires Flatiron) */
|
present (requires i2s blk) */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ATM_MASK 0x30
|
#define ATM_MASK 0x30
|
||||||
@ -123,10 +123,6 @@ enum AVDEC_STATUS{
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define BO_1_MASK 0x100
|
#define BO_1_MASK 0x100
|
||||||
enum HAMMERHEAD__STATUS{
|
|
||||||
HAMMERHEAD_ONLY = 0x0, /* 0:Hammerhead Only */
|
|
||||||
HAMMERHEAD_SC = 0x100 /* 1:Hammerhead and SC */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define BUSPOWER_MASK 0xC4 /* for Polaris spec 0.8 */
|
#define BUSPOWER_MASK 0xC4 /* for Polaris spec 0.8 */
|
||||||
#define SELFPOWER_MASK 0x86
|
#define SELFPOWER_MASK 0x86
|
||||||
|
@ -1421,36 +1421,36 @@ static int vidioc_g_register(struct file *file, void *priv,
|
|||||||
reg->val = value[0] | value[1] << 8 |
|
reg->val = value[0] | value[1] << 8 |
|
||||||
value[2] << 16 | value[3] << 24;
|
value[2] << 16 | value[3] << 24;
|
||||||
break;
|
break;
|
||||||
case 1: /* Colibri - read byte */
|
case 1: /* AFE - read byte */
|
||||||
ret = cx231xx_read_i2c_data(dev, Colibri_DEVICE_ADDRESS,
|
ret = cx231xx_read_i2c_data(dev, AFE_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 2, &data, 1);
|
(u16)reg->reg, 2, &data, 1);
|
||||||
reg->val = le32_to_cpu(data & 0xff);
|
reg->val = le32_to_cpu(data & 0xff);
|
||||||
break;
|
break;
|
||||||
case 14: /* Colibri - read dword */
|
case 14: /* AFE - read dword */
|
||||||
ret = cx231xx_read_i2c_data(dev, Colibri_DEVICE_ADDRESS,
|
ret = cx231xx_read_i2c_data(dev, AFE_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 2, &data, 4);
|
(u16)reg->reg, 2, &data, 4);
|
||||||
reg->val = le32_to_cpu(data);
|
reg->val = le32_to_cpu(data);
|
||||||
break;
|
break;
|
||||||
case 2: /* Hammerhead - read byte */
|
case 2: /* Video Block - read byte */
|
||||||
ret = cx231xx_read_i2c_data(dev, HAMMERHEAD_I2C_ADDRESS,
|
ret = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
|
||||||
(u16)reg->reg, 2, &data, 1);
|
(u16)reg->reg, 2, &data, 1);
|
||||||
reg->val = le32_to_cpu(data & 0xff);
|
reg->val = le32_to_cpu(data & 0xff);
|
||||||
break;
|
break;
|
||||||
case 24: /* Hammerhead - read dword */
|
case 24: /* Video Block - read dword */
|
||||||
ret = cx231xx_read_i2c_data(dev, HAMMERHEAD_I2C_ADDRESS,
|
ret = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
|
||||||
(u16)reg->reg, 2, &data, 4);
|
(u16)reg->reg, 2, &data, 4);
|
||||||
reg->val = le32_to_cpu(data);
|
reg->val = le32_to_cpu(data);
|
||||||
break;
|
break;
|
||||||
case 3: /* flatiron - read byte */
|
case 3: /* I2S block - read byte */
|
||||||
ret = cx231xx_read_i2c_data(dev,
|
ret = cx231xx_read_i2c_data(dev,
|
||||||
Flatrion_DEVICE_ADDRESS,
|
I2S_BLK_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 1,
|
(u16)reg->reg, 1,
|
||||||
&data, 1);
|
&data, 1);
|
||||||
reg->val = le32_to_cpu(data & 0xff);
|
reg->val = le32_to_cpu(data & 0xff);
|
||||||
break;
|
break;
|
||||||
case 34: /* flatiron - read dword */
|
case 34: /* I2S Block - read dword */
|
||||||
ret =
|
ret =
|
||||||
cx231xx_read_i2c_data(dev, Flatrion_DEVICE_ADDRESS,
|
cx231xx_read_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 1, &data, 4);
|
(u16)reg->reg, 1, &data, 4);
|
||||||
reg->val = le32_to_cpu(data);
|
reg->val = le32_to_cpu(data);
|
||||||
break;
|
break;
|
||||||
@ -1503,43 +1503,43 @@ static int vidioc_s_register(struct file *file, void *priv,
|
|||||||
(u16)reg->reg, data,
|
(u16)reg->reg, data,
|
||||||
4);
|
4);
|
||||||
break;
|
break;
|
||||||
case 1: /* Colibri - read byte */
|
case 1: /* AFE - read byte */
|
||||||
ret = cx231xx_write_i2c_data(dev,
|
ret = cx231xx_write_i2c_data(dev,
|
||||||
Colibri_DEVICE_ADDRESS,
|
AFE_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 2,
|
(u16)reg->reg, 2,
|
||||||
value, 1);
|
value, 1);
|
||||||
break;
|
break;
|
||||||
case 14: /* Colibri - read dword */
|
case 14: /* AFE - read dword */
|
||||||
ret = cx231xx_write_i2c_data(dev,
|
ret = cx231xx_write_i2c_data(dev,
|
||||||
Colibri_DEVICE_ADDRESS,
|
AFE_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 2,
|
(u16)reg->reg, 2,
|
||||||
value, 4);
|
value, 4);
|
||||||
break;
|
break;
|
||||||
case 2: /* Hammerhead - read byte */
|
case 2: /* Video Block - read byte */
|
||||||
ret =
|
ret =
|
||||||
cx231xx_write_i2c_data(dev,
|
cx231xx_write_i2c_data(dev,
|
||||||
HAMMERHEAD_I2C_ADDRESS,
|
VID_BLK_I2C_ADDRESS,
|
||||||
(u16)reg->reg, 2,
|
(u16)reg->reg, 2,
|
||||||
value, 1);
|
value, 1);
|
||||||
break;
|
break;
|
||||||
case 24: /* Hammerhead - read dword */
|
case 24: /* Video Block - read dword */
|
||||||
ret =
|
ret =
|
||||||
cx231xx_write_i2c_data(dev,
|
cx231xx_write_i2c_data(dev,
|
||||||
HAMMERHEAD_I2C_ADDRESS,
|
VID_BLK_I2C_ADDRESS,
|
||||||
(u16)reg->reg, 2,
|
(u16)reg->reg, 2,
|
||||||
value, 4);
|
value, 4);
|
||||||
break;
|
break;
|
||||||
case 3: /* flatiron - read byte */
|
case 3: /* I2S block - read byte */
|
||||||
ret =
|
ret =
|
||||||
cx231xx_write_i2c_data(dev,
|
cx231xx_write_i2c_data(dev,
|
||||||
Flatrion_DEVICE_ADDRESS,
|
I2S_BLK_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 1,
|
(u16)reg->reg, 1,
|
||||||
value, 1);
|
value, 1);
|
||||||
break;
|
break;
|
||||||
case 34: /* flatiron - read dword */
|
case 34: /* I2S block - read dword */
|
||||||
ret =
|
ret =
|
||||||
cx231xx_write_i2c_data(dev,
|
cx231xx_write_i2c_data(dev,
|
||||||
Flatrion_DEVICE_ADDRESS,
|
I2S_BLK_DEVICE_ADDRESS,
|
||||||
(u16)reg->reg, 1,
|
(u16)reg->reg, 1,
|
||||||
value, 4);
|
value, 4);
|
||||||
break;
|
break;
|
||||||
|
@ -46,9 +46,9 @@
|
|||||||
#define PWR_SLEEP_INTERVAL 5
|
#define PWR_SLEEP_INTERVAL 5
|
||||||
|
|
||||||
/* I2C addresses for control block in Cx231xx */
|
/* I2C addresses for control block in Cx231xx */
|
||||||
#define Colibri_DEVICE_ADDRESS 0x60
|
#define AFE_DEVICE_ADDRESS 0x60
|
||||||
#define Flatrion_DEVICE_ADDRESS 0x98
|
#define I2S_BLK_DEVICE_ADDRESS 0x98
|
||||||
#define HAMMERHEAD_I2C_ADDRESS 0x88
|
#define VID_BLK_I2C_ADDRESS 0x88
|
||||||
#define DIF_USE_BASEBAND 0xFFFFFFFF
|
#define DIF_USE_BASEBAND 0xFFFFFFFF
|
||||||
|
|
||||||
/* Boards supported by driver */
|
/* Boards supported by driver */
|
||||||
@ -540,9 +540,9 @@ struct cx231xx {
|
|||||||
/* Power Modes */
|
/* Power Modes */
|
||||||
int power_mode;
|
int power_mode;
|
||||||
|
|
||||||
/* colibri parameters */
|
/* afe parameters */
|
||||||
enum AFE_MODE colibri_mode;
|
enum AFE_MODE afe_mode;
|
||||||
u32 colibri_ref_count;
|
u32 afe_ref_count;
|
||||||
|
|
||||||
/* video related parameters */
|
/* video related parameters */
|
||||||
u32 video_input;
|
u32 video_input;
|
||||||
@ -588,21 +588,21 @@ int cx231xx_read_modify_write_i2c_dword(struct cx231xx *dev, u8 dev_addr,
|
|||||||
u16 saddr, u32 mask, u32 value);
|
u16 saddr, u32 mask, u32 value);
|
||||||
u32 cx231xx_set_field(u32 field_mask, u32 data);
|
u32 cx231xx_set_field(u32 field_mask, u32 data);
|
||||||
|
|
||||||
/* Colibri related functions */
|
/* afe related functions */
|
||||||
int cx231xx_colibri_init_super_block(struct cx231xx *dev, u32 ref_count);
|
int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count);
|
||||||
int cx231xx_colibri_init_channels(struct cx231xx *dev);
|
int cx231xx_afe_init_channels(struct cx231xx *dev);
|
||||||
int cx231xx_colibri_setup_AFE_for_baseband(struct cx231xx *dev);
|
int cx231xx_afe_setup_AFE_for_baseband(struct cx231xx *dev);
|
||||||
int cx231xx_colibri_set_input_mux(struct cx231xx *dev, u32 input_mux);
|
int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux);
|
||||||
int cx231xx_colibri_set_mode(struct cx231xx *dev, enum AFE_MODE mode);
|
int cx231xx_afe_set_mode(struct cx231xx *dev, enum AFE_MODE mode);
|
||||||
int cx231xx_colibri_update_power_control(struct cx231xx *dev,
|
int cx231xx_afe_update_power_control(struct cx231xx *dev,
|
||||||
enum AV_MODE avmode);
|
enum AV_MODE avmode);
|
||||||
int cx231xx_colibri_adjust_ref_count(struct cx231xx *dev, u32 video_input);
|
int cx231xx_afe_adjust_ref_count(struct cx231xx *dev, u32 video_input);
|
||||||
|
|
||||||
/* flatiron related functions */
|
/* i2s block related functions */
|
||||||
int cx231xx_flatiron_initialize(struct cx231xx *dev);
|
int cx231xx_i2s_blk_initialize(struct cx231xx *dev);
|
||||||
int cx231xx_flatiron_update_power_control(struct cx231xx *dev,
|
int cx231xx_i2s_blk_update_power_control(struct cx231xx *dev,
|
||||||
enum AV_MODE avmode);
|
enum AV_MODE avmode);
|
||||||
int cx231xx_flatiron_set_audio_input(struct cx231xx *dev, u8 audio_input);
|
int cx231xx_i2s_blk_set_audio_input(struct cx231xx *dev, u8 audio_input);
|
||||||
|
|
||||||
/* DIF related functions */
|
/* DIF related functions */
|
||||||
int cx231xx_dif_configure_C2HH_for_low_IF(struct cx231xx *dev, u32 mode,
|
int cx231xx_dif_configure_C2HH_for_low_IF(struct cx231xx *dev, u32 mode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user