From: Jeff LaBundy <jeff@labundy.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Bastien Nocera <hadess@hadess.net>,
Hans de Goede <hdegoede@redhat.com>,
Henrik Rydberg <rydberg@bitmath.org>,
linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 2/4] input: touchscreen: add core support for Goodix Berlin Touchscreen IC
Date: Mon, 12 Jun 2023 11:59:44 -0500 [thread overview]
Message-ID: <ZIdPAKqSsbXLrqHa@nixie71> (raw)
In-Reply-To: <3ad327dd-cefd-b195-2d64-6d6afc2d4283@linaro.org>
Hi Neil,
[...]
> > > + * - PEN Events
> >
> > What is "PEN"; is it "stylus" as written elsewhere?
>
> Yes, they use both terms in the vendor driver.
I recommend using a common term throughout; as written, I first thought
"PEN" was an acronym.
[...]
> > > + misc->fw_attr_len = le16_to_cpu(misc->fw_attr_len);
> > > + misc->fw_log_len = le16_to_cpu(misc->fw_log_len);
> > > + misc->stylus_struct_len = le16_to_cpu(misc->stylus_struct_len);
> > > + misc->mutual_struct_len = le16_to_cpu(misc->mutual_struct_len);
> > > + misc->self_struct_len = le16_to_cpu(misc->self_struct_len);
> > > + misc->noise_struct_len = le16_to_cpu(misc->noise_struct_len);
> > > + misc->touch_data_addr = le32_to_cpu(misc->touch_data_addr);
> > > + misc->touch_data_head_len = le16_to_cpu(misc->touch_data_head_len);
> > > + misc->point_struct_len = le16_to_cpu(misc->point_struct_len);
> > > + misc->mutual_rawdata_addr = le32_to_cpu(misc->mutual_rawdata_addr);
> > > + misc->mutual_diffdata_addr = le32_to_cpu(misc->mutual_diffdata_addr);
> > > + misc->mutual_refdata_addr = le32_to_cpu(misc->mutual_refdata_addr);
> > > + misc->self_rawdata_addr = le32_to_cpu(misc->self_rawdata_addr);
> > > + misc->self_diffdata_addr = le32_to_cpu(misc->self_diffdata_addr);
> > > + misc->self_refdata_addr = le32_to_cpu(misc->self_refdata_addr);
> > > + misc->iq_rawdata_addr = le32_to_cpu(misc->iq_rawdata_addr);
> > > + misc->iq_refdata_addr = le32_to_cpu(misc->iq_refdata_addr);
> > > + misc->im_rawdata_addr = le32_to_cpu(misc->im_rawdata_addr);
> > > + misc->im_readata_len = le16_to_cpu(misc->im_readata_len);
> > > + misc->noise_rawdata_addr = le32_to_cpu(misc->noise_rawdata_addr);
> > > + misc->noise_rawdata_len = le16_to_cpu(misc->noise_rawdata_len);
> > > + misc->stylus_rawdata_addr = le32_to_cpu(misc->stylus_rawdata_addr);
> > > + misc->stylus_rawdata_len = le16_to_cpu(misc->stylus_rawdata_len);
> > > + misc->noise_data_addr = le32_to_cpu(misc->noise_data_addr);
> > > + misc->esd_addr = le32_to_cpu(misc->esd_addr);
> >
> > What is all of this stuff for? The beginning of the driver explicitly states
> > that ESD recovery is not supported; please consider stripping all of this if
> > its only purpose is to support noise in the logs or sysfs attributes that we
> > cannot reasonably react to.
>
> Those are all the firmware parameters used by the driver, for now only a little
> are used, we already read the entire struct so stripping isn't an option otherwise
> the values will be shifted.
>
> We only print those over debugfs se it won't fill any logs
I feel this is a lot of bloat to simply enable pretty printing of register
values. Some of these struct members aren't even used anywhere; others seem
to be related to functions this driver does not support. Do you realistically
expect one to read those values?
For registers that customers would in fact need to read for debugging, can
you not simply rely on regmap's natural debugfs facility? It seems you are
largely duplicating that here.
I understand that some parameters are used elsewhere and it may be efficient
to read the entire memory region as a packed struct, but there is no need to
unalign and store what is effectively padding in many cases.
[...]
Kind regards,
Jeff LaBundy
next prev parent reply other threads:[~2023-06-12 17:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 14:31 [PATCH RFC 0/4] input: touchscreen: add initial support for Goodix Berlin touchscreen IC Neil Armstrong
2023-06-06 14:31 ` [PATCH RFC 1/4] dt-bindings: input: document Goodix Berlin Touchscreen IC Neil Armstrong
2023-06-07 8:35 ` Krzysztof Kozlowski
2023-06-14 22:28 ` Rob Herring
2023-06-06 14:31 ` [PATCH RFC 2/4] input: touchscreen: add core support for " Neil Armstrong
2023-06-12 4:45 ` Jeff LaBundy
2023-06-12 8:37 ` Neil Armstrong
2023-06-12 16:59 ` Jeff LaBundy [this message]
2023-06-06 14:31 ` [PATCH RFC 3/4] input: touchscreen: add I2C " Neil Armstrong
2023-06-12 3:09 ` Jeff LaBundy
2023-06-06 14:31 ` [PATCH RFC 4/4] input: touchscreen: add SPI " Neil Armstrong
2023-06-12 3:31 ` Jeff LaBundy
2023-06-12 12:01 ` Neil Armstrong
2023-06-12 17:07 ` Jeff LaBundy
2023-06-15 8:20 ` Neil Armstrong
2023-06-06 15:31 ` [PATCH RFC 0/4] input: touchscreen: add initial support for Goodix Berlin touchscreen IC Hans de Goede
2023-06-06 18:12 ` Neil Armstrong
2023-06-06 18:44 ` Dmitry Torokhov
2023-06-06 18:55 ` Neil Armstrong
2023-06-06 19:02 ` Dmitry Torokhov
2023-06-06 18:55 ` Hans de Goede
2023-06-19 7:06 ` Pavel Machek
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=ZIdPAKqSsbXLrqHa@nixie71 \
--to=jeff@labundy.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=hdegoede@redhat.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).