Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ch7006_priv.h File Reference
#include <drm/drmP.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_encoder_slave.h>
#include <drm/i2c/ch7006.h>

Go to the source code of this file.

Data Structures

struct  ch7006_tv_norm_info
 
struct  ch7006_mode
 
struct  ch7006_state
 
struct  ch7006_priv
 

Macros

#define fixed1   (1LL << 32)
 
#define to_ch7006_priv(x)   ((struct ch7006_priv *)to_encoder_slave(x)->slave_priv)
 
#define ch7006_dbg(client, format,...)
 
#define ch7006_info(client, format,...)   dev_info(&client->dev, format, __VA_ARGS__)
 
#define ch7006_err(client, format,...)   dev_err(&client->dev, format, __VA_ARGS__)
 
#define __mask(src, bitfield)   (((2 << (1 ? bitfield)) - 1) & ~((1 << (0 ? bitfield)) - 1))
 
#define mask(bitfield)   __mask(bitfield)
 
#define __bitf(src, bitfield, x)   (((x) >> (src) << (0 ? bitfield)) & __mask(src, bitfield))
 
#define bitf(bitfield, x)   __bitf(bitfield, x)
 
#define bitfs(bitfield, s)   __bitf(bitfield, bitfield##_##s)
 
#define setbitf(state, reg, bitfield, x)
 
#define __unbitf(src, bitfield, x)   ((x & __mask(src, bitfield)) >> (0 ? bitfield) << (src))
 
#define unbitf(bitfield, x)   __unbitf(bitfield, x)
 
#define ch7006_load_reg(client, state, reg)   ch7006_write(client, reg, state->regs[reg])
 
#define ch7006_save_reg(client, state, reg)   state->regs[reg] = ch7006_read(client, reg)
 
#define CH7006_FREQ0   14318
 
#define CH7006_MAXN   650
 
#define CH7006_MAXM   315
 
#define CH7006_DISPMODE   0x00
 
#define CH7006_DISPMODE_INPUT_RES   0, 7:5
 
#define CH7006_DISPMODE_INPUT_RES_512x384   0x0
 
#define CH7006_DISPMODE_INPUT_RES_720x400   0x1
 
#define CH7006_DISPMODE_INPUT_RES_640x400   0x2
 
#define CH7006_DISPMODE_INPUT_RES_640x480   0x3
 
#define CH7006_DISPMODE_INPUT_RES_800x600   0x4
 
#define CH7006_DISPMODE_INPUT_RES_NATIVE   0x5
 
#define CH7006_DISPMODE_OUTPUT_STD   0, 4:3
 
#define CH7006_DISPMODE_OUTPUT_STD_PAL   0x0
 
#define CH7006_DISPMODE_OUTPUT_STD_NTSC   0x1
 
#define CH7006_DISPMODE_OUTPUT_STD_PAL_M   0x2
 
#define CH7006_DISPMODE_OUTPUT_STD_NTSC_J   0x3
 
#define CH7006_DISPMODE_SCALING_RATIO   0, 2:0
 
#define CH7006_DISPMODE_SCALING_RATIO_5_4   0x0
 
#define CH7006_DISPMODE_SCALING_RATIO_1_1   0x1
 
#define CH7006_DISPMODE_SCALING_RATIO_7_8   0x2
 
#define CH7006_DISPMODE_SCALING_RATIO_5_6   0x3
 
#define CH7006_DISPMODE_SCALING_RATIO_3_4   0x4
 
#define CH7006_DISPMODE_SCALING_RATIO_7_10   0x5
 
#define CH7006_FFILTER   0x01
 
#define CH7006_FFILTER_TEXT   0, 5:4
 
#define CH7006_FFILTER_LUMA   0, 3:2
 
#define CH7006_FFILTER_CHROMA   0, 1:0
 
#define CH7006_FFILTER_CHROMA_NO_DCRAWL   0x3
 
#define CH7006_BWIDTH   0x03
 
#define CH7006_BWIDTH_5L_FFILER   (1 << 7)
 
#define CH7006_BWIDTH_CVBS_NO_CHROMA   (1 << 6)
 
#define CH7006_BWIDTH_CHROMA   0, 5:4
 
#define CH7006_BWIDTH_SVIDEO_YPEAK   (1 << 3)
 
#define CH7006_BWIDTH_SVIDEO_LUMA   0, 2:1
 
#define CH7006_BWIDTH_CVBS_LUMA   0, 0:0
 
#define CH7006_INPUT_FORMAT   0x04
 
#define CH7006_INPUT_FORMAT_DAC_GAIN   (1 << 6)
 
#define CH7006_INPUT_FORMAT_RGB_PASS_THROUGH   (1 << 5)
 
#define CH7006_INPUT_FORMAT_FORMAT   0, 3:0
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB16   0x0
 
#define CH7006_INPUT_FORMAT_FORMAT_YCrCb24m16   0x1
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB24m16   0x2
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB15   0x3
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB24m12C   0x4
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB24m12I   0x5
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB24m8   0x6
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB16m8   0x7
 
#define CH7006_INPUT_FORMAT_FORMAT_RGB15m8   0x8
 
#define CH7006_INPUT_FORMAT_FORMAT_YCrCb24m8   0x9
 
#define CH7006_CLKMODE   0x06
 
#define CH7006_CLKMODE_SUBC_LOCK   (1 << 7)
 
#define CH7006_CLKMODE_MASTER   (1 << 6)
 
#define CH7006_CLKMODE_POS_EDGE   (1 << 4)
 
#define CH7006_CLKMODE_XCM   0, 3:2
 
#define CH7006_CLKMODE_PCM   0, 1:0
 
#define CH7006_START_ACTIVE   0x07
 
#define CH7006_START_ACTIVE_0   0, 7:0
 
#define CH7006_POV   0x08
 
#define CH7006_POV_START_ACTIVE_8   8, 2:2
 
#define CH7006_POV_HPOS_8   8, 1:1
 
#define CH7006_POV_VPOS_8   8, 0:0
 
#define CH7006_BLACK_LEVEL   0x09
 
#define CH7006_BLACK_LEVEL_0   0, 7:0
 
#define CH7006_HPOS   0x0a
 
#define CH7006_HPOS_0   0, 7:0
 
#define CH7006_VPOS   0x0b
 
#define CH7006_VPOS_0   0, 7:0
 
#define CH7006_INPUT_SYNC   0x0d
 
#define CH7006_INPUT_SYNC_EMBEDDED   (1 << 3)
 
#define CH7006_INPUT_SYNC_OUTPUT   (1 << 2)
 
#define CH7006_INPUT_SYNC_PVSYNC   (1 << 1)
 
#define CH7006_INPUT_SYNC_PHSYNC   (1 << 0)
 
#define CH7006_POWER   0x0e
 
#define CH7006_POWER_SCART   (1 << 4)
 
#define CH7006_POWER_RESET   (1 << 3)
 
#define CH7006_POWER_LEVEL   0, 2:0
 
#define CH7006_POWER_LEVEL_CVBS_OFF   0x0
 
#define CH7006_POWER_LEVEL_POWER_OFF   0x1
 
#define CH7006_POWER_LEVEL_SVIDEO_OFF   0x2
 
#define CH7006_POWER_LEVEL_NORMAL   0x3
 
#define CH7006_POWER_LEVEL_FULL_POWER_OFF   0x4
 
#define CH7006_DETECT   0x10
 
#define CH7006_DETECT_SVIDEO_Y_TEST   (1 << 3)
 
#define CH7006_DETECT_SVIDEO_C_TEST   (1 << 2)
 
#define CH7006_DETECT_CVBS_TEST   (1 << 1)
 
#define CH7006_DETECT_SENSE   (1 << 0)
 
#define CH7006_CONTRAST   0x11
 
#define CH7006_CONTRAST_0   0, 2:0
 
#define CH7006_PLLOV   0x13
 
#define CH7006_PLLOV_N_8   8, 2:1
 
#define CH7006_PLLOV_M_8   8, 0:0
 
#define CH7006_PLLM   0x14
 
#define CH7006_PLLM_0   0, 7:0
 
#define CH7006_PLLN   0x15
 
#define CH7006_PLLN_0   0, 7:0
 
#define CH7006_BCLKOUT   0x17
 
#define CH7006_SUBC_INC0   0x18
 
#define CH7006_SUBC_INC0_28   28, 3:0
 
#define CH7006_SUBC_INC1   0x19
 
#define CH7006_SUBC_INC1_24   24, 3:0
 
#define CH7006_SUBC_INC2   0x1a
 
#define CH7006_SUBC_INC2_20   20, 3:0
 
#define CH7006_SUBC_INC3   0x1b
 
#define CH7006_SUBC_INC3_GPIO1_VAL   (1 << 7)
 
#define CH7006_SUBC_INC3_GPIO0_VAL   (1 << 6)
 
#define CH7006_SUBC_INC3_POUT_3_3V   (1 << 5)
 
#define CH7006_SUBC_INC3_POUT_INV   (1 << 4)
 
#define CH7006_SUBC_INC3_16   16, 3:0
 
#define CH7006_SUBC_INC4   0x1c
 
#define CH7006_SUBC_INC4_GPIO1_IN   (1 << 7)
 
#define CH7006_SUBC_INC4_GPIO0_IN   (1 << 6)
 
#define CH7006_SUBC_INC4_DS_INPUT   (1 << 4)
 
#define CH7006_SUBC_INC4_12   12, 3:0
 
#define CH7006_SUBC_INC5   0x1d
 
#define CH7006_SUBC_INC5_8   8, 3:0
 
#define CH7006_SUBC_INC6   0x1e
 
#define CH7006_SUBC_INC6_4   4, 3:0
 
#define CH7006_SUBC_INC7   0x1f
 
#define CH7006_SUBC_INC7_0   0, 3:0
 
#define CH7006_PLL_CONTROL   0x20
 
#define CH7006_PLL_CONTROL_CPI   (1 << 5)
 
#define CH7006_PLL_CONTROL_CAPACITOR   (1 << 4)
 
#define CH7006_PLL_CONTROL_7STAGES   (1 << 3)
 
#define CH7006_PLL_CONTROL_DIGITAL_5V   (1 << 2)
 
#define CH7006_PLL_CONTROL_ANALOG_5V   (1 << 1)
 
#define CH7006_PLL_CONTROL_MEMORY_5V   (1 << 0)
 
#define CH7006_CALC_SUBC_INC0   0x21
 
#define CH7006_CALC_SUBC_INC0_24   24, 4:3
 
#define CH7006_CALC_SUBC_INC0_HYST   0, 2:1
 
#define CH7006_CALC_SUBC_INC0_AUTO   (1 << 0)
 
#define CH7006_CALC_SUBC_INC1   0x22
 
#define CH7006_CALC_SUBC_INC1_16   16, 7:0
 
#define CH7006_CALC_SUBC_INC2   0x23
 
#define CH7006_CALC_SUBC_INC2_8   8, 7:0
 
#define CH7006_CALC_SUBC_INC3   0x24
 
#define CH7006_CALC_SUBC_INC3_0   0, 7:0
 
#define CH7006_VERSION_ID   0x25
 

Typedefs

typedef int64_t fixed
 

Enumerations

enum  ch7006_tv_norm {
  TV_NORM_PAL, TV_NORM_PAL_M, TV_NORM_PAL_N, TV_NORM_PAL_NC,
  TV_NORM_PAL_60, TV_NORM_NTSC_M, TV_NORM_NTSC_J, NUM_TV_NORMS
}
 

Functions

struct ch7006_modech7006_lookup_mode (struct drm_encoder *encoder, const struct drm_display_mode *drm_mode)
 
void ch7006_setup_levels (struct drm_encoder *encoder)
 
void ch7006_setup_subcarrier (struct drm_encoder *encoder)
 
void ch7006_setup_pll (struct drm_encoder *encoder)
 
void ch7006_setup_power_state (struct drm_encoder *encoder)
 
void ch7006_setup_properties (struct drm_encoder *encoder)
 
void ch7006_write (struct i2c_client *client, uint8_t addr, uint8_t val)
 
uint8_t ch7006_read (struct i2c_client *client, uint8_t addr)
 
void ch7006_state_load (struct i2c_client *client, struct ch7006_state *state)
 
void ch7006_state_save (struct i2c_client *client, struct ch7006_state *state)
 

Variables

int ch7006_debug
 
charch7006_tv_norm
 
int ch7006_scale
 
charch7006_tv_norm_names []
 
struct ch7006_tv_norm_info ch7006_tv_norms []
 
struct ch7006_mode ch7006_modes []
 

Macro Definition Documentation

#define __bitf (   src,
  bitfield,
  x 
)    (((x) >> (src) << (0 ? bitfield)) & __mask(src, bitfield))

Definition at line 146 of file ch7006_priv.h.

#define __mask (   src,
  bitfield 
)    (((2 << (1 ? bitfield)) - 1) & ~((1 << (0 ? bitfield)) - 1))

Definition at line 142 of file ch7006_priv.h.

#define __unbitf (   src,
  bitfield,
  x 
)    ((x & __mask(src, bitfield)) >> (0 ? bitfield) << (src))

Definition at line 154 of file ch7006_priv.h.

#define bitf (   bitfield,
  x 
)    __bitf(bitfield, x)

Definition at line 148 of file ch7006_priv.h.

#define bitfs (   bitfield,
  s 
)    __bitf(bitfield, bitfield##_##s)

Definition at line 149 of file ch7006_priv.h.

#define CH7006_BCLKOUT   0x17

Definition at line 288 of file ch7006_priv.h.

#define CH7006_BLACK_LEVEL   0x09

Definition at line 244 of file ch7006_priv.h.

#define CH7006_BLACK_LEVEL_0   0, 7:0

Definition at line 245 of file ch7006_priv.h.

#define CH7006_BWIDTH   0x03

Definition at line 206 of file ch7006_priv.h.

#define CH7006_BWIDTH_5L_FFILER   (1 << 7)

Definition at line 207 of file ch7006_priv.h.

#define CH7006_BWIDTH_CHROMA   0, 5:4

Definition at line 209 of file ch7006_priv.h.

#define CH7006_BWIDTH_CVBS_LUMA   0, 0:0

Definition at line 212 of file ch7006_priv.h.

#define CH7006_BWIDTH_CVBS_NO_CHROMA   (1 << 6)

Definition at line 208 of file ch7006_priv.h.

#define CH7006_BWIDTH_SVIDEO_LUMA   0, 2:1

Definition at line 211 of file ch7006_priv.h.

#define CH7006_BWIDTH_SVIDEO_YPEAK   (1 << 3)

Definition at line 210 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC0   0x21

Definition at line 329 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC0_24   24, 4:3

Definition at line 330 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC0_AUTO   (1 << 0)

Definition at line 332 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC0_HYST   0, 2:1

Definition at line 331 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC1   0x22

Definition at line 334 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC1_16   16, 7:0

Definition at line 335 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC2   0x23

Definition at line 337 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC2_8   8, 7:0

Definition at line 338 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC3   0x24

Definition at line 340 of file ch7006_priv.h.

#define CH7006_CALC_SUBC_INC3_0   0, 7:0

Definition at line 341 of file ch7006_priv.h.

#define CH7006_CLKMODE   0x06

Definition at line 229 of file ch7006_priv.h.

#define CH7006_CLKMODE_MASTER   (1 << 6)

Definition at line 231 of file ch7006_priv.h.

#define CH7006_CLKMODE_PCM   0, 1:0

Definition at line 234 of file ch7006_priv.h.

#define CH7006_CLKMODE_POS_EDGE   (1 << 4)

Definition at line 232 of file ch7006_priv.h.

#define CH7006_CLKMODE_SUBC_LOCK   (1 << 7)

Definition at line 230 of file ch7006_priv.h.

#define CH7006_CLKMODE_XCM   0, 3:2

Definition at line 233 of file ch7006_priv.h.

#define CH7006_CONTRAST   0x11

Definition at line 275 of file ch7006_priv.h.

#define CH7006_CONTRAST_0   0, 2:0

Definition at line 276 of file ch7006_priv.h.

#define ch7006_dbg (   client,
  format,
  ... 
)
Value:
do { \
if (ch7006_debug) \
dev_printk(KERN_DEBUG, &client->dev, \
"%s: " format, __func__, ## __VA_ARGS__); \
} while (0)

Definition at line 132 of file ch7006_priv.h.

#define CH7006_DETECT   0x10

Definition at line 269 of file ch7006_priv.h.

#define CH7006_DETECT_CVBS_TEST   (1 << 1)

Definition at line 272 of file ch7006_priv.h.

#define CH7006_DETECT_SENSE   (1 << 0)

Definition at line 273 of file ch7006_priv.h.

#define CH7006_DETECT_SVIDEO_C_TEST   (1 << 2)

Definition at line 271 of file ch7006_priv.h.

#define CH7006_DETECT_SVIDEO_Y_TEST   (1 << 3)

Definition at line 270 of file ch7006_priv.h.

#define CH7006_DISPMODE   0x00

Definition at line 179 of file ch7006_priv.h.

#define CH7006_DISPMODE_INPUT_RES   0, 7:5

Definition at line 180 of file ch7006_priv.h.

#define CH7006_DISPMODE_INPUT_RES_512x384   0x0

Definition at line 181 of file ch7006_priv.h.

#define CH7006_DISPMODE_INPUT_RES_640x400   0x2

Definition at line 183 of file ch7006_priv.h.

#define CH7006_DISPMODE_INPUT_RES_640x480   0x3

Definition at line 184 of file ch7006_priv.h.

#define CH7006_DISPMODE_INPUT_RES_720x400   0x1

Definition at line 182 of file ch7006_priv.h.

#define CH7006_DISPMODE_INPUT_RES_800x600   0x4

Definition at line 185 of file ch7006_priv.h.

#define CH7006_DISPMODE_INPUT_RES_NATIVE   0x5

Definition at line 186 of file ch7006_priv.h.

#define CH7006_DISPMODE_OUTPUT_STD   0, 4:3

Definition at line 187 of file ch7006_priv.h.

#define CH7006_DISPMODE_OUTPUT_STD_NTSC   0x1

Definition at line 189 of file ch7006_priv.h.

#define CH7006_DISPMODE_OUTPUT_STD_NTSC_J   0x3

Definition at line 191 of file ch7006_priv.h.

#define CH7006_DISPMODE_OUTPUT_STD_PAL   0x0

Definition at line 188 of file ch7006_priv.h.

#define CH7006_DISPMODE_OUTPUT_STD_PAL_M   0x2

Definition at line 190 of file ch7006_priv.h.

#define CH7006_DISPMODE_SCALING_RATIO   0, 2:0

Definition at line 192 of file ch7006_priv.h.

#define CH7006_DISPMODE_SCALING_RATIO_1_1   0x1

Definition at line 194 of file ch7006_priv.h.

#define CH7006_DISPMODE_SCALING_RATIO_3_4   0x4

Definition at line 197 of file ch7006_priv.h.

#define CH7006_DISPMODE_SCALING_RATIO_5_4   0x0

Definition at line 193 of file ch7006_priv.h.

#define CH7006_DISPMODE_SCALING_RATIO_5_6   0x3

Definition at line 196 of file ch7006_priv.h.

#define CH7006_DISPMODE_SCALING_RATIO_7_10   0x5

Definition at line 198 of file ch7006_priv.h.

#define CH7006_DISPMODE_SCALING_RATIO_7_8   0x2

Definition at line 195 of file ch7006_priv.h.

#define ch7006_err (   client,
  format,
  ... 
)    dev_err(&client->dev, format, __VA_ARGS__)

Definition at line 139 of file ch7006_priv.h.

#define CH7006_FFILTER   0x01

Definition at line 200 of file ch7006_priv.h.

#define CH7006_FFILTER_CHROMA   0, 1:0

Definition at line 203 of file ch7006_priv.h.

#define CH7006_FFILTER_CHROMA_NO_DCRAWL   0x3

Definition at line 204 of file ch7006_priv.h.

#define CH7006_FFILTER_LUMA   0, 3:2

Definition at line 202 of file ch7006_priv.h.

#define CH7006_FFILTER_TEXT   0, 5:4

Definition at line 201 of file ch7006_priv.h.

#define CH7006_FREQ0   14318

Definition at line 173 of file ch7006_priv.h.

#define CH7006_HPOS   0x0a

Definition at line 247 of file ch7006_priv.h.

#define CH7006_HPOS_0   0, 7:0

Definition at line 248 of file ch7006_priv.h.

#define ch7006_info (   client,
  format,
  ... 
)    dev_info(&client->dev, format, __VA_ARGS__)

Definition at line 137 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT   0x04

Definition at line 214 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_DAC_GAIN   (1 << 6)

Definition at line 215 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT   0, 3:0

Definition at line 217 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB15   0x3

Definition at line 221 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB15m8   0x8

Definition at line 226 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB16   0x0

Definition at line 218 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB16m8   0x7

Definition at line 225 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB24m12C   0x4

Definition at line 222 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB24m12I   0x5

Definition at line 223 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB24m16   0x2

Definition at line 220 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_RGB24m8   0x6

Definition at line 224 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_YCrCb24m16   0x1

Definition at line 219 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_FORMAT_YCrCb24m8   0x9

Definition at line 227 of file ch7006_priv.h.

#define CH7006_INPUT_FORMAT_RGB_PASS_THROUGH   (1 << 5)

Definition at line 216 of file ch7006_priv.h.

#define CH7006_INPUT_SYNC   0x0d

Definition at line 253 of file ch7006_priv.h.

#define CH7006_INPUT_SYNC_EMBEDDED   (1 << 3)

Definition at line 254 of file ch7006_priv.h.

#define CH7006_INPUT_SYNC_OUTPUT   (1 << 2)

Definition at line 255 of file ch7006_priv.h.

#define CH7006_INPUT_SYNC_PHSYNC   (1 << 0)

Definition at line 257 of file ch7006_priv.h.

#define CH7006_INPUT_SYNC_PVSYNC   (1 << 1)

Definition at line 256 of file ch7006_priv.h.

#define ch7006_load_reg (   client,
  state,
  reg 
)    ch7006_write(client, reg, state->regs[reg])

Definition at line 168 of file ch7006_priv.h.

#define CH7006_MAXM   315

Definition at line 175 of file ch7006_priv.h.

#define CH7006_MAXN   650

Definition at line 174 of file ch7006_priv.h.

#define CH7006_PLL_CONTROL   0x20

Definition at line 321 of file ch7006_priv.h.

#define CH7006_PLL_CONTROL_7STAGES   (1 << 3)

Definition at line 324 of file ch7006_priv.h.

#define CH7006_PLL_CONTROL_ANALOG_5V   (1 << 1)

Definition at line 326 of file ch7006_priv.h.

#define CH7006_PLL_CONTROL_CAPACITOR   (1 << 4)

Definition at line 323 of file ch7006_priv.h.

#define CH7006_PLL_CONTROL_CPI   (1 << 5)

Definition at line 322 of file ch7006_priv.h.

#define CH7006_PLL_CONTROL_DIGITAL_5V   (1 << 2)

Definition at line 325 of file ch7006_priv.h.

#define CH7006_PLL_CONTROL_MEMORY_5V   (1 << 0)

Definition at line 327 of file ch7006_priv.h.

#define CH7006_PLLM   0x14

Definition at line 282 of file ch7006_priv.h.

#define CH7006_PLLM_0   0, 7:0

Definition at line 283 of file ch7006_priv.h.

#define CH7006_PLLN   0x15

Definition at line 285 of file ch7006_priv.h.

#define CH7006_PLLN_0   0, 7:0

Definition at line 286 of file ch7006_priv.h.

#define CH7006_PLLOV   0x13

Definition at line 278 of file ch7006_priv.h.

#define CH7006_PLLOV_M_8   8, 0:0

Definition at line 280 of file ch7006_priv.h.

#define CH7006_PLLOV_N_8   8, 2:1

Definition at line 279 of file ch7006_priv.h.

#define CH7006_POV   0x08

Definition at line 239 of file ch7006_priv.h.

#define CH7006_POV_HPOS_8   8, 1:1

Definition at line 241 of file ch7006_priv.h.

#define CH7006_POV_START_ACTIVE_8   8, 2:2

Definition at line 240 of file ch7006_priv.h.

#define CH7006_POV_VPOS_8   8, 0:0

Definition at line 242 of file ch7006_priv.h.

#define CH7006_POWER   0x0e

Definition at line 259 of file ch7006_priv.h.

#define CH7006_POWER_LEVEL   0, 2:0

Definition at line 262 of file ch7006_priv.h.

#define CH7006_POWER_LEVEL_CVBS_OFF   0x0

Definition at line 263 of file ch7006_priv.h.

#define CH7006_POWER_LEVEL_FULL_POWER_OFF   0x4

Definition at line 267 of file ch7006_priv.h.

#define CH7006_POWER_LEVEL_NORMAL   0x3

Definition at line 266 of file ch7006_priv.h.

#define CH7006_POWER_LEVEL_POWER_OFF   0x1

Definition at line 264 of file ch7006_priv.h.

#define CH7006_POWER_LEVEL_SVIDEO_OFF   0x2

Definition at line 265 of file ch7006_priv.h.

#define CH7006_POWER_RESET   (1 << 3)

Definition at line 261 of file ch7006_priv.h.

#define CH7006_POWER_SCART   (1 << 4)

Definition at line 260 of file ch7006_priv.h.

#define ch7006_save_reg (   client,
  state,
  reg 
)    state->regs[reg] = ch7006_read(client, reg)

Definition at line 169 of file ch7006_priv.h.

#define CH7006_START_ACTIVE   0x07

Definition at line 236 of file ch7006_priv.h.

#define CH7006_START_ACTIVE_0   0, 7:0

Definition at line 237 of file ch7006_priv.h.

#define CH7006_SUBC_INC0   0x18

Definition at line 290 of file ch7006_priv.h.

#define CH7006_SUBC_INC0_28   28, 3:0

Definition at line 291 of file ch7006_priv.h.

#define CH7006_SUBC_INC1   0x19

Definition at line 293 of file ch7006_priv.h.

#define CH7006_SUBC_INC1_24   24, 3:0

Definition at line 294 of file ch7006_priv.h.

#define CH7006_SUBC_INC2   0x1a

Definition at line 296 of file ch7006_priv.h.

#define CH7006_SUBC_INC2_20   20, 3:0

Definition at line 297 of file ch7006_priv.h.

#define CH7006_SUBC_INC3   0x1b

Definition at line 299 of file ch7006_priv.h.

#define CH7006_SUBC_INC3_16   16, 3:0

Definition at line 304 of file ch7006_priv.h.

#define CH7006_SUBC_INC3_GPIO0_VAL   (1 << 6)

Definition at line 301 of file ch7006_priv.h.

#define CH7006_SUBC_INC3_GPIO1_VAL   (1 << 7)

Definition at line 300 of file ch7006_priv.h.

#define CH7006_SUBC_INC3_POUT_3_3V   (1 << 5)

Definition at line 302 of file ch7006_priv.h.

#define CH7006_SUBC_INC3_POUT_INV   (1 << 4)

Definition at line 303 of file ch7006_priv.h.

#define CH7006_SUBC_INC4   0x1c

Definition at line 306 of file ch7006_priv.h.

#define CH7006_SUBC_INC4_12   12, 3:0

Definition at line 310 of file ch7006_priv.h.

#define CH7006_SUBC_INC4_DS_INPUT   (1 << 4)

Definition at line 309 of file ch7006_priv.h.

#define CH7006_SUBC_INC4_GPIO0_IN   (1 << 6)

Definition at line 308 of file ch7006_priv.h.

#define CH7006_SUBC_INC4_GPIO1_IN   (1 << 7)

Definition at line 307 of file ch7006_priv.h.

#define CH7006_SUBC_INC5   0x1d

Definition at line 312 of file ch7006_priv.h.

#define CH7006_SUBC_INC5_8   8, 3:0

Definition at line 313 of file ch7006_priv.h.

#define CH7006_SUBC_INC6   0x1e

Definition at line 315 of file ch7006_priv.h.

#define CH7006_SUBC_INC6_4   4, 3:0

Definition at line 316 of file ch7006_priv.h.

#define CH7006_SUBC_INC7   0x1f

Definition at line 318 of file ch7006_priv.h.

#define CH7006_SUBC_INC7_0   0, 3:0

Definition at line 319 of file ch7006_priv.h.

#define CH7006_VERSION_ID   0x25

Definition at line 343 of file ch7006_priv.h.

#define CH7006_VPOS   0x0b

Definition at line 250 of file ch7006_priv.h.

#define CH7006_VPOS_0   0, 7:0

Definition at line 251 of file ch7006_priv.h.

#define fixed1   (1LL << 32)

Definition at line 36 of file ch7006_priv.h.

#define mask (   bitfield)    __mask(bitfield)

Definition at line 144 of file ch7006_priv.h.

#define setbitf (   state,
  reg,
  bitfield,
  x 
)
Value:
state->regs[reg] = (state->regs[reg] & ~mask(reg##_##bitfield)) \

Definition at line 150 of file ch7006_priv.h.

#define to_ch7006_priv (   x)    ((struct ch7006_priv *)to_encoder_slave(x)->slave_priv)

Definition at line 102 of file ch7006_priv.h.

#define unbitf (   bitfield,
  x 
)    __unbitf(bitfield, x)

Definition at line 156 of file ch7006_priv.h.

Typedef Documentation

typedef int64_t fixed

Definition at line 35 of file ch7006_priv.h.

Enumeration Type Documentation

Enumerator:
TV_NORM_PAL 
TV_NORM_PAL_M 
TV_NORM_PAL_N 
TV_NORM_PAL_NC 
TV_NORM_PAL_60 
TV_NORM_NTSC_M 
TV_NORM_NTSC_J 
NUM_TV_NORMS 

Definition at line 38 of file ch7006_priv.h.

Function Documentation

struct ch7006_mode* ch7006_lookup_mode ( struct drm_encoder encoder,
const struct drm_display_mode drm_mode 
)
read

Definition at line 174 of file ch7006_mode.c.

uint8_t ch7006_read ( struct i2c_client client,
uint8_t  addr 
)

Definition at line 380 of file ch7006_mode.c.

void ch7006_setup_levels ( struct drm_encoder encoder)

Definition at line 200 of file ch7006_mode.c.

void ch7006_setup_pll ( struct drm_encoder encoder)

Definition at line 255 of file ch7006_mode.c.

void ch7006_setup_power_state ( struct drm_encoder encoder)

Definition at line 293 of file ch7006_mode.c.

void ch7006_setup_properties ( struct drm_encoder encoder)

Definition at line 326 of file ch7006_mode.c.

void ch7006_setup_subcarrier ( struct drm_encoder encoder)

Definition at line 231 of file ch7006_mode.c.

void ch7006_state_load ( struct i2c_client client,
struct ch7006_state state 
)

Definition at line 401 of file ch7006_mode.c.

void ch7006_state_save ( struct i2c_client client,
struct ch7006_state state 
)

Definition at line 435 of file ch7006_mode.c.

void ch7006_write ( struct i2c_client client,
uint8_t  addr,
uint8_t  val 
)

Definition at line 369 of file ch7006_mode.c.

Variable Documentation

int ch7006_debug

Definition at line 530 of file ch7006_drv.c.

struct ch7006_mode ch7006_modes[]

Definition at line 145 of file ch7006_mode.c.

int ch7006_scale

Definition at line 540 of file ch7006_drv.c.

Definition at line 534 of file ch7006_drv.c.

char* ch7006_tv_norm_names[]

Definition at line 29 of file ch7006_mode.c.

struct ch7006_tv_norm_info ch7006_tv_norms[]

Definition at line 49 of file ch7006_mode.c.