diff options
Diffstat (limited to 'firmware/drivers/pcf50606.c')
-rw-r--r-- | firmware/drivers/pcf50606.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/firmware/drivers/pcf50606.c b/firmware/drivers/pcf50606.c index 4ef747fe80..d44718c58b 100644 --- a/firmware/drivers/pcf50606.c +++ b/firmware/drivers/pcf50606.c | |||
@@ -54,15 +54,21 @@ int pcf50606_read_multiple(int address, unsigned char* buf, int count) | |||
54 | void pcf50606_init(void) | 54 | void pcf50606_init(void) |
55 | { | 55 | { |
56 | #ifdef COWON_D2 | 56 | #ifdef COWON_D2 |
57 | /* Set outputs as per OF - further investigation required. */ | 57 | /* Set outputs as per OF - further investigation required. */ |
58 | pcf50606_write(PCF5060X_DCDEC1, 0xe4); | 58 | static const char init_data[] = |
59 | pcf50606_write(PCF5060X_IOREGC, 0xf5); | 59 | {PCF5060X_DCDEC1, 0xe4, |
60 | pcf50606_write(PCF5060X_D1REGC1, 0xf5); | 60 | PCF5060X_IOREGC, 0xf5, |
61 | pcf50606_write(PCF5060X_D2REGC1, 0xe9); | 61 | PCF5060X_D1REGC1, 0xf5, |
62 | pcf50606_write(PCF5060X_D3REGC1, 0xf8); /* WM8985 3.3v */ | 62 | PCF5060X_D2REGC1, 0xe9, |
63 | pcf50606_write(PCF5060X_DCUDC1, 0xe7); | 63 | PCF5060X_D3REGC1, 0xf8, /* WM8985 3.3v */ |
64 | pcf50606_write(PCF5060X_LPREGC1, 0x0); | 64 | PCF5060X_DCUDC1, 0xe7, |
65 | pcf50606_write(PCF5060X_LPREGC2, 0x2); | 65 | PCF5060X_LPREGC1, 0x0, |
66 | PCF5060X_LPREGC2, 0x2, | ||
67 | 0}; | ||
68 | |||
69 | const char* ptr; | ||
70 | for (ptr = init_data; *ptr != 0; ptr += 2) | ||
71 | pcf50606_write(ptr[0], ptr[1]); | ||
66 | #endif | 72 | #endif |
67 | } | 73 | } |
68 | 74 | ||