Skip to content

Commit

Permalink
Merge pull request #41 from roadrunner2/touchpad-init-fix
Browse files Browse the repository at this point in the history
applespi: Fix reading of touchpad init response.
  • Loading branch information
cb22 authored Jul 24, 2017
2 parents 263fc47 + 21155ff commit 14489fe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions applespi.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,16 @@ applespi_sync_write_and_response(struct applespi_data *applespi)
struct spi_transfer t1;
struct spi_transfer t2;
struct spi_transfer t3;
struct spi_transfer t4;
struct spi_message m;
ssize_t ret;

applespi_setup_write_txfr(applespi, &t1, &t2);
t2.cs_change = 1;
applespi_setup_read_txfr(applespi, &t3);
applespi_setup_spi_message(&m, 3, &t1, &t2, &t3);
memset(&t3, 0, sizeof(t3));
t3.delay_usecs = applespi->spi_settings.reset_rec_usec;
applespi_setup_read_txfr(applespi, &t4);
applespi_setup_spi_message(&m, 4, &t1, &t2, &t3, &t4);

ret = applespi_sync(applespi, &m);

Expand Down

0 comments on commit 14489fe

Please sign in to comment.