Re: [PATCH v6 4/4] Input: Add TouchNetix aXiom I2C Touchscreen support
From: Andrew Thomas
Date: Mon Mar 23 2026 - 06:01:25 EST
On Fri, Mar 13, 2026 at 08:50:05PM +0100, Marco Felsch wrote:
Hi Andrew,
thanks for your feedback! Please see below.
On 26-03-13, Andrew Thomas wrote:
On Tue, Mar 03, 2026 at 11:41:22PM +0100, Marco Felsch wrote:
>This adds the initial support for the TouchNetix AX54A touchcontroller
>which is part of TouchNetix's aXiom touchscreen controller family.
>
>The TouchNetix aXiom family provides two physical interfaces: SPI and
>I2C. This patch covers only the I2C interface.
>
>Apart the input event handling the driver supports firmware updates too.
>One firmware interface handles the touchcontroller firmware (AXFW)
>update the other handles the touchcontroller configuration (TH2CFGBIN)
>update.
>
>Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
>---
...
>+static int axiom_u02_enter_bootloader(struct axiom_data *ts)
>+{
>+ struct axiom_u02_rev1_system_manager_msg msg = { };
>+ struct device *dev = ts->dev;
>+ unsigned int val;
>+ int error;
>+
>+ if (!axiom_driver_supports_usage(ts, AXIOM_U02))
>+ return -EINVAL;
>+
>+ /*
>+ * Enter the bootloader mode requires 3 consecutive messages so we can't
>+ * check for the response.
>+ * TODO: Check if it's required to add a delay between the consecutive
>+ * CMD_ENTERBOOTLOADER cmds.
>+ */
>+ msg.command = cpu_to_le16(AXIOM_U02_REV1_CMD_ENTERBOOTLOADER);
>+ msg.parameters[0] = cpu_to_le16(AXIOM_U02_REV1_PARAM0_ENTERBOOLOADER_KEY1);
>+ error = axiom_u02_send_msg(ts, &msg, false);
As mentioned before the delay between commands is too short and the
next command is sent before u02 is ready, which means the driver fails
to put axiom into the bootloader.
Please see my comment [1].
Have you tested with an i2c speed of 400KHz?
Yes, my target platform is based on a i.MX8MP.
All you need is to put true in above to wait for the bootloader command.
error = axiom_u02_send_msg(ts, &msg, true);
Please see my comment [1].
Just dont do it for the last command.
Please see my comment [1].
I am not too sure why you are having issues with this, this is how we
do it for all our devices.
Please see my comment [1].
On what platform do you perform the tests?
>+ if (error) {
>+ dev_err(dev, "Failed to send bootloader-key1: %d\n", error);
>+ return error;
>+ }
>+
>+ msg.parameters[0] = cpu_to_le16(AXIOM_U02_REV1_PARAM0_ENTERBOOLOADER_KEY2);
>+ error = axiom_u02_send_msg(ts, &msg, false);
Here also.
Please see my comment [1].
>+ if (error) {
>+ dev_err(dev, "Failed to send bootloader-key2: %d\n", error);
>+ return error;
>+ }
>+
>+ msg.parameters[0] = cpu_to_le16(AXIOM_U02_REV1_PARAM0_ENTERBOOLOADER_KEY3);
>+ error = axiom_u02_send_msg(ts, &msg, false);
>+ if (error) {
>+ dev_err(dev, "Failed to send bootloader-key3: %d\n", error);
>+ return error;
>+ }
>+
>+ /* Sleep before the first read to give the device time */
>+ fsleep(250 * USEC_PER_MSEC);
>+
>+ /* Wait till the device reports it is in bootloader mode */
>+ error = regmap_read_poll_timeout(ts->regmap,
>+ AXIOM_U31_REV1_DEVICE_ID_HIGH_REG, val,
>+ FIELD_GET(AXIOM_U31_REV1_MODE_MASK, val) ==
>+ AXIOM_U31_REV1_MODE_BLP,
>+ 250 * USEC_PER_MSEC, USEC_PER_SEC);
>+ if (error)
>+ return error;
>+
>+ return 0;
>+}
>+
...
Other than the above comments I have no issues with the driver.
If you're fine with the patch you could add your acked-by [2] :)
We can support more usages in a later patch.
Sure :)
[1] https://lore.kernel.org/all/4x3dnedfzf3rqzsy3wjdoj6yaxmy6kop37xhxeao4vjer7ifdi@35ux42ztq3eb
[2] https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
Regards,
Marco
--
#gernperDu
#CallMeByMyFirstName
Pengutronix e.K. | |
Steuerwalder Str. 21 | https://www.pengutronix.de |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Acked-by: Andrew Thomas <andrew.thomas@xxxxxxxxxxxxxx>