diff options
author | Mason Wang <masonwang@google.com> | 2022-03-28 15:28:28 +0800 |
---|---|---|
committer | Mason Wang <masonwang@google.com> | 2022-03-30 08:28:13 +0800 |
commit | a4587207e57dfef00cf2e1c6ca63cd05f6f747b9 (patch) | |
tree | 03841c5e25b94c496a672e5b693ec1097273d18f /ft3658 | |
parent | 3e37ce8b06524fbe5d1383d99fa7e17451494d2a (diff) | |
download | focaltech_touch-a4587207e57dfef00cf2e1c6ca63cd05f6f747b9.tar.gz |
touch/focaltech: Add SPI shutdown function.
When device shutdowns, the driver calls SPI shutdown function instead
of SPI remove function. Adding shutdown function to cover it.
Bug: 226881266
Test: Verify pass by calling the SPI shutdown function when device
shutdowns.
Signed-off-by: Mason Wang <masonwang@google.com>
Change-Id: I16e12ec113f5fe20fbdd291136d4eee12e68fade
Diffstat (limited to 'ft3658')
-rw-r--r-- | ft3658/focaltech_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ft3658/focaltech_core.c b/ft3658/focaltech_core.c index 38e0dcd..920effa 100644 --- a/ft3658/focaltech_core.c +++ b/ft3658/focaltech_core.c @@ -3317,6 +3317,11 @@ static int fts_ts_remove(struct spi_device *spi) return fts_ts_remove_entry(spi_get_drvdata(spi)); } +static void fts_ts_shutdown(struct spi_device *spi) +{ + fts_ts_remove(spi); +} + static const struct spi_device_id fts_ts_id[] = { {FTS_DRIVER_NAME, 0}, {}, @@ -3330,6 +3335,7 @@ MODULE_DEVICE_TABLE(of, fts_dt_match); static struct spi_driver fts_ts_driver = { .probe = fts_ts_probe, .remove = fts_ts_remove, + .shutdown = fts_ts_shutdown, .driver = { .name = FTS_DRIVER_NAME, .owner = THIS_MODULE, |