1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #ifndef __ASM_ARCH_SX1_I2C_CHIPS_H
16 #define __ASM_ARCH_SX1_I2C_CHIPS_H
17
18 #define SOFIA_MAX_LIGHT_VAL 0x2B
19
20 #define SOFIA_I2C_ADDR 0x32
21
22 #define SOFIA_POWER1_REG 0x03
23
24 #define SOFIA_USB_POWER 0x01
25 #define SOFIA_MMC_POWER 0x04
26 #define SOFIA_BLUETOOTH_POWER 0x08
27 #define SOFIA_MMILIGHT_POWER 0x20
28
29 #define SOFIA_POWER2_REG 0x04
30 #define SOFIA_BACKLIGHT_REG 0x06
31 #define SOFIA_KEYLIGHT_REG 0x07
32 #define SOFIA_DIMMING_REG 0x09
33
34
35
36
37 int sx1_setbacklight(u8 backlight);
38 int sx1_getbacklight(u8 *backlight);
39 int sx1_setkeylight(u8 keylight);
40 int sx1_getkeylight(u8 *keylight);
41
42 int sx1_setmmipower(u8 onoff);
43 int sx1_setusbpower(u8 onoff);
44 int sx1_i2c_read_byte(u8 devaddr, u8 regoffset, u8 *value);
45 int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value);
46
47
48
49 extern void sx1_mmc_init(void);
50 extern void sx1_mmc_slot_cover_handler(void *arg, int state);
51
52 #endif