Re: [PATCH 2/2] input: Add support for Azoteq IQS626A

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry,

Thank you for taking a look.

On Sun, Nov 22, 2020 at 11:03:07PM -0800, Dmitry Torokhov wrote:
> Hi Jeff,
> 
> On Sun, Nov 22, 2020 at 04:39:08PM -0600, Jeff LaBundy wrote:
> > +
> > +		if ((sys_reg->active & tp_mask) == tp_mask)
> > +			input_set_abs_params(iqs626->trackpad,
> > +					     ABS_X, 0, 255, 0, 0);
> > +		else
> > +			input_set_abs_params(iqs626->trackpad,
> > +					     ABS_X, 0, 128, 0, 0);
> > +#ifdef CONFIG_TOUCHSCREEN_PROPERTIES
> > +		touchscreen_parse_properties(iqs626->trackpad, false,
> > +					     &iqs626->prop);
> > +#endif /* CONFIG_TOUCHSCREEN_PROPERTIES */
> 
> This should not be separately selectable from CONFIG_INPUT, so there is
> not need to have this guard.
> 
> The reason it is a separate symbol is historical - it used to depend on
> OF in addition to INPUT. I suppose I can drop it now.

Without these guards, the build fails if CONFIG_INPUT_TOUCHSCREEN=n and
I felt it too heavy-handed to add a 'depends on' for what is ultimately
a corner-case of sorts for this device.

The touchscreen helpers are useful for more than just touchscreens, and
we can extend them to all of input with something like the patch below.
If it looks OK to you, I can insert it into v2 after I collect feedback
from Rob for the binding.

> 
> Thanks.
> 
> -- 
> Dmitry

Kind regards,
Jeff LaBundy

diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index e356509..d050974 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -7,6 +7,7 @@
 
 obj-$(CONFIG_INPUT)		+= input-core.o
 input-core-y := input.o input-compat.o input-mt.o input-poller.o ff-core.o
+input-core-y += touchscreen/of_touchscreen.o
 
 obj-$(CONFIG_INPUT_FF_MEMLESS)	+= ff-memless.o
 obj-$(CONFIG_INPUT_POLLDEV)	+= input-polldev.o
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index f012fe7..4c33278 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -12,10 +12,6 @@ menuconfig INPUT_TOUCHSCREEN
 
 if INPUT_TOUCHSCREEN
 
-config TOUCHSCREEN_PROPERTIES
-	def_tristate INPUT
-	depends on INPUT
-
 config TOUCHSCREEN_88PM860X
 	tristate "Marvell 88PM860x touchscreen"
 	depends on MFD_88PM860X
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 6233541..80cd241 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -7,7 +7,6 @@
 
 wm97xx-ts-y := wm97xx-core.o
 
-obj-$(CONFIG_TOUCHSCREEN_PROPERTIES)	+= of_touchscreen.o
 obj-$(CONFIG_TOUCHSCREEN_88PM860X)	+= 88pm860x-ts.o
 obj-$(CONFIG_TOUCHSCREEN_AD7877)	+= ad7877.o
 obj-$(CONFIG_TOUCHSCREEN_AD7879)	+= ad7879.o




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux