diff options
author | Hridya Valsaraju <hridya@google.com> | 2020-04-23 20:58:47 -0700 |
---|---|---|
committer | Hridya Valsaraju <hridya@google.com> | 2020-04-23 21:02:17 -0700 |
commit | d6b0923681b7a99db939fd24c0cb99bacdb0e6fb (patch) | |
tree | 41c487b106347f5dd9256fcad5143b3c79162d38 | |
parent | 3b43beaaf667bdca8598ef5ae09e876d4cb78524 (diff) | |
download | sec_touch-d6b0923681b7a99db939fd24c0cb99bacdb0e6fb.tar.gz |
GKI: sec_touch: Enable modularization of the touch bus negotiator driver
These changes are required for the touch bus negotiator driver to work
correctly when CONFIG_TOUCHSCREEN_TBN=m.
Test: build, boot, touch works, tapping phone to check notification
worked.
Bug: 154089962
Change-Id: I2c0de7f91e94a6119966c130fe9fa207220910dd
Signed-off-by: Hridya Valsaraju <hridya@google.com>
-rw-r--r-- | sec_ts.c | 10 | ||||
-rw-r--r-- | sec_ts.h | 4 |
2 files changed, 7 insertions, 7 deletions
@@ -3311,7 +3311,7 @@ static int sec_ts_probe(struct spi_device *client) spi_set_drvdata(client, ts); #endif -#ifdef CONFIG_TOUCHSCREEN_TBN +#if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) ts->tbn = tbn_init(&ts->client->dev); if (!ts->tbn) { input_err(true, &ts->client->dev, @@ -3548,7 +3548,7 @@ err_allocate_input_dev_pad: if (ts->input_dev) input_free_device(ts->input_dev); err_allocate_input_dev: -#ifdef CONFIG_TOUCHSCREEN_TBN +#if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) tbn_cleanup(ts->tbn); err_init_tbn: #endif @@ -4117,7 +4117,7 @@ static int sec_ts_remove(struct spi_device *client) ts->plat_data->power(ts, false); -#ifdef CONFIG_TOUCHSCREEN_TBN +#if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) tbn_cleanup(ts->tbn); #endif @@ -4400,7 +4400,7 @@ static void sec_ts_suspend_work(struct work_struct *work) sec_set_switch_gpio(ts, SEC_SWITCH_GPIO_VALUE_SLPI_MASTER); -#ifdef CONFIG_TOUCHSCREEN_TBN +#if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) if (ts->tbn) tbn_release_bus(ts->tbn); #endif @@ -4418,7 +4418,7 @@ static void sec_ts_resume_work(struct work_struct *work) mutex_lock(&ts->device_mutex); -#ifdef CONFIG_TOUCHSCREEN_TBN +#if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) if (ts->tbn) tbn_request_bus(ts->tbn); #endif @@ -52,7 +52,7 @@ #include <linux/input/input_booster.h> #endif -#ifdef CONFIG_TOUCHSCREEN_TBN +#if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) #include <linux/input/touch_bus_negotiator.h> #endif @@ -985,7 +985,7 @@ struct sec_ts_data { bool palms_leaved_once; bool grips_leaved_once; -#ifdef CONFIG_TOUCHSCREEN_TBN +#if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) struct tbn_context *tbn; #endif |