diff options
Diffstat (limited to 'drivers/input/mouse/cyapa.c')
-rw-r--r-- | drivers/input/mouse/cyapa.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c index 36c64335662c..fa4d5010534d 100644 --- a/drivers/input/mouse/cyapa.c +++ b/drivers/input/mouse/cyapa.c | |||
@@ -184,6 +184,14 @@ static int cyapa_get_state(struct cyapa *cyapa) | |||
184 | if (!error) | 184 | if (!error) |
185 | goto out_detected; | 185 | goto out_detected; |
186 | } | 186 | } |
187 | if ((cyapa->gen == CYAPA_GEN_UNKNOWN || | ||
188 | cyapa->gen == CYAPA_GEN5) && | ||
189 | !smbus && even_addr) { | ||
190 | error = cyapa_gen5_ops.state_parse(cyapa, | ||
191 | status, BL_STATUS_SIZE); | ||
192 | if (!error) | ||
193 | goto out_detected; | ||
194 | } | ||
187 | 195 | ||
188 | /* | 196 | /* |
189 | * Write 0x00 0x00 to trackpad device to force update its | 197 | * Write 0x00 0x00 to trackpad device to force update its |
@@ -272,6 +280,9 @@ static int cyapa_check_is_operational(struct cyapa *cyapa) | |||
272 | return error; | 280 | return error; |
273 | 281 | ||
274 | switch (cyapa->gen) { | 282 | switch (cyapa->gen) { |
283 | case CYAPA_GEN5: | ||
284 | cyapa->ops = &cyapa_gen5_ops; | ||
285 | break; | ||
275 | case CYAPA_GEN3: | 286 | case CYAPA_GEN3: |
276 | cyapa->ops = &cyapa_gen3_ops; | 287 | cyapa->ops = &cyapa_gen3_ops; |
277 | break; | 288 | break; |
@@ -506,6 +517,8 @@ static int cyapa_initialize(struct cyapa *cyapa) | |||
506 | 517 | ||
507 | /* ops.initialize() is aimed to prepare for module communications. */ | 518 | /* ops.initialize() is aimed to prepare for module communications. */ |
508 | error = cyapa_gen3_ops.initialize(cyapa); | 519 | error = cyapa_gen3_ops.initialize(cyapa); |
520 | if (!error) | ||
521 | error = cyapa_gen5_ops.initialize(cyapa); | ||
509 | if (error) | 522 | if (error) |
510 | return error; | 523 | return error; |
511 | 524 | ||