.. | .. |
---|
12 | 12 | #include "techpoint_tp9950.h" |
---|
13 | 13 | #include "techpoint_tp2855.h" |
---|
14 | 14 | #include "techpoint_tp2815.h" |
---|
| 15 | +#include "techpoint_tp9951.h" |
---|
15 | 16 | |
---|
16 | 17 | static DEFINE_MUTEX(reg_sem); |
---|
17 | 18 | |
---|
.. | .. |
---|
99 | 100 | techpoint_read_reg(client, CHIP_ID_L_REG, &chip_id_l); |
---|
100 | 101 | dev_err(dev, "chip_id_h:0x%2x chip_id_l:0x%2x\n", chip_id_h, chip_id_l); |
---|
101 | 102 | if (chip_id_h == TP9930_CHIP_ID_H_VALUE && |
---|
102 | | - chip_id_l == TP9930_CHIP_ID_L_VALUE) { |
---|
| 103 | + chip_id_l == TP9930_CHIP_ID_L_VALUE) { //tp2832 |
---|
103 | 104 | dev_info(&client->dev, |
---|
104 | 105 | "techpoint check chip id CHIP_TP9930 !\n"); |
---|
105 | 106 | techpoint->chip_id = CHIP_TP9930; |
---|
106 | 107 | techpoint->input_type = TECHPOINT_DVP_BT1120; |
---|
107 | 108 | return 0; |
---|
108 | 109 | } else if (chip_id_h == TP2855_CHIP_ID_H_VALUE && |
---|
109 | | - chip_id_l == TP2855_CHIP_ID_L_VALUE) { |
---|
| 110 | + chip_id_l == TP2855_CHIP_ID_L_VALUE) { //tp2855 |
---|
110 | 111 | dev_info(&client->dev, |
---|
111 | 112 | "techpoint check chip id CHIP_TP2855 !\n"); |
---|
112 | 113 | techpoint->chip_id = CHIP_TP2855; |
---|
113 | 114 | techpoint->input_type = TECHPOINT_MIPI; |
---|
114 | 115 | return 0; |
---|
115 | 116 | } else if (chip_id_h == TP2815_CHIP_ID_H_VALUE && |
---|
116 | | - chip_id_l == TP2815_CHIP_ID_L_VALUE) { |
---|
| 117 | + chip_id_l == TP2815_CHIP_ID_L_VALUE) { //tp2815 |
---|
117 | 118 | dev_info(&client->dev, |
---|
118 | 119 | "techpoint check chip id CHIP_TP2815 !\n"); |
---|
119 | 120 | techpoint->chip_id = CHIP_TP2855; |
---|
120 | 121 | techpoint->input_type = TECHPOINT_MIPI; |
---|
121 | 122 | return 0; |
---|
122 | 123 | } else if (chip_id_h == TP9950_CHIP_ID_H_VALUE && |
---|
123 | | - chip_id_l == TP9950_CHIP_ID_L_VALUE) { |
---|
| 124 | + chip_id_l == TP9950_CHIP_ID_L_VALUE) { //tp2850 |
---|
124 | 125 | dev_info(&client->dev, |
---|
125 | 126 | "techpoint check chip id CHIP_TP9950 !\n"); |
---|
126 | 127 | techpoint->chip_id = CHIP_TP9950; |
---|
| 128 | + techpoint->input_type = TECHPOINT_MIPI; |
---|
| 129 | + return 0; |
---|
| 130 | + } else if (chip_id_h == TP9951_CHIP_ID_H_VALUE && |
---|
| 131 | + chip_id_l == TP9951_CHIP_ID_L_VALUE) { //tp2860 |
---|
| 132 | + dev_info(&client->dev, |
---|
| 133 | + "techpoint check chip id CHIP_TP9951 !\n"); |
---|
| 134 | + techpoint->chip_id = CHIP_TP9951; |
---|
127 | 135 | techpoint->input_type = TECHPOINT_MIPI; |
---|
128 | 136 | return 0; |
---|
129 | 137 | } |
---|
.. | .. |
---|
143 | 151 | tp2855_initialize(techpoint); |
---|
144 | 152 | else if (techpoint->chip_id == CHIP_TP9950) |
---|
145 | 153 | tp9950_initialize(techpoint); |
---|
| 154 | + else if (techpoint->chip_id == CHIP_TP9951) |
---|
| 155 | + tp9951_initialize(techpoint); |
---|
146 | 156 | |
---|
147 | 157 | return 0; |
---|
148 | 158 | } |
---|
.. | .. |
---|
185 | 195 | detect_status = |
---|
186 | 196 | tp2855_get_channel_input_status |
---|
187 | 197 | (techpoint, i); |
---|
| 198 | + else if (techpoint->chip_id == CHIP_TP9951) |
---|
| 199 | + detect_status = |
---|
| 200 | + tp9951_get_channel_input_status |
---|
| 201 | + (techpoint, i); |
---|
188 | 202 | |
---|
189 | 203 | if (techpoint->detect_status[i] != |
---|
190 | 204 | detect_status) { |
---|
.. | .. |
---|
202 | 216 | else if (techpoint->chip_id == CHIP_TP2855) |
---|
203 | 217 | tp2855_set_decoder_mode(client, i, detect_status); |
---|
204 | 218 | |
---|
205 | | - techpoint->detect_status[i] = |
---|
206 | | - detect_status; |
---|
| 219 | + techpoint->detect_status[i] = detect_status; |
---|
207 | 220 | need_reset_wait = 5; |
---|
208 | 221 | } |
---|
209 | 222 | } |
---|
.. | .. |
---|
273 | 286 | tp9950_set_channel_reso(client, 0, reso); |
---|
274 | 287 | } |
---|
275 | 288 | |
---|
| 289 | + if (techpoint->chip_id == CHIP_TP9951) { |
---|
| 290 | + reso = tp9951_get_channel_reso(client, 0); |
---|
| 291 | + tp9951_set_channel_reso(client, 0, reso); |
---|
| 292 | + } |
---|
| 293 | + |
---|
276 | 294 | mutex_unlock(®_sem); |
---|
277 | 295 | |
---|
278 | 296 | return 0; |
---|