Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 477dac8a authored by Vishnuvardhan Prodduturi's avatar Vishnuvardhan Prodduturi
Browse files

input: touchscreen: Add support for kernel command line parsing



Add support for kernel command line parsing in synaptic touch
screen driver. This enables dynamic touch driver selection for
a given target.

Change-Id: I9ba7b2162a6adad1eebae481c36d50f5804de9ad
Signed-off-by: default avatarVishnuvardhan Prodduturi <vproddut@codeaurora.org>
parent 8f24df85
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <linux/i2c.h>
#include <linux/of_gpio.h>
#include "synaptics_tcm_core.h"
#include "linux/moduleparam.h"

#define XFER_ATTEMPTS 10

@@ -46,6 +47,8 @@ static struct syna_tcm_hw_interface hw_if;

static struct platform_device *syna_tcm_i2c_device;

active_tp_setup(synaptics_tcm);

#ifdef CONFIG_OF
static int parse_dt(struct device *dev, struct syna_tcm_board_data *bdata)
{
@@ -398,6 +401,11 @@ static int syna_tcm_i2c_probe(struct i2c_client *i2c,
		const struct i2c_device_id *dev_id)
{
	int retval;
	struct device_node *dt = i2c->dev.of_node;

	if (synaptics_tcm_check_assigned_tp(dt, "compatible",
				"qcom,i2c-touch-active") < 0)
		return -ENODEV;

	syna_tcm_i2c_device = platform_device_alloc(PLATFORM_DRIVER_NAME, 0);
	if (!syna_tcm_i2c_device) {