Re: [PATCH 20/26] Input: synaptics-rmi4: Create common functions for 2D sensors
From: Linus Walleij
Date: Mon Nov 09 2015 - 08:28:22 EST
On Fri, Nov 6, 2015 at 12:42 AM, Andrew Duggan <aduggan@xxxxxxxxxxxxx> wrote:
> RMI4 defines two functions for 2D sensors. This patch moves some of the
> code which is shared between the two functions into a new file to avoid
> duplicating the code on rmi_f11.c and rmi_f12.c.
>
> Signed-off-by: Andrew Duggan <aduggan@xxxxxxxxxxxxx>
> .../bindings/input/rmi4/rmi_2d_sensor.txt | 55 +++
Split off and send to devicetree@xxxxxxxxxxxxxxx
I see you augmented the binding as I wanted it so:
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> drivers/input/rmi4/Kconfig | 11 +
> drivers/input/rmi4/Makefile | 2 +
> drivers/input/rmi4/rmi_2d_sensor.c | 370 ++++++++++++++++
> drivers/input/rmi4/rmi_2d_sensor.h | 87 ++++
> drivers/input/rmi4/rmi_f11.c | 487 +++++----------------
> include/linux/rmi.h | 30 +-
Should this be squashed into the F11 and F12 driver patches and a big
F11+F12 patch come out instead? I think that is the best.
> +config RMI4_2D_SENSOR
> + bool "RMI4 2D Sensors"
> + depends on RMI4_CORE
> + default y if RMI4_CORE
> + help
> + Say Y here if you want to add support for 2D Sensors.
> +
> + Provides core functionality for 2D multifinger pointing for
> + touchscreens and touchpads using RMI4 functions 11 and 12. This
> + feature is needed is the device contains either F11 or F12.
> +
> config RMI4_F11
> bool "RMI4 Function 11 (2D pointing)"
> depends on RMI4_CORE
Shouldn't F11 and F12 depend on RMI4_2D_SENSOR, or even select
it?
I think RMI4_2D_SENSOR should be hidden, i.e. just:
> +config RMI4_2D_SENSOR
> + bool
> + depends on RMI4_CORE
And then F11 and F12 select this hidden option.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/