11 #define RTD2132_COMMAND 0x01
12 #define RTD2132_DATA 0x00
13 #define RTD2132_FIRMWARE 0x80
14 #define RTD2132_FIRMWARE_START 0x00
15 #define RTD2132_FIRMWARE_STOP 0x01
18 #define RTD2132_COMMAND_PWR_SEQ_T1 0x32
19 #define RTD2132_COMMAND_PWR_SEQ_T2 0x33
20 #define RTD2132_COMMAND_PWR_SEQ_T3 0x34
21 #define RTD2132_COMMAND_PWR_SEQ_T4 0x35
22 #define RTD2132_COMMAND_PWR_SEQ_T5 0x36
23 #define RTD2132_COMMAND_PWR_SEQ_T6 0x37
24 #define RTD2132_COMMAND_PWR_SEQ_T7 0x38
27 #define RTD2132_COMMAND_SSCG_CONFIG_0 0x39
28 #define RTD2132_SSCG_ENABLE 0xa0
29 #define RTD2132_SSCG_DISABLE 0x20
30 #define RTD2132_COMMAND_SSCG_CONFIG_1 0x3a
31 #define RTD2132_SSCG_CONFIG_DISABLED 0x01
32 #define RTD2132_SSCG_CONFIG_0_5 0x07
33 #define RTD2132_SSCG_CONFIG_1_0 0x0f
34 #define RTD2132_SSCG_CONFIG_1_5 0x16
37 #define RTD2132_COMMAND_LVDS_SWAP 0x3b
38 #define RTD2132_LVDS_SWAP_DUAL 0x80
39 #define RTD2132_LVDS_SWAP_NORMAL 0x04
40 #define RTD2132_LVDS_SWAP_MIRROR 0x14
41 #define RTD2132_LVDS_SWAP_P_N 0x24
42 #define RTD2132_LVDS_SWAP_MIRROR_P_N 0x34
43 #define RTD2132_LVDS_SWAP_R_L 0x0c
46 #define RTD2132_SSCG_PERCENT_0_0 0x00
47 #define RTD2132_SSCG_PERCENT_0_5 0x05
48 #define RTD2132_SSCG_PERCENT_1_0 0x10
49 #define RTD2132_SSCG_PERCENT_1_5 0x15
51 #define RTD2132_LVDS_SWAP_CFG_DUAL 0x80
52 #define RTD2132_LVDS_SWAP_CFG_NORMAL 0x00
53 #define RTD2132_LVDS_SWAP_CFG_MIRROR 0x01
54 #define RTD2132_LVDS_SWAP_CFG_P_N 0x02
55 #define RTD2132_LVDS_SWAP_CFG_MIRROR_P_N 0x03
56 #define RTD2132_LVDS_SWAP_CFG_R_L 0x04
58 #define RTD2132_DEBUG_REG 0
173 static const struct def_setting {
187 for (i = 0; i <
ARRAY_SIZE(def_settings); i++)
189 def_settings[i].
value);
#define printk(level,...)
void mdelay(unsigned int msecs)
struct bus * get_pbus_smbus(struct device *dev)
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
static void noop_set_resources(struct device *dev)
static const struct smbus_bus_operations * ops_smbus_bus(struct bus *bus)
static int smbus_write_byte(struct device *const dev, u8 addr, u8 val)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define RTD2132_LVDS_SWAP_CFG_NORMAL
#define RTD2132_SSCG_PERCENT_0_0
#define RTD2132_SSCG_CONFIG_1_0
static struct device_operations rtd2132_operations
static void rtd2132_lvds_swap(struct device *dev, struct drivers_i2c_rtd2132_config *cfg)
#define RTD2132_DEBUG_REG
#define RTD2132_LVDS_SWAP_R_L
#define RTD2132_SSCG_ENABLE
#define RTD2132_SSCG_CONFIG_1_5
static void rtd2132_defaults(struct device *dev)
#define RTD2132_LVDS_SWAP_CFG_MIRROR_P_N
static void rtd2132_init(struct device *dev)
#define RTD2132_LVDS_SWAP_NORMAL
#define RTD2132_COMMAND_LVDS_SWAP
#define RTD2132_LVDS_SWAP_CFG_DUAL
struct chip_operations drivers_i2c_rtd2132_ops
#define RTD2132_LVDS_SWAP_CFG_P_N
#define RTD2132_LVDS_SWAP_CFG_R_L
#define RTD2132_SSCG_PERCENT_0_5
#define RTD2132_SSCG_CONFIG_DISABLED
#define RTD2132_LVDS_SWAP_P_N
#define RTD2132_SSCG_CONFIG_0_5
static void enable_dev(struct device *dev)
static void rtd2132_firmware_start(struct device *dev)
#define RTD2132_COMMAND_PWR_SEQ_T4
#define RTD2132_LVDS_SWAP_CFG_MIRROR
#define RTD2132_LVDS_SWAP_MIRROR
static void rtd2132_sscg_enable(struct device *dev, u8 sscg_percent)
#define RTD2132_COMMAND_SSCG_CONFIG_0
#define RTD2132_COMMAND_PWR_SEQ_T3
#define RTD2132_SSCG_DISABLE
#define RTD2132_COMMAND_PWR_SEQ_T7
static void rtd2132_setup(struct device *dev)
static void rtd2132_write_reg(struct device *dev, u8 reg, u8 value)
#define RTD2132_COMMAND_PWR_SEQ_T1
static void rtd2132_sscg(struct device *dev, struct drivers_i2c_rtd2132_config *cfg)
#define RTD2132_LVDS_SWAP_DUAL
static void rtd2132_pps(struct device *dev, struct drivers_i2c_rtd2132_config *cfg)
#define RTD2132_SSCG_PERCENT_1_5
static void rtd2132_sscg_disable(struct device *dev)
static void rtd2132_firmware_stop(struct device *dev)
#define RTD2132_SSCG_PERCENT_1_0
#define RTD2132_COMMAND_PWR_SEQ_T6
#define RTD2132_COMMAND_SSCG_CONFIG_1
#define RTD2132_COMMAND_PWR_SEQ_T5
#define RTD2132_COMMAND_PWR_SEQ_T2
#define RTD2132_LVDS_SWAP_MIRROR_P_N
#define RTD2132_FIRMWARE_STOP
#define RTD2132_FIRMWARE_START
void(* read_resources)(struct device *dev)
enum device_path_type type
struct device_operations * ops
DEVTREE_CONST void * chip_info