|
28 | 28 |
|
29 | 29 | struct apple_z2 { |
30 | 30 | struct spi_device *spidev; |
31 | | - struct gpio_desc *cs_gpio; |
32 | 31 | struct gpio_desc *reset_gpio; |
33 | 32 | struct input_dev *input_dev; |
34 | 33 | struct completion boot_irq; |
@@ -127,16 +126,8 @@ static int apple_z2_spi_sync(struct apple_z2 *z2, struct spi_message *msg) |
127 | 126 | { |
128 | 127 | int error; |
129 | 128 |
|
130 | | - if (z2->cs_gpio) { |
131 | | - gpiod_direction_output(z2->cs_gpio, 0); |
132 | | - } |
133 | | - |
134 | 129 | error = spi_sync(z2->spidev, msg); |
135 | 130 |
|
136 | | - if (z2->cs_gpio) { |
137 | | - gpiod_direction_output(z2->cs_gpio, 1); |
138 | | - } |
139 | | - |
140 | 131 | return error; |
141 | 132 | } |
142 | 133 |
|
@@ -380,17 +371,6 @@ static int apple_z2_probe(struct spi_device *spi) |
380 | 371 | init_completion(&z2->boot_irq); |
381 | 372 | spi_set_drvdata(spi, z2); |
382 | 373 |
|
383 | | - z2->cs_gpio = devm_gpiod_get_index(dev, "cs", 0, 0); |
384 | | - if (IS_ERR(z2->cs_gpio)) { |
385 | | - if (PTR_ERR(z2->cs_gpio) != -ENOENT) |
386 | | - { |
387 | | - dev_err(dev, "unable to get cs"); |
388 | | - return PTR_ERR(z2->cs_gpio); |
389 | | - } else { |
390 | | - z2->cs_gpio = NULL; |
391 | | - } |
392 | | - } |
393 | | - |
394 | 374 | z2->reset_gpio = devm_gpiod_get_index(dev, "reset", 0, 0); |
395 | 375 | if (IS_ERR(z2->reset_gpio)) { |
396 | 376 | dev_err(dev, "unable to get reset"); |
|
0 commit comments