All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>,
	linux-input@vger.kernel.org, kernel@pengutronix.de,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH v3 5/5] Input: exc3000 - add firmware update support
Date: Sun, 7 Mar 2021 21:47:44 -0800	[thread overview]
Message-ID: <YEW6gGUmlYFI4T0+@google.com> (raw)
In-Reply-To: <20210125182527.1225245-6-l.stach@pengutronix.de>

Hi Lucas,

On Mon, Jan 25, 2021 at 07:25:27PM +0100, Lucas Stach wrote:
> This change allows the device firmware to be updated by putting a firmware
> file in /lib/firmware and providing the name of the file via the update_fw
> sysfs property. The driver will then flash the firmware image into the
> controller internal storage and restart the controller to activate the new
> firmware.
> 
> The implementation was done by looking at the the messages passed between
> the controller and proprietary vendor update tool. Not every detail of the
> protocol is totally well understood, so the implementation still has some
> "monkey see, monkey do" parts, as far as they have been found to be required
> for the update to succeed.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  .../ABI/testing/sysfs-driver-input-exc3000    |  20 ++
>  drivers/input/touchscreen/exc3000.c           | 240 +++++++++++++++++-
>  2 files changed, 258 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-driver-input-exc3000 b/Documentation/ABI/testing/sysfs-driver-input-exc3000
> index 704434b277b0..123a00ccee8b 100644
> --- a/Documentation/ABI/testing/sysfs-driver-input-exc3000
> +++ b/Documentation/ABI/testing/sysfs-driver-input-exc3000
> @@ -24,3 +24,23 @@ Description:	Reports the type identification provided by the touchscreen, for ex
>  		Access: Read
>  
>  		Valid values: Represented as string
> +
> +What:		/sys/bus/i2c/devices/xxx/update_fw
> +Date:		Jan 2021
> +Contact:	linux-input@vger.kernel.org
> +Description:	Allows to specify a firlename of a firmware file located in /lib/firmware/ that will be
> +		used to update the application firmware on the touchscreen controller. For example
> +		"eeti/eeti_27_0_EDipper_0735.fw"

I believe the current idiomatic way is to have statically defined
firmware name (it can still encode vid/pid/model info etc) and do not
re-implement variable firmware name in every driver.

I think if this really is required we need to add this feature of
overriding default firmware name to firmware loader maybe?

Thanks.

-- 
Dmitry

  reply	other threads:[~2021-03-08  5:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 18:25 [PATCH v3 0/5] exc3000 firmware update support Lucas Stach
2021-01-25 18:25 ` [PATCH v3 1/5] Input: exc3000 - split MT event handling from IRQ handler Lucas Stach
2021-03-08  5:43   ` Dmitry Torokhov
2021-01-25 18:25 ` [PATCH v3 2/5] Input: exc3000 - factor out vendor data request Lucas Stach
2021-03-08  5:43   ` Dmitry Torokhov
2021-01-25 18:25 ` [PATCH v3 3/5] Input: exc3000 - fix firmware version query for device in bootloader Lucas Stach
2021-03-08  5:44   ` Dmitry Torokhov
2021-01-25 18:25 ` [PATCH v3 4/5] Input: exc3000 - add type sysfs attribute Lucas Stach
2021-03-08  5:44   ` Dmitry Torokhov
2021-01-25 18:25 ` [PATCH v3 5/5] Input: exc3000 - add firmware update support Lucas Stach
2021-03-08  5:47   ` Dmitry Torokhov [this message]
2021-03-08  9:17     ` Lucas Stach
2021-03-05 10:50 ` [PATCH v3 0/5] exc3000 " Lucas Stach

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=YEW6gGUmlYFI4T0+@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-input@vger.kernel.org \
    --cc=patchwork-lst@pengutronix.de \
    --cc=sebastian.reichel@collabora.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.