[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a0d900a4-7694-41b1-99bc-ebb69469c5b3@kernel.org>
Date: Fri, 23 Jan 2026 10:29:24 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: AThomas63 <andrew.thomas@...chnetix.com>, dmitry.torokhov@...il.com
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
mark.satterthwaite@...chnetix.com, m.felsch@...gutronix.de,
kamel.bouhara@...tlin.com
Subject: Re: [PATCH 1/1] Adding support for aXiom touchscreen controller
On 22/01/2026 13:48, AThomas63 wrote:
> Signed-off-by: AThomas63 <andrew.thomas@...chnetix.com>
Please run scripts/checkpatch.pl on the patches and fix reported
warnings. After that, run also 'scripts/checkpatch.pl --strict' on the
patches and (probably) fix more warnings. Some warnings can be ignored,
especially from --strict run, but the code here looks like it needs a
fix. Feel free to get in touch if the warning is not clear.
Running checkpatch is really basic and EVERY kernel guide asks you to do
that. Not doing it is not an excuse for your first patch, becasue when
writing first patch you should follow the first-patch guidelines or
kernel docs closely.
> ---
> drivers/input/touchscreen/Kconfig | 30 ++
> drivers/input/touchscreen/Makefile | 3 +
> drivers/input/touchscreen/axiom_core.c | 482 +++++++++++++++++++++++++
> drivers/input/touchscreen/axiom_core.h | 128 +++++++
> drivers/input/touchscreen/axiom_i2c.c | 152 ++++++++
> drivers/input/touchscreen/axiom_spi.c | 159 ++++++++
> 6 files changed, 954 insertions(+)
> create mode 100644 drivers/input/touchscreen/axiom_core.c
> create mode 100644 drivers/input/touchscreen/axiom_core.h
> create mode 100644 drivers/input/touchscreen/axiom_i2c.c
> create mode 100644 drivers/input/touchscreen/axiom_spi.c
>
> diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
> index 7d5b72ee07fa..f2b4fb317bdd 100644
> --- a/drivers/input/touchscreen/Kconfig
> +++ b/drivers/input/touchscreen/Kconfig
> @@ -162,6 +162,36 @@ config TOUCHSCREEN_AUO_PIXCIR
> To compile this driver as a module, choose M here: the
> module will be called auo-pixcir-ts.
>
> +config TOUCHSCREEN_AXIOM_CORE
> + tristate "TouchNetix Axiom touchscreen"
This should not be user-selectable. It's useless alone. Just "tristate"
and change the depending drivers to select it.
> + help
> + Say Y here if you have an Axiom touchscreen connected
> + to your system. You will also need to select appropriate
> + bus connection below.
> +
> + If unsure, say N.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called axiom_core.
> +
> +config TOUCHSCREEN_AXIOM_I2C
> + tristate "support I2C bus connection"
> + depends on TOUCHSCREEN_AXIOM_CORE && I2C
> + help
> + Say Y here if the touchscreen is connected via I2C bus.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called axiom_spi.
> +
> +config TOUCHSCREEN_AXIOM_SPI
> + tristate "support SPI bus connection"
> + depends on TOUCHSCREEN_AXIOM_CORE && SPI
> + help
> + Say Y here if the touchscreen is connected via SPI bus.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called axiom_spi.
> +
...
> + *
> + * Author(s): Mark Satterthwaite <mark.satterthwaite@...chnetix.com>
> + * Bart Prescott <bartp@...sheep.co.uk>
> + * Hannah Rossiter <hannah.rossiter@...chnetix.com>
> + * Andrew Thomas <andrew.thomas@...chnetix.com>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
No code in the kernel has such license boilerplate. Please use recent
Linux drivers as starting code. It's really pointless to send to
upstream some old vendor code, because you will repeat all the
mistakes/issues/old style which we fixed already over last 15 years.
> + *
...
> +
> +static const struct spi_device_id axiom_spi_id_table[] = {
> + { "axiom-spi" },
> + {},
> +};
> +MODULE_DEVICE_TABLE(spi, axiom_spi_id_table);
> +
> +static const struct of_device_id axiom_spi_dt_ids[] = {
> + {
> + .compatible = "tnx,axiom-spi",
> + .data = "axiom",
> + },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, axiom_spi_dt_ids);
> +
> +static struct spi_driver axiom_spi_driver = {
> + .id_table = axiom_spi_id_table,
> + .driver = {
> + .name = "axiom_spi",
> + .of_match_table = of_match_ptr(axiom_spi_dt_ids),
Drop of_match_ptr, leads to warnings here.
> + },
> + .probe = axiom_spi_probe,
> +};
> +
> +module_spi_driver(axiom_spi_driver);
> +
> +MODULE_AUTHOR("TouchNetix <support@...chnetix.com>");
> +MODULE_DESCRIPTION("aXiom touchscreen SPI bus driver");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("axiom");
Drop alias. You should not need MODULE_ALIAS() in normal cases. If you
need it, usually it means your device ID table is wrong (e.g. misses
either entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a
substitute for incomplete ID table.
> +MODULE_VERSION("1.0.0");
Best regards,
Krzysztof
Powered by blists - more mailing lists