From: Benjamin Bara <bbara93@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: bbara93@gmail.com, benjamin.bara@skidata.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Input: ads7846 - don't set ABS_PRESSURE when min == max
Date: Fri, 28 Jul 2023 15:38:59 +0200 [thread overview]
Message-ID: <20230728133859.3808994-1-bbara93@gmail.com> (raw)
In-Reply-To: <ZMLV9BVxHx3jlE5R@google.com>
Hi Dmitry,
thank you for the feedback!
On Thu, 27 Jul 2023 at 22:39, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Thu, Jul 27, 2023 at 05:19:57PM +0200, Benjamin Bara wrote:
> > From: Benjamin Bara <benjamin.bara@skidata.com>
> >
> > When the optional fields "pressure_min" and "pressure_max" are not set,
> > both fall back to 0, which results to the following libinput error:
> >
> > ADS7846 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE
> >
> > Avoid it by only setting ABS_PRESSURE if the values differ.
>
> What is the benefit of silently continuing without reporting pressure on
> models that do support pressure readings, vs. using libinput's errors as
> signal to adjust DT?
With the current implementation, libinput rejects the device [1] when an
optional device-tree field is not set, which leads to a "non-functional" device.
But you are right, silently continuing might also not be the best option...
I could provide a v2 where the maximum is set to a fallback value (~0) and a
warning is printed that the pressure is not set and therefore a fallback value
is used, to signal the user to adjust the DT.
What do you think about that?
Best regards
Benjamin
[1] https://gitlab.freedesktop.org/libinput/libinput/-/blob/1.23.0/src/evdev.c?ref_type=tags#L1816
prev parent reply other threads:[~2023-07-28 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 15:19 [PATCH] Input: ads7846 - don't set ABS_PRESSURE when min == max Benjamin Bara
2023-07-27 20:39 ` Dmitry Torokhov
2023-07-28 13:38 ` Benjamin Bara [this message]
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=20230728133859.3808994-1-bbara93@gmail.com \
--to=bbara93@gmail.com \
--cc=benjamin.bara@skidata.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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