Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

ch7024.c File Reference


Detailed Description

Driver for CH7024 TV encoder.

Definition in file ch7024.c.

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sysfs.h>
#include <linux/mxcfb.h>
#include <linux/regulator/consumer.h>
#include <asm/uaccess.h>
#include <asm/atomic.h>
#include <mach/gpio.h>
#include <mach/hw_events.h>

Go to the source code of this file.

Classes

struct  ch7024_clock
struct  ch7024_input_timing

Defines

#define CH7024_ACIV   0x1C
#define CH7024_ATT_DISP   0x7E
#define CH7024_CLK_N1   0x2B
#define CH7024_CLK_N2   0x2C
#define CH7024_CLK_N3   0x2D
#define CH7024_CLK_P1   0x28
#define CH7024_CLK_P2   0x29
#define CH7024_CLK_P3   0x2A
#define CH7024_CLK_T   0x2E
#define CH7024_CLK_TREE   0x1D
#define CH7024_DAC_TRIM   0x62
#define CH7024_DATA_IO   0x63
#define CH7024_DEVICE_ID   0x45
#define CH7024_DEVID   0x00
#define CH7024_H_POS1   0x22
#define CH7024_H_POS2   0x23
#define CH7024_IDF1   0x0C
#define CH7024_IDF2   0x0D
#define CH7024_IN_TIMING1   0x11
#define CH7024_IN_TIMING10   0x1A
#define CH7024_IN_TIMING11   0x1B
#define CH7024_IN_TIMING2   0x12
#define CH7024_IN_TIMING3   0x13
#define CH7024_IN_TIMING4   0x14
#define CH7024_IN_TIMING5   0x15
#define CH7024_IN_TIMING6   0x16
#define CH7024_IN_TIMING7   0x17
#define CH7024_IN_TIMING8   0x18
#define CH7024_IN_TIMING9   0x19
#define CH7024_OUT_FMT   0x0A
#define CH7024_OUT_TIMING1   0x1E
#define CH7024_OUT_TIMING2   0x1F
#define CH7024_PCLK_A1   0x24
#define CH7024_PCLK_A2   0x25
#define CH7024_PCLK_A3   0x26
#define CH7024_PCLK_A4   0x27
#define CH7024_PG   0x02
#define CH7024_PLL1   0x2F
#define CH7024_PLL2   0x30
#define CH7024_PLL3   0x31
#define CH7024_POWER   0x04
#define CH7024_RESET   0x03
#define ch7024_resume   NULL
#define CH7024_REVID   0x01
#define CH7024_SC_FREQ1   0x34
#define CH7024_SC_FREQ2   0x35
#define CH7024_SC_FREQ3   0x36
#define CH7024_SC_FREQ4   0x37
#define ch7024_suspend   NULL
#define CH7024_SYNC   0x0E
#define CH7024_TVBRI   0x08
#define CH7024_TVCTA   0x07
#define CH7024_TVFILTER1   0x0F
#define CH7024_TVFILTER2   0x10
#define CH7024_TVHUE   0x05
#define CH7024_TVSAT   0x06
#define CH7024_TVSHARP   0x09
#define CH7024_V_POS1   0x20
#define CH7024_V_POS2   0x21
#define CH7024_VOS_NTSC_443   0x2
#define CH7024_VOS_NTSC_J   0x1
#define CH7024_VOS_NTSC_M   0x0
#define CH7024_VOS_PAL_60   0x7
#define CH7024_VOS_PAL_BDGHKI   0x3
#define CH7024_VOS_PAL_M   0x4
#define CH7024_VOS_PAL_N   0x5
#define CH7024_VOS_PAL_NC   0x6
#define CH7024_XTAL   0x0B
#define CH7024_XTAL_13MHZ   0x4
#define CH7024_XTAL_26MHZ   0xB
#define CLK_HIGH   0
#define CLK_LOW   1
#define TVOUT_FMT_NTSC   1
#define TVOUT_FMT_OFF   0
#define TVOUT_FMT_PAL   2

Functions

static int ch7024_detect (void)
static void ch7024_disable (void)
static int ch7024_enable (void)
static void __exit ch7024_exit (void)
int ch7024_fb_event (struct notifier_block *nb, unsigned long val, void *v)
static int __init ch7024_init (void)
static int ch7024_probe (struct i2c_client *client, const struct i2c_device_id *dev_id)
static int ch7024_read_reg (u8 reg)
static int ch7024_remove (struct i2c_client *client)
static int ch7024_setup (int vos)
static int ch7024_write_reg (u8 reg, u8 word)
 DECLARE_DELAYED_WORK (ch7024_wq, hp_detect_wq_handler)
 DRIVER_ATTR (sharpness, 0644, show_sharpness, store_sharpness)
 DRIVER_ATTR (saturation, 0644, show_saturation, store_saturation)
 DRIVER_ATTR (hue, 0644, show_hue, store_hue)
 DRIVER_ATTR (contrast, 0644, show_contrast, store_contrast)
 DRIVER_ATTR (brightness, 0644, show_brightness, store_brightness)
 DRIVER_ATTR (headphone, 0644, show_headphone, NULL)
static irqreturn_t hp_detect_handler (int irq, void *data)
static void hp_detect_wq_handler (struct work_struct *)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("CH7024 TV encoder driver")
 MODULE_DEVICE_TABLE (i2c, ch7024_id)
 module_exit (ch7024_exit)
 module_init (ch7024_init)
 MODULE_LICENSE ("GPL")
static ssize_t show_brightness (struct device_driver *dev, char *buf)
static ssize_t show_contrast (struct device_driver *dev, char *buf)
static ssize_t show_headphone (struct device_driver *dev, char *buf)
static ssize_t show_hue (struct device_driver *dev, char *buf)
static ssize_t show_saturation (struct device_driver *dev, char *buf)
static ssize_t show_sharpness (struct device_driver *dev, char *buf)
static ssize_t store_brightness (struct device_driver *dev, const char *buf, size_t count)
static ssize_t store_contrast (struct device_driver *dev, const char *buf, size_t count)
static ssize_t store_hue (struct device_driver *dev, const char *buf, size_t count)
static ssize_t store_saturation (struct device_driver *dev, const char *buf, size_t count)
static ssize_t store_sharpness (struct device_driver *dev, const char *buf, size_t count)

Variables

static struct regulator * analog_reg
static struct i2c_client * ch7024_client
static struct ch7024_clock ch7024_clk_ntsc
static struct ch7024_clock ch7024_clk_pal
static int ch7024_cur_mode
static struct i2c_driver ch7024_driver
static struct fb_info * ch7024_fbi
static struct i2c_device_id ch7024_id []
static struct ch7024_input_timing ch7024_timing_ntsc
static struct ch7024_input_timing ch7024_timing_pal
static struct regulator * core_reg
static u32 detect_gpio
static int enabled
static struct regulator * io_reg
static struct notifier_block nb
static int pm_status
static struct fb_videomode video_modes []


Generated by  Doxygen 1.6.0   Back to index