mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Thomas <andrew.thomas@touchnetix.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
	 Russ Weight <russ.weight@linux.dev>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	 Kamel Bouhara <kamel.bouhara@bootlin.com>,
	Marco Felsch <kernel@pengutronix.de>,
	 Henrik Rydberg <rydberg@bitmath.org>,
	Danilo Krummrich <dakr@kernel.org>,
	linux-kernel@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-input@vger.kernel.org
Subject: Re: [PATCH v6 4/4] Input: Add TouchNetix aXiom I2C Touchscreen support
Date: Mon, 23 Mar 2026 09:59:48 +0000	[thread overview]
Message-ID: <hxa6vfro5jirigd4jqm37wqlyslphy4yqctbbaeraz4sfcx366@qklnqawxb4t6> (raw)
In-Reply-To: <enyz3io3i7mzoaquexpkbsjtxmcuib7lxj334ii2yqvdgpvajb@aspqccwo7vnf>

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@pengutronix.de>
>> >---
>
>...
>
>> >+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@touchnetix.com>


  reply	other threads:[~2026-03-23 10:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 22:41 [PATCH v6 0/4] Input: Add support for TouchNetix aXiom touchscreen Marco Felsch
2026-03-03 22:41 ` [PATCH v6 1/4] firmware_loader: expand firmware error codes with up-to-date error Marco Felsch
2026-03-03 22:41 ` [PATCH v6 2/4] dt-bindings: vendor-prefixes: Add TouchNetix AS Marco Felsch
2026-03-03 22:41 ` [PATCH v6 3/4] dt-bindings: input: Add TouchNetix axiom touchscreen Marco Felsch
2026-03-03 22:41 ` [PATCH v6 4/4] Input: Add TouchNetix aXiom I2C Touchscreen support Marco Felsch
2026-03-13 17:07   ` Andrew Thomas
2026-03-13 19:50     ` Marco Felsch
2026-03-23  9:59       ` Andrew Thomas [this message]
2026-07-02 22:29 [PATCH v6 0/4] Input: Add support for TouchNetix aXiom touchscreen Marco Felsch
2026-07-02 22:29 ` [PATCH v6 4/4] Input: Add TouchNetix aXiom I2C Touchscreen support Marco Felsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=hxa6vfro5jirigd4jqm37wqlyslphy4yqctbbaeraz4sfcx366@qklnqawxb4t6 \
    --to=andrew.thomas@touchnetix.com \
    --cc=akpm@linux-foundation.org \
    --cc=conor+dt@kernel.org \
    --cc=dakr@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kamel.bouhara@bootlin.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=mcgrof@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=rydberg@bitmath.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox