diff options
-rw-r--r-- | goog_touch_interface.c | 18 | ||||
-rw-r--r-- | goog_touch_interface.h | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c index fdb11cd..db5666b 100644 --- a/goog_touch_interface.c +++ b/goog_touch_interface.c @@ -1339,6 +1339,24 @@ static void unregister_panel_bridge(struct drm_bridge *bridge) /*----------------------------------------------------------------------------- * GTI: functions. */ +bool goog_check_spi_dma_enabled(struct spi_device *spi_dev) +{ + bool ret = false; + + if (spi_dev && spi_dev->controller) { + struct device_node *np = spi_dev->controller->dev.of_node; + + /* + * Check the SPI controller(s3c64xx-spi) whether support DMA + * or not. + */ + ret = of_property_read_bool(np, "dma-mode"); + } + + return ret; +} +EXPORT_SYMBOL(goog_check_spi_dma_enabled); + int goog_process_vendor_cmd(struct goog_touch_interface *gti, enum gti_cmd_type cmd_type) { void *private_data = gti->vendor_private_data; diff --git a/goog_touch_interface.h b/goog_touch_interface.h index e4ea6b6..0bb1e36 100644 --- a/goog_touch_interface.h +++ b/goog_touch_interface.h @@ -561,7 +561,7 @@ struct goog_touch_interface { /*----------------------------------------------------------------------------- * Forward declarations. */ - +inline bool goog_check_spi_dma_enabled(struct spi_device *spi_dev); inline bool goog_input_legacy_report(struct goog_touch_interface *gti); inline void goog_input_lock(struct goog_touch_interface *gti); inline void goog_input_unlock(struct goog_touch_interface *gti); |