* [PATCH AUTOSEL 4.4 27/92] HID: logitech-hidpp: use RAP instead of FAP to get the protocol version
From: Sasha Levin @ 2019-05-22 19:30 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hans de Goede, Benjamin Tissoires, Sasha Levin, linux-input
In-Reply-To: <20190522193127.27079-1-sashal@kernel.org>
From: Hans de Goede <hdegoede@redhat.com>
[ Upstream commit 096377525cdb8251e4656085efc988bdf733fb4c ]
According to the logitech_hidpp_2.0_specification_draft_2012-06-04.pdf doc:
https://lekensteyn.nl/files/logitech/logitech_hidpp_2.0_specification_draft_2012-06-04.pdf
We should use a register-access-protocol request using the short input /
output report ids. This is necessary because 27MHz HID++ receivers have
a max-packetsize on their HIP++ endpoint of 8, so they cannot support
long reports. Using a feature-access-protocol request (which is always
long or very-long) with these will cause a timeout error, followed by
the hidpp driver treating the device as not being HID++ capable.
This commit fixes this by switching to using a rap request to get the
protocol version.
Besides being tested with a (046d:c517) 27MHz receiver with various
27MHz keyboards and mice, this has also been tested to not cause
regressions on a non-unifying dual-HID++ nano receiver (046d:c534) with
k270 and m185 HID++-2.0 devices connected and on a unifying/dj receiver
(046d:c52b) with a HID++-2.0 Logitech Rechargeable Touchpad T650.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/hid-logitech-hidpp.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 5fd97860aec4d..3666e5064d0d3 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -414,13 +414,16 @@ static int hidpp_root_get_feature(struct hidpp_device *hidpp, u16 feature,
static int hidpp_root_get_protocol_version(struct hidpp_device *hidpp)
{
+ const u8 ping_byte = 0x5a;
+ u8 ping_data[3] = { 0, 0, ping_byte };
struct hidpp_report response;
int ret;
- ret = hidpp_send_fap_command_sync(hidpp,
+ ret = hidpp_send_rap_command_sync(hidpp,
+ REPORT_ID_HIDPP_SHORT,
HIDPP_PAGE_ROOT_IDX,
CMD_ROOT_GET_PROTOCOL_VERSION,
- NULL, 0, &response);
+ ping_data, sizeof(ping_data), &response);
if (ret == HIDPP_ERROR_INVALID_SUBID) {
hidpp->protocol_major = 1;
@@ -440,8 +443,14 @@ static int hidpp_root_get_protocol_version(struct hidpp_device *hidpp)
if (ret)
return ret;
- hidpp->protocol_major = response.fap.params[0];
- hidpp->protocol_minor = response.fap.params[1];
+ if (response.rap.params[2] != ping_byte) {
+ hid_err(hidpp->hid_dev, "%s: ping mismatch 0x%02x != 0x%02x\n",
+ __func__, response.rap.params[2], ping_byte);
+ return -EPROTO;
+ }
+
+ hidpp->protocol_major = response.rap.params[0];
+ hidpp->protocol_minor = response.rap.params[1];
return ret;
}
--
2.20.1
^ permalink raw reply related
* Re: [PATCH 2/2] Input: synaptics - remove X240 from the topbuttonpad list
From: Aaron Ma @ 2019-05-23 5:02 UTC (permalink / raw)
To: Benjamin Tissoires, Dmitry Torokhov
Cc: open list:HID CORE LAYER, lkml, Christopher Heiny, Andrew Duggan,
Hans de Goede
In-Reply-To: <CAO-hwJLXB8Qec9Yhz0y6WgvEpE6KHk_53g4VtPGj9mfvMzk4dg@mail.gmail.com>
On 5/21/19 2:49 PM, Benjamin Tissoires wrote:
> A quick google image search showed that the X240 had 2 versions: one
> with the top software buttons, one without.
>
> And this definitively rings a bell. I am sure we asked Lenovo and
> Synaptics to change the PnPID when they would do such a change, but
> they "forgot" during the *40 series refresh.
> We have code in place to fix the reported ranges of the coordinates,
> and we had to check against the board id (see min_max_pnpid_table[] in
> synaptics.c).
> Unfortunately, X240 (LEN0035) is not part of this table, so I don't
> know which refresh of the board ID has implemented the non top
> software buttons.
After double confirm from Lenovo, looks like they mixed up with
touchpads on X240/X240s.
For now only one user reported this LEN0035 doesn't work on SMBus mode.
module parameter can be a workaround.
Maybe some touchpads with software top buttons are working well on
SMBus. Let's keep eyes on this issue for now.
Regards,
Aaron
>
> Cheers,
> Benjamin
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Peter Hutterer @ 2019-05-23 6:01 UTC (permalink / raw)
To: Pali Rohár
Cc: Xiaoxiao Liu, dmitry.torokhov, Hui Wang, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <20190522074030.64sy7xt3wnomtxjb@pali>
On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
> On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
> > Hi Pali,
> >
> > Ok, and cannot you set ALPS_DUALPOINT flag based on that
> > alps_check_is_trackpoint() result and then update
> > alps_process_packet_ss4_v3() code to supports also
> > V8 trackpoint packets?
> > --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
> > Then we choose the standard mouse driver.
>
> Mouse speed is something which is configurable. Have you configured it
> somehow? Also there is libinput project should handle these settings
> more properly.
>
> Adding Peter Hutterer, maintainer of libinput to loop. I think he could
> help with this problem.
libinput has a quirk for a magic multiplier on trackpoints. it was the only
solution I found that came close to "working" given that every device seems
to provide some other random magic data. Doc for it is here:
https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
There are also different speeds depending on which xorg driver you'd use (or
libinput/Wayland), so a "mouse speed is not ideal" is almost a guarantee,
given a large enough variety of setups :) That's why we have the speed
toggle, but I'm happy to hear any suggestions on how to make the trackpoint
more useful (in libinput anyway).
> I do not think it is a good idea to force back to generic PS/2 mouse
> driver for touchpads and trackpoints. Native drivers for touchpads and
> trackpoints supports multitouch, absolute reporting and lot of other
> things... Also calculation of mouse speed from absolute positions on
> touchpads can be more easily fixed as from emulated relative movements.
Yeah, agree. Using PS/2 mouse drivers means you lose *all* the extra
features touchpads have like palm detection, tapping, scrolling, gestures,
etc.
Cheers,
Peter
>
> Dmitry, what is your opinion about this problem? What should psmouse.ko
> do in this situation? Disallow usage of absolute mode and force bare
> PS/2 relative mode?
^ permalink raw reply
* Re: [PATCH RESEND] input: adp5589: Add gpio_set_multiple interface
From: Dmitry Torokhov @ 2019-05-23 7:18 UTC (permalink / raw)
To: Bogdan Togorean; +Cc: linux-input, gustavo, linux-kernel, Michael.Hennerich
In-Reply-To: <20190521083821.26540-1-bogdan.togorean@analog.com>
Hi Bogdan,
On Tue, May 21, 2019 at 11:38:22AM +0300, Bogdan Togorean wrote:
> This patch implements the gpio_set_multiple interface for ADP558x chip.
>
> Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com>
> ---
> drivers/input/keyboard/adp5589-keys.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
> index 2835fba71c33..143871bd60ef 100644
> --- a/drivers/input/keyboard/adp5589-keys.c
> +++ b/drivers/input/keyboard/adp5589-keys.c
> @@ -416,6 +416,30 @@ static void adp5589_gpio_set_value(struct gpio_chip *chip,
> mutex_unlock(&kpad->gpio_lock);
> }
>
> +static void adp5589_gpio_set_multiple(struct gpio_chip *chip,
> + unsigned long *mask, unsigned long *bits)
> +{
> + struct adp5589_kpad *kpad = container_of(chip, struct adp5589_kpad, gc);
> + u8 bank, reg_mask, reg_bits;
> +
> + mutex_lock(&kpad->gpio_lock);
> +
> + for (bank = 0; bank <= kpad->var->bank(kpad->var->maxgpio); bank++) {
> + if (bank > kpad->var->bank(get_bitmask_order(*mask) - 1))
> + break;
I wonder if we should have:
last_gpio = min(kpad->var->maxgpio, get_bitmask_order(*mask) - 1);
last_bank = kpad->var->bank(last_bank);
for (bank = 0; bank <= last_bank; bank++) {
...
}
> + reg_mask = mask[bank / sizeof(*mask)] >>
> + ((bank % sizeof(*mask)) * BITS_PER_BYTE);
> + reg_bits = bits[bank / sizeof(*bits)] >>
> + ((bank % sizeof(*bits)) * BITS_PER_BYTE);
This s really hard to parse. We know that "bank" is a byte, and mask is
long, we do not have to be this roundabout it.
> + kpad->dat_out[bank] &= ~reg_mask;
> + kpad->dat_out[bank] |= reg_bits & reg_mask;
> + adp5589_write(kpad->client, kpad->var->reg(ADP5589_GPO_DATA_OUT_A) + bank,
> + kpad->dat_out[bank]);
> + }
However the biggest issue is that this implementation seems to ignore
the kpad->gpiomap that translates GPIO numbers as seen by gpiolib to
GPIO numbers used by the chip. You need to reshuffle the mask and bits,
and only then do the writes.
Given the complexities, does set_multiple really save anything?
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH] input: silead: Add MSSL0017 to acpi_device_id.
From: Dmitry Torokhov @ 2019-05-23 7:20 UTC (permalink / raw)
To: Hans de Goede; +Cc: Danct12, linux-input, platform-driver-x86, linux-kernel
In-Reply-To: <6c18472f-bedd-6e6d-121c-8a311495c3c3@redhat.com>
On Wed, May 22, 2019 at 12:12:47PM +0200, Hans de Goede wrote:
> Hi,
>
> On 22-05-19 06:54, Danct12 wrote:
> > On Chuwi Hi10 Plus, the Silead device id is MSSL0017.
> >
> > Signed-off-by: Danct12 <danct12@disroot.org>
>
> Patch looks good to me:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
We however need to have a real name for the Signed-off-by.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v2 00/10] Fix Elan I2C touchpads in latest generation from Lenovo
From: Benjamin Tissoires @ 2019-05-23 13:25 UTC (permalink / raw)
To: Dmitry Torokhov, KT Liao, Rob Herring, Aaron Ma, Hans de Goede
Cc: open list:HID CORE LAYER, lkml, devicetree
In-Reply-To: <20190521132712.2818-1-benjamin.tissoires@redhat.com>
Hi,
On Tue, May 21, 2019 at 3:27 PM Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
>
> Hi,
>
> This is the v2 from https://lkml.org/lkml/2018/10/12/633
>
> So I initially thought it would be easy to integrate the suggested changes
> in the v1, but it turns our that the changes to have the touchscreen-width
> and height parameters were quite hard to do.
>
> I finally postponed the issue by blacklisting the 2 laptops we knew were
> not working and tried to devote more time to understand both drivers more.
>
> But it s the time where Lenovo is preparing the new models, and guess what,
> they suffer from the same symptoms.
I just received the confirmation from Lenovo that this series makes
the new laptops working.
Cheers,
Benjamin
>
> So I took a few time to work on this and finally got my head around the
> width and height problem. Once I got it, it was simple clear, but this also
> means we can not really rely on a device tree property for that.
>
> So in the elan* drivers, the "traces" are simply how many antennas there
> are on each axis. Which means that if a trace of 4 is reported in the
> events, it means it is simply seen by 4 antennas. So the computation of the
> width/height is the following: we take how many antennas there are, we
> subtract one to have the number of holes between the antennas, and we
> divide the number of unit we have in the axis by the value we just
> computed.
> This gives a rough 4mm on the P52, in both directions.
>
> And once you get that, you can just realize that the unit of the width and
> height are just the same than the X and Y coordinates, so we can apply the
> same resolution.
>
> So, in the end, that means that elan_i2c needs the information, or it will
> not be able to convert the number of crossed antennas into a size, but this
> is something specific to this touchpad.
>
> So here come, 7 months later the v2 on the subject.
>
> Cheers,
> Benjamin
>
> Benjamin Tissoires (10):
> Input: elantech - query the min/max information beforehand too
> Input: elantech - add helper function elantech_is_buttonpad()
> Input: elantech - detect middle button based on firmware version
> dt-bindings: add more optional properties for elan_i2c touchpads
> Input: elan_i2c - do not query the info if they are provided
> Input: elantech/SMBus - export all capabilities from the PS/2 node
> Input: elan_i2c - handle physical middle button
> Input: elan_i2c - export true width/height
> Input: elan_i2c - correct the width/size base value
> Input: elantech: remove P52 from SMBus blacklist
>
> .../devicetree/bindings/input/elan_i2c.txt | 11 +
> drivers/input/mouse/elan_i2c_core.c | 85 +++--
> drivers/input/mouse/elantech.c | 318 ++++++++++--------
> drivers/input/mouse/elantech.h | 8 +
> 4 files changed, 251 insertions(+), 171 deletions(-)
>
> --
> 2.21.0
>
^ permalink raw reply
* [PATCH] input: silead: Add MSSL0017 to acpi_device_id.
From: Daniel Smith @ 2019-05-23 19:06 UTC (permalink / raw)
To: Hans de Goede
Cc: Daniel Smith, Dmitry Torokhov, linux-input, platform-driver-x86,
linux-kernel
On Chuwi Hi10 Plus, the Silead device id is MSSL0017.
Signed-off-by: Daniel Smith <danct12@disroot.org>
---
drivers/input/touchscreen/silead.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
index 09241d4cdebc..06f0eb04a8fd 100644
--- a/drivers/input/touchscreen/silead.c
+++ b/drivers/input/touchscreen/silead.c
@@ -617,6 +617,7 @@ static const struct acpi_device_id silead_ts_acpi_match[] = {
{ "MSSL1680", 0 },
{ "MSSL0001", 0 },
{ "MSSL0002", 0 },
+ { "MSSL0017", 0 },
{ }
};
MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);
--
2.21.0
^ permalink raw reply related
* [PATCH] platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Plus tablet.
From: Daniel Smith @ 2019-05-23 19:09 UTC (permalink / raw)
Cc: Daniel Smith, Hans de Goede, Darren Hart, Andy Shevchenko,
linux-input, platform-driver-x86, linux-kernel
Added touch screen info for CHUWI Hi10 Plus tablet.
Signed-off-by: Daniel Smith <danct12@disroot.org>
---
drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index bd0856d2e825..1dbb53c3f1e7 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -91,6 +91,22 @@ static const struct ts_dmi_data chuwi_hi10_air_data = {
.properties = chuwi_hi10_air_props,
};
+static const struct property_entry chuwi_hi10_plus_props[] = {
+ PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
+ PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
+ PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
+ PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
+ PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
+ PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+ PROPERTY_ENTRY_BOOL("silead,home-button"),
+ { }
+};
+
+static const struct ts_dmi_data chuwi_hi10_plus_data = {
+ .acpi_name = "MSSL0017:00",
+ .properties = chuwi_hi10_plus_props,
+};
+
static const struct property_entry chuwi_vi8_props[] = {
PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
@@ -605,6 +621,15 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
},
},
+ {
+ /* Chuwi Hi10 Plus (CWI527) */
+ .driver_data = (void *)&chuwi_hi10_plus_data,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
+ DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+ },
+ },
{
/* Chuwi Vi8 (CWI506) */
.driver_data = (void *)&chuwi_vi8_data,
--
2.21.0
^ permalink raw reply related
* Re: [PATCH] input: silead: Add MSSL0017 to acpi_device_id.
From: Dmitry Torokhov @ 2019-05-23 19:55 UTC (permalink / raw)
To: Daniel Smith
Cc: Hans de Goede, linux-input, platform-driver-x86, linux-kernel
In-Reply-To: <20190523190659.3117-1-danct12@disroot.org>
On Fri, May 24, 2019 at 02:06:59AM +0700, Daniel Smith wrote:
> On Chuwi Hi10 Plus, the Silead device id is MSSL0017.
>
> Signed-off-by: Daniel Smith <danct12@disroot.org>
Applied keeping Hans' reviewed-by from the previous version; thank you.
> ---
> drivers/input/touchscreen/silead.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
> index 09241d4cdebc..06f0eb04a8fd 100644
> --- a/drivers/input/touchscreen/silead.c
> +++ b/drivers/input/touchscreen/silead.c
> @@ -617,6 +617,7 @@ static const struct acpi_device_id silead_ts_acpi_match[] = {
> { "MSSL1680", 0 },
> { "MSSL0001", 0 },
> { "MSSL0002", 0 },
> + { "MSSL0017", 0 },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, silead_ts_acpi_match);
> --
> 2.21.0
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH] Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOAD
From: Dmitry Torokhov @ 2019-05-23 19:59 UTC (permalink / raw)
To: Andrey Smirnov
Cc: linux-input, Pierre-Loup A . Griffais, stable, linux-kernel
In-Reply-To: <20190522013922.25538-1-andrew.smirnov@gmail.com>
On Tue, May 21, 2019 at 06:39:22PM -0700, Andrey Smirnov wrote:
> In the case of compat syscall ioctl numbers for UI_BEGIN_FF_UPLOAD and
> UI_END_FF_UPLOAD need to be adjusted before being passed on
> uinput_ioctl_handler() since code built with -m32 will be passing
> slightly different values. Extend the code already covering
> UI_SET_PHYS to cover UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD as well.
>
> Reported-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: linux-input@vger.kernel.org
> Cc: stable@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
Applied, thank you.
> ---
> drivers/input/misc/uinput.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
> index 1a6762fc38f9..1116d4cd5695 100644
> --- a/drivers/input/misc/uinput.c
> +++ b/drivers/input/misc/uinput.c
> @@ -1051,13 +1051,24 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>
> #ifdef CONFIG_COMPAT
>
> -#define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t)
> +#define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t)
> +#define UI_BEGIN_FF_UPLOAD_COMPAT _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload_compat)
> +#define UI_END_FF_UPLOAD_COMPAT _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload_compat)
>
> static long uinput_compat_ioctl(struct file *file,
> unsigned int cmd, unsigned long arg)
> {
> - if (cmd == UI_SET_PHYS_COMPAT)
> + switch (cmd) {
> + case UI_SET_PHYS_COMPAT:
> cmd = UI_SET_PHYS;
> + break;
> + case UI_BEGIN_FF_UPLOAD_COMPAT:
> + cmd = UI_BEGIN_FF_UPLOAD;
> + break;
> + case UI_END_FF_UPLOAD_COMPAT:
> + cmd = UI_END_FF_UPLOAD;
> + break;
> + }
>
> return uinput_ioctl_handler(file, cmd, arg, compat_ptr(arg));
> }
> --
> 2.21.0
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH 2/2] input: keyboard: mtk-pmic-keys: add MT6392 support
From: Dmitry Torokhov @ 2019-05-23 22:55 UTC (permalink / raw)
To: Fabien Parent
Cc: robh+dt, mark.rutland, matthias.bgg, linux-input, devicetree,
linux-arm-kernel, linux-mediatek, linux-kernel
In-Reply-To: <20190513142120.6527-2-fparent@baylibre.com>
On Mon, May 13, 2019 at 04:21:20PM +0200, Fabien Parent wrote:
> Add support for MT6392 PMIC's keys.
>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
Apparently this depends on not-yet merged MT6392 support in MFD, so
please merge through MFD tree with the rest of it.
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/input/keyboard/mtk-pmic-keys.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index 8e6ebab05ab4..aaf68cbf7e5b 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -18,6 +18,7 @@
> #include <linux/interrupt.h>
> #include <linux/kernel.h>
> #include <linux/mfd/mt6323/registers.h>
> +#include <linux/mfd/mt6392/registers.h>
> #include <linux/mfd/mt6397/core.h>
> #include <linux/mfd/mt6397/registers.h>
> #include <linux/module.h>
> @@ -83,6 +84,16 @@ static const struct mtk_pmic_regs mt6323_regs = {
> .pmic_rst_reg = MT6323_TOP_RST_MISC,
> };
>
> +static const struct mtk_pmic_regs mt6392_regs = {
> + .keys_regs[MTK_PMIC_PWRKEY_INDEX] =
> + MTK_PMIC_KEYS_REGS(MT6392_CHRSTATUS,
> + 0x2, MT6392_INT_MISC_CON, 0x10),
> + .keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
> + MTK_PMIC_KEYS_REGS(MT6392_CHRSTATUS,
> + 0x4, MT6392_INT_MISC_CON, 0x8),
> + .pmic_rst_reg = MT6392_TOP_RST_MISC,
> +};
> +
> struct mtk_pmic_keys_info {
> struct mtk_pmic_keys *keys;
> const struct mtk_pmic_keys_regs *regs;
> @@ -238,6 +249,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
> }, {
> .compatible = "mediatek,mt6323-keys",
> .data = &mt6323_regs,
> + }, {
> + .compatible = "mediatek,mt6392-keys",
> + .data = &mt6392_regs,
> }, {
> /* sentinel */
> }
> --
> 2.20.1
>
--
Dmitry
^ permalink raw reply
* RE: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base value
From: 廖崇榮 @ 2019-05-24 3:13 UTC (permalink / raw)
To: 'Benjamin Tissoires', 'Dmitry Torokhov',
'Rob Herring', 'Aaron Ma',
'Hans de Goede'
Cc: linux-input, linux-kernel, devicetree
In-Reply-To: <20190521132712.2818-10-benjamin.tissoires@redhat.com>
Hi Benjamin,
Thanks so much for all you do for Elan touchpad.
For the width_*, I have a question for it.
Our antenna sensors fully occupied the whole touchpad PCB.
The Gap between 2 sensors are 7.5 mil (0.19mm).
That's why we did not minus one trace.
Thanks
KT
-----Original Message-----
From: Benjamin Tissoires [mailto:benjamin.tissoires@redhat.com]
Sent: Tuesday, May 21, 2019 9:27 PM
To: Dmitry Torokhov; KT Liao; Rob Herring; Aaron Ma; Hans de Goede
Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org;
devicetree@vger.kernel.org; Benjamin Tissoires
Subject: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base
value
*_traces are the number of antennas. width_* is thus the space between 2
antennas. Which means, we should subtract 1 to the number of antennas to
divide the touchpad by the number of holes between each antenna.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
--
new in v2
---
drivers/input/mouse/elan_i2c_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/elan_i2c_core.c
b/drivers/input/mouse/elan_i2c_core.c
index 6f4feedb7765..3375eaa9a72e 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -398,8 +398,8 @@ static int elan_query_device_parameters(struct
elan_tp_data *data)
if (error)
return error;
}
- data->width_x = data->max_x / x_traces;
- data->width_y = data->max_y / y_traces;
+ data->width_x = data->max_x / (x_traces - 1);
+ data->width_y = data->max_y / (y_traces - 1);
if (device_property_read_u32(&client->dev,
"touchscreen-x-mm", &x_mm) ||
--
2.21.0
^ permalink raw reply related
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Hui Wang @ 2019-05-24 5:25 UTC (permalink / raw)
To: Peter Hutterer, Pali Rohár
Cc: Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <20190523060154.GA10526@jelly>
On 2019/5/23 下午2:01, Peter Hutterer wrote:
> On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
>> On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
>>> Hi Pali,
>>>
>>> Ok, and cannot you set ALPS_DUALPOINT flag based on that
>>> alps_check_is_trackpoint() result and then update
>>> alps_process_packet_ss4_v3() code to supports also
>>> V8 trackpoint packets?
>>> --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
>>> Then we choose the standard mouse driver.
>> Mouse speed is something which is configurable. Have you configured it
>> somehow? Also there is libinput project should handle these settings
>> more properly.
>>
>> Adding Peter Hutterer, maintainer of libinput to loop. I think he could
>> help with this problem.
> libinput has a quirk for a magic multiplier on trackpoints. it was the only
> solution I found that came close to "working" given that every device seems
> to provide some other random magic data. Doc for it is here:
> https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
Hello Peter Hutterer,
To adjust the trackpoint speed from userspace:
If the libinput version is lower than 1.9.0, we could set
POINTINGSTICK_CONST_ACCEL=0.25
If the libinput version is higher than 1.12.0, we could set
AttrTrackpointMultiplier=0.25
But if we use libinput-1.10.0, how could we adjust the speed?
Many thanks in advance.
Hui.
>
> There are also different speeds depending on which xorg driver you'd use (or
> libinput/Wayland), so a "mouse speed is not ideal" is almost a guarantee,
> given a large enough variety of setups :) That's why we have the speed
> toggle, but I'm happy to hear any suggestions on how to make the trackpoint
> more useful (in libinput anyway).
>
>> I do not think it is a good idea to force back to generic PS/2 mouse
>> driver for touchpads and trackpoints. Native drivers for touchpads and
>> trackpoints supports multitouch, absolute reporting and lot of other
>> things... Also calculation of mouse speed from absolute positions on
>> touchpads can be more easily fixed as from emulated relative movements.
> Yeah, agree. Using PS/2 mouse drivers means you lose *all* the extra
> features touchpads have like palm detection, tapping, scrolling, gestures,
> etc.
>
> Cheers,
> Peter
>
>> Dmitry, what is your opinion about this problem? What should psmouse.ko
>> do in this situation? Disallow usage of absolute mode and force bare
>> PS/2 relative mode?
>
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Peter Hutterer @ 2019-05-24 5:36 UTC (permalink / raw)
To: Hui Wang
Cc: Pali Rohár, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <38ec4a40-d51a-aeb1-a5e8-dbaed1142298@canonical.com>
On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
>
> On 2019/5/23 下午2:01, Peter Hutterer wrote:
> > On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
> > > On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
> > > > Hi Pali,
> > > >
> > > > Ok, and cannot you set ALPS_DUALPOINT flag based on that
> > > > alps_check_is_trackpoint() result and then update
> > > > alps_process_packet_ss4_v3() code to supports also
> > > > V8 trackpoint packets?
> > > > --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
> > > > Then we choose the standard mouse driver.
> > > Mouse speed is something which is configurable. Have you configured it
> > > somehow? Also there is libinput project should handle these settings
> > > more properly.
> > >
> > > Adding Peter Hutterer, maintainer of libinput to loop. I think he could
> > > help with this problem.
> > libinput has a quirk for a magic multiplier on trackpoints. it was the only
> > solution I found that came close to "working" given that every device seems
> > to provide some other random magic data. Doc for it is here:
> > https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
>
> Hello Peter Hutterer,
>
> To adjust the trackpoint speed from userspace:
>
> If the libinput version is lower than 1.9.0, we could set
> POINTINGSTICK_CONST_ACCEL=0.25
>
> If the libinput version is higher than 1.12.0, we could set
> AttrTrackpointMultiplier=0.25
>
> But if we use libinput-1.10.0, how could we adjust the speed?
The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
well (hence why it got replaced again). See the docs here though:
https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
Cheers,
Peter
> >
> > There are also different speeds depending on which xorg driver you'd use (or
> > libinput/Wayland), so a "mouse speed is not ideal" is almost a guarantee,
> > given a large enough variety of setups :) That's why we have the speed
> > toggle, but I'm happy to hear any suggestions on how to make the trackpoint
> > more useful (in libinput anyway).
> >
> > > I do not think it is a good idea to force back to generic PS/2 mouse
> > > driver for touchpads and trackpoints. Native drivers for touchpads and
> > > trackpoints supports multitouch, absolute reporting and lot of other
> > > things... Also calculation of mouse speed from absolute positions on
> > > touchpads can be more easily fixed as from emulated relative movements.
> > Yeah, agree. Using PS/2 mouse drivers means you lose *all* the extra
> > features touchpads have like palm detection, tapping, scrolling, gestures,
> > etc.
> >
> > Cheers,
> > Peter
> >
> > > Dmitry, what is your opinion about this problem? What should psmouse.ko
> > > do in this situation? Disallow usage of absolute mode and force bare
> > > PS/2 relative mode?
> >
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Hui Wang @ 2019-05-24 5:50 UTC (permalink / raw)
To: Peter Hutterer
Cc: Pali Rohár, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <20190524053648.GA16379@jelly>
On 2019/5/24 下午1:36, Peter Hutterer wrote:
> On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
>> On 2019/5/23 下午2:01, Peter Hutterer wrote:
>>> On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
>>>> On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
>>>>> Hi Pali,
>>>>>
>>>>> Ok, and cannot you set ALPS_DUALPOINT flag based on that
>>>>> alps_check_is_trackpoint() result and then update
>>>>> alps_process_packet_ss4_v3() code to supports also
>>>>> V8 trackpoint packets?
>>>>> --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
>>>>> Then we choose the standard mouse driver.
>>>> Mouse speed is something which is configurable. Have you configured it
>>>> somehow? Also there is libinput project should handle these settings
>>>> more properly.
>>>>
>>>> Adding Peter Hutterer, maintainer of libinput to loop. I think he could
>>>> help with this problem.
>>> libinput has a quirk for a magic multiplier on trackpoints. it was the only
>>> solution I found that came close to "working" given that every device seems
>>> to provide some other random magic data. Doc for it is here:
>>> https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
>> Hello Peter Hutterer,
>>
>> To adjust the trackpoint speed from userspace:
>>
>> If the libinput version is lower than 1.9.0, we could set
>> POINTINGSTICK_CONST_ACCEL=0.25
>>
>> If the libinput version is higher than 1.12.0, we could set
>> AttrTrackpointMultiplier=0.25
>>
>> But if we use libinput-1.10.0, how could we adjust the speed?
> The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
> well (hence why it got replaced again). See the docs here though:
> https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
>
> Cheers,
> Peter
OK, got it, Thanks.
>>> There are also different speeds depending on which xorg driver you'd use (or
>>> libinput/Wayland), so a "mouse speed is not ideal" is almost a guarantee,
>>> given a large enough variety of setups :) That's why we have the speed
>>> toggle, but I'm happy to hear any suggestions on how to make the trackpoint
>>> more useful (in libinput anyway).
>>>
>>>> I do not think it is a good idea to force back to generic PS/2 mouse
>>>> driver for touchpads and trackpoints. Native drivers for touchpads and
>>>> trackpoints supports multitouch, absolute reporting and lot of other
>>>> things... Also calculation of mouse speed from absolute positions on
>>>> touchpads can be more easily fixed as from emulated relative movements.
>>> Yeah, agree. Using PS/2 mouse drivers means you lose *all* the extra
>>> features touchpads have like palm detection, tapping, scrolling, gestures,
>>> etc.
>>>
>>> Cheers,
>>> Peter
>>>
>>>> Dmitry, what is your opinion about this problem? What should psmouse.ko
>>>> do in this situation? Disallow usage of absolute mode and force bare
>>>> PS/2 relative mode?
^ permalink raw reply
* Re: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base value
From: Benjamin Tissoires @ 2019-05-24 7:05 UTC (permalink / raw)
To: 廖崇榮
Cc: Dmitry Torokhov, Rob Herring, Aaron Ma, Hans de Goede,
open list:HID CORE LAYER, lkml, devicetree
In-Reply-To: <003d01d511de$9da229c0$d8e67d40$@emc.com.tw>
On Fri, May 24, 2019 at 5:13 AM 廖崇榮 <kt.liao@emc.com.tw> wrote:
>
> Hi Benjamin,
>
> Thanks so much for all you do for Elan touchpad.
>
> For the width_*, I have a question for it.
> Our antenna sensors fully occupied the whole touchpad PCB.
>
> The Gap between 2 sensors are 7.5 mil (0.19mm).
> That's why we did not minus one trace.
So, with the P52 I have:
[ +0.000009] max: (3045,1731) drivers/input/mouse/elan_i2c_core.c:428
[ +0.000003] traces: (24,14) drivers/input/mouse/elan_i2c_core.c:429
[ +0.000002] size: (98,55) drivers/input/mouse/elan_i2c_core.c:430
[ +0.000001] res: (31,31) drivers/input/mouse/elan_i2c_core.c:431
calculated size (max/res): 98 x 56 mm
true size, as measured: 101 x 60 mm
Which gives (without the minus 1):
width_x = max_x / x_traces = 3045 / 24 = 126.875 -> 3.9885 mm
width_y = max_y / y_traces = 1731 / 14 = 123.643 -> 4.0927 mm
-> this gives a total size of the touchpad of: 96 x 57 mm (width_x *
24, width_y * 14)
With the minus 1:
width_x = max_x / x_traces = 3045 / 23 = 132.391 -> 4.2707 mm
width_y = max_y / y_traces = 1731 / 14 = 133.154 -> 4.2953 mm
-> this gives a total size of the touchpad of: 102 x 60 mm (width_x *
24, width_y * 14)
and considering traces-1: 98 x 56 mm
Removing 1 to the number of traces gave a squarer values in rows and
columns, and this is what is done in the PS/2 driver.
Also, going back to the size of the touchpad gives a better value when
removing 1 on the *traces.
So maybe when forwarding the properties we should remove one there in
the PS/2 driver?
Cheers,
Benjamin
>
>
> Thanks
> KT
> -----Original Message-----
> From: Benjamin Tissoires [mailto:benjamin.tissoires@redhat.com]
> Sent: Tuesday, May 21, 2019 9:27 PM
> To: Dmitry Torokhov; KT Liao; Rob Herring; Aaron Ma; Hans de Goede
> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org;
> devicetree@vger.kernel.org; Benjamin Tissoires
> Subject: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base
> value
>
> *_traces are the number of antennas. width_* is thus the space between 2
> antennas. Which means, we should subtract 1 to the number of antennas to
> divide the touchpad by the number of holes between each antenna.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> --
>
> new in v2
> ---
> drivers/input/mouse/elan_i2c_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/mouse/elan_i2c_core.c
> b/drivers/input/mouse/elan_i2c_core.c
> index 6f4feedb7765..3375eaa9a72e 100644
> --- a/drivers/input/mouse/elan_i2c_core.c
> +++ b/drivers/input/mouse/elan_i2c_core.c
> @@ -398,8 +398,8 @@ static int elan_query_device_parameters(struct
> elan_tp_data *data)
> if (error)
> return error;
> }
> - data->width_x = data->max_x / x_traces;
> - data->width_y = data->max_y / y_traces;
> + data->width_x = data->max_x / (x_traces - 1);
> + data->width_y = data->max_y / (y_traces - 1);
>
> if (device_property_read_u32(&client->dev,
> "touchscreen-x-mm", &x_mm) ||
> --
> 2.21.0
>
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Pali Rohár @ 2019-05-24 7:26 UTC (permalink / raw)
To: Hui Wang
Cc: Peter Hutterer, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <d1fd207d-68e1-0b57-f0dc-c254bfc9352c@canonical.com>
On Friday 24 May 2019 13:50:53 Hui Wang wrote:
> On 2019/5/24 下午1:36, Peter Hutterer wrote:
> > On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
> > > On 2019/5/23 下午2:01, Peter Hutterer wrote:
> > > > On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
> > > > > On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
> > > > > > Hi Pali,
> > > > > >
> > > > > > Ok, and cannot you set ALPS_DUALPOINT flag based on that
> > > > > > alps_check_is_trackpoint() result and then update
> > > > > > alps_process_packet_ss4_v3() code to supports also
> > > > > > V8 trackpoint packets?
> > > > > > --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
> > > > > > Then we choose the standard mouse driver.
> > > > > Mouse speed is something which is configurable. Have you configured it
> > > > > somehow? Also there is libinput project should handle these settings
> > > > > more properly.
> > > > >
> > > > > Adding Peter Hutterer, maintainer of libinput to loop. I think he could
> > > > > help with this problem.
> > > > libinput has a quirk for a magic multiplier on trackpoints. it was the only
> > > > solution I found that came close to "working" given that every device seems
> > > > to provide some other random magic data. Doc for it is here:
> > > > https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
> > > Hello Peter Hutterer,
> > >
> > > To adjust the trackpoint speed from userspace:
> > >
> > > If the libinput version is lower than 1.9.0, we could set
> > > POINTINGSTICK_CONST_ACCEL=0.25
> > >
> > > If the libinput version is higher than 1.12.0, we could set
> > > AttrTrackpointMultiplier=0.25
> > >
> > > But if we use libinput-1.10.0, how could we adjust the speed?
> > The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
> > well (hence why it got replaced again). See the docs here though:
> > https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
> >
> > Cheers,
> > Peter
>
> OK, got it, Thanks.
Is not here some database where for input device name / id is specified
that property? So users do not have to invent what is correct value for
their hardware?
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Hui Wang @ 2019-05-24 7:37 UTC (permalink / raw)
To: Pali Rohár
Cc: Peter Hutterer, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <20190524072648.6zqgz7rpwpcv22pb@pali>
On 2019/5/24 下午3:26, Pali Rohár wrote:
> On Friday 24 May 2019 13:50:53 Hui Wang wrote:
>> On 2019/5/24 下午1:36, Peter Hutterer wrote:
>>> On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
>>>> On 2019/5/23 下午2:01, Peter Hutterer wrote:
>>>>> On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
>>>>>> On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
>>>>>>> Hi Pali,
>>>>>>>
>>>>>>> Ok, and cannot you set ALPS_DUALPOINT flag based on that
>>>>>>> alps_check_is_trackpoint() result and then update
>>>>>>> alps_process_packet_ss4_v3() code to supports also
>>>>>>> V8 trackpoint packets?
>>>>>>> --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
>>>>>>> Then we choose the standard mouse driver.
>>>>>> Mouse speed is something which is configurable. Have you configured it
>>>>>> somehow? Also there is libinput project should handle these settings
>>>>>> more properly.
>>>>>>
>>>>>> Adding Peter Hutterer, maintainer of libinput to loop. I think he could
>>>>>> help with this problem.
>>>>> libinput has a quirk for a magic multiplier on trackpoints. it was the only
>>>>> solution I found that came close to "working" given that every device seems
>>>>> to provide some other random magic data. Doc for it is here:
>>>>> https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
>>>> Hello Peter Hutterer,
>>>>
>>>> To adjust the trackpoint speed from userspace:
>>>>
>>>> If the libinput version is lower than 1.9.0, we could set
>>>> POINTINGSTICK_CONST_ACCEL=0.25
>>>>
>>>> If the libinput version is higher than 1.12.0, we could set
>>>> AttrTrackpointMultiplier=0.25
>>>>
>>>> But if we use libinput-1.10.0, how could we adjust the speed?
>>> The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
>>> well (hence why it got replaced again). See the docs here though:
>>> https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
>>>
>>> Cheers,
>>> Peter
>> OK, got it, Thanks.
> Is not here some database where for input device name / id is specified
> that property? So users do not have to invent what is correct value for
> their hardware?
Since the libinput version in the ubuntu 18.04 is 1.10, I tried to set
LIBINPUT_ATTR_TRACKPOINT_RANGE with different values (from 25, 20, 10,
5) in the udev hwdb database, I checked it with "udevadm info
/dev/input/eventX" to confirm the value is set to
LIBINPUT_ATTR_TRACKPOINT_RANGE successfully, but looks like the cursor
speed doesn't change at all. So for ubuntu 18.04, looks like we have to
adjust the speed in the kernel driver.
Thanks,
Hui.
^ permalink raw reply
* RE: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base value
From: 廖崇榮 @ 2019-05-24 9:00 UTC (permalink / raw)
To: 'Benjamin Tissoires'
Cc: 'Dmitry Torokhov', 'Rob Herring',
'Aaron Ma', 'Hans de Goede',
'open list:HID CORE LAYER', 'lkml', devicetree
In-Reply-To: <CAO-hwJLnjxVxdodqAkKdQpqjAPGV1QYnugM+9t_86xRD92WJ-Q@mail.gmail.com>
Hi
-----Original Message-----
From: Benjamin Tissoires [mailto:benjamin.tissoires@redhat.com]
Sent: Friday, May 24, 2019 3:06 PM
To: 廖崇榮
Cc: Dmitry Torokhov; Rob Herring; Aaron Ma; Hans de Goede; open list:HID CORE LAYER; lkml; devicetree@vger.kernel.org
Subject: Re: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base value
On Fri, May 24, 2019 at 5:13 AM 廖崇榮 <kt.liao@emc.com.tw> wrote:
>
> Hi Benjamin,
>
> Thanks so much for all you do for Elan touchpad.
>
> For the width_*, I have a question for it.
> Our antenna sensors fully occupied the whole touchpad PCB.
>
> The Gap between 2 sensors are 7.5 mil (0.19mm).
> That's why we did not minus one trace.
So, with the P52 I have:
[ +0.000009] max: (3045,1731) drivers/input/mouse/elan_i2c_core.c:428
[ +0.000003] traces: (24,14) drivers/input/mouse/elan_i2c_core.c:429
[ +0.000002] size: (98,55) drivers/input/mouse/elan_i2c_core.c:430
[ +0.000001] res: (31,31) drivers/input/mouse/elan_i2c_core.c:431
calculated size (max/res): 98 x 56 mm
true size, as measured: 101 x 60 mm
I list layout information of P52 touchpad as below.
Physical size : 99 x 58 mm
Active Area size : ~ 97 * 56 mm, (boarding is 1.008mm for each side)
Sensor layout:
X Pitch : 4.0286 mm
Y Pitch : 4.0147 mm
Which gives (without the minus 1):
width_x = max_x / x_traces = 3045 / 24 = 126.875 -> 3.9885 mm width_y = max_y / y_traces = 1731 / 14 = 123.643 -> 4.0927 mm
-> this gives a total size of the touchpad of: 96 x 57 mm (width_x *
24, width_y * 14)
With the minus 1:
width_x = max_x / x_traces = 3045 / 23 = 132.391 -> 4.2707 mm width_y = max_y / y_traces = 1731 / 14 = 133.154 -> 4.2953 mm
-> this gives a total size of the touchpad of: 102 x 60 mm (width_x *
24, width_y * 14)
and considering traces-1: 98 x 56 mm
Removing 1 to the number of traces gave a squarer values in rows and columns, and this is what is done in the PS/2 driver.
Also, going back to the size of the touchpad gives a better value when removing 1 on the *traces.
So maybe when forwarding the properties we should remove one there in the PS/2 driver?
Removing 1 trace may be better for some of previous touchpad. (depending on sensor pattern)
mk_* indicate the number of trace which is touched, and it's not a precise value.
I think the usability won't change too much whether removing one trace.
PS/2 have supported plenty of touchpad. It's better to remain the same.
Thanks
KT
Cheers,
Benjamin
>
>
> Thanks
> KT
> -----Original Message-----
> From: Benjamin Tissoires [mailto:benjamin.tissoires@redhat.com]
> Sent: Tuesday, May 21, 2019 9:27 PM
> To: Dmitry Torokhov; KT Liao; Rob Herring; Aaron Ma; Hans de Goede
> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org;
> devicetree@vger.kernel.org; Benjamin Tissoires
> Subject: [PATCH v2 09/10] Input: elan_i2c - correct the width/size
> base value
>
> *_traces are the number of antennas. width_* is thus the space between
> 2 antennas. Which means, we should subtract 1 to the number of
> antennas to divide the touchpad by the number of holes between each antenna.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> --
>
> new in v2
> ---
> drivers/input/mouse/elan_i2c_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/mouse/elan_i2c_core.c
> b/drivers/input/mouse/elan_i2c_core.c
> index 6f4feedb7765..3375eaa9a72e 100644
> --- a/drivers/input/mouse/elan_i2c_core.c
> +++ b/drivers/input/mouse/elan_i2c_core.c
> @@ -398,8 +398,8 @@ static int elan_query_device_parameters(struct
> elan_tp_data *data)
> if (error)
> return error;
> }
> - data->width_x = data->max_x / x_traces;
> - data->width_y = data->max_y / y_traces;
> + data->width_x = data->max_x / (x_traces - 1);
> + data->width_y = data->max_y / (y_traces - 1);
>
> if (device_property_read_u32(&client->dev,
> "touchscreen-x-mm", &x_mm) ||
> --
> 2.21.0
>
^ permalink raw reply
* Re: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base value
From: Benjamin Tissoires @ 2019-05-24 9:19 UTC (permalink / raw)
To: 廖崇榮
Cc: Dmitry Torokhov, Rob Herring, Aaron Ma, Hans de Goede,
open list:HID CORE LAYER, lkml, devicetree
In-Reply-To: <011a01d5120f$146265e0$3d2731a0$@emc.com.tw>
On Fri, May 24, 2019 at 11:00 AM 廖崇榮 <kt.liao@emc.com.tw> wrote:
>
> Hi
>
> -----Original Message-----
> From: Benjamin Tissoires [mailto:benjamin.tissoires@redhat.com]
> Sent: Friday, May 24, 2019 3:06 PM
> To: 廖崇榮
> Cc: Dmitry Torokhov; Rob Herring; Aaron Ma; Hans de Goede; open list:HID CORE LAYER; lkml; devicetree@vger.kernel.org
> Subject: Re: [PATCH v2 09/10] Input: elan_i2c - correct the width/size base value
>
> On Fri, May 24, 2019 at 5:13 AM 廖崇榮 <kt.liao@emc.com.tw> wrote:
> >
> > Hi Benjamin,
> >
> > Thanks so much for all you do for Elan touchpad.
> >
> > For the width_*, I have a question for it.
> > Our antenna sensors fully occupied the whole touchpad PCB.
> >
> > The Gap between 2 sensors are 7.5 mil (0.19mm).
> > That's why we did not minus one trace.
>
> So, with the P52 I have:
> [ +0.000009] max: (3045,1731) drivers/input/mouse/elan_i2c_core.c:428
> [ +0.000003] traces: (24,14) drivers/input/mouse/elan_i2c_core.c:429
> [ +0.000002] size: (98,55) drivers/input/mouse/elan_i2c_core.c:430
> [ +0.000001] res: (31,31) drivers/input/mouse/elan_i2c_core.c:431
>
> calculated size (max/res): 98 x 56 mm
> true size, as measured: 101 x 60 mm
>
> I list layout information of P52 touchpad as below.
> Physical size : 99 x 58 mm
> Active Area size : ~ 97 * 56 mm, (boarding is 1.008mm for each side)
>
> Sensor layout:
> X Pitch : 4.0286 mm
> Y Pitch : 4.0147 mm
>
> Which gives (without the minus 1):
> width_x = max_x / x_traces = 3045 / 24 = 126.875 -> 3.9885 mm width_y = max_y / y_traces = 1731 / 14 = 123.643 -> 4.0927 mm
>
> -> this gives a total size of the touchpad of: 96 x 57 mm (width_x *
> 24, width_y * 14)
>
> With the minus 1:
> width_x = max_x / x_traces = 3045 / 23 = 132.391 -> 4.2707 mm width_y = max_y / y_traces = 1731 / 14 = 133.154 -> 4.2953 mm
>
> -> this gives a total size of the touchpad of: 102 x 60 mm (width_x *
> 24, width_y * 14)
> and considering traces-1: 98 x 56 mm
>
> Removing 1 to the number of traces gave a squarer values in rows and columns, and this is what is done in the PS/2 driver.
> Also, going back to the size of the touchpad gives a better value when removing 1 on the *traces.
> So maybe when forwarding the properties we should remove one there in the PS/2 driver?
>
> Removing 1 trace may be better for some of previous touchpad. (depending on sensor pattern)
> mk_* indicate the number of trace which is touched, and it's not a precise value.
> I think the usability won't change too much whether removing one trace.
> PS/2 have supported plenty of touchpad. It's better to remain the same.
>
OK, so I guess I should just drop this patch from the series then.
Cheers,
Benjamin
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Peter Hutterer @ 2019-05-24 9:32 UTC (permalink / raw)
To: Pali Rohár
Cc: Hui Wang, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <20190524072648.6zqgz7rpwpcv22pb@pali>
On Fri, May 24, 2019 at 09:26:48AM +0200, Pali Rohár wrote:
> On Friday 24 May 2019 13:50:53 Hui Wang wrote:
> > On 2019/5/24 下午1:36, Peter Hutterer wrote:
> > > On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
> > > > On 2019/5/23 下午2:01, Peter Hutterer wrote:
> > > > > On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
> > > > > > On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
> > > > > > > Hi Pali,
> > > > > > >
> > > > > > > Ok, and cannot you set ALPS_DUALPOINT flag based on that
> > > > > > > alps_check_is_trackpoint() result and then update
> > > > > > > alps_process_packet_ss4_v3() code to supports also
> > > > > > > V8 trackpoint packets?
> > > > > > > --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
> > > > > > > Then we choose the standard mouse driver.
> > > > > > Mouse speed is something which is configurable. Have you configured it
> > > > > > somehow? Also there is libinput project should handle these settings
> > > > > > more properly.
> > > > > >
> > > > > > Adding Peter Hutterer, maintainer of libinput to loop. I think he could
> > > > > > help with this problem.
> > > > > libinput has a quirk for a magic multiplier on trackpoints. it was the only
> > > > > solution I found that came close to "working" given that every device seems
> > > > > to provide some other random magic data. Doc for it is here:
> > > > > https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
> > > > Hello Peter Hutterer,
> > > >
> > > > To adjust the trackpoint speed from userspace:
> > > >
> > > > If the libinput version is lower than 1.9.0, we could set
> > > > POINTINGSTICK_CONST_ACCEL=0.25
> > > >
> > > > If the libinput version is higher than 1.12.0, we could set
> > > > AttrTrackpointMultiplier=0.25
> > > >
> > > > But if we use libinput-1.10.0, how could we adjust the speed?
> > > The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
> > > well (hence why it got replaced again). See the docs here though:
> > > https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
> > >
> > > Cheers,
> > > Peter
> >
> > OK, got it, Thanks.
>
> Is not here some database where for input device name / id is specified
> that property? So users do not have to invent what is correct value for
> their hardware?
yeah, libinput ships with a quirks database that sets those, but it relies
on users to submit the quirks.
https://gitlab.freedesktop.org/libinput/libinput/tree/master/quirks
There's no "correct" value anyway, if you ask 3 users what the trackpoint
should do you'll get 5 answers :)
Cheers,
Peter
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Peter Hutterer @ 2019-05-24 9:37 UTC (permalink / raw)
To: Hui Wang
Cc: Pali Rohár, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <d0b659bf-e6ed-bbbb-a3ab-17daf525a577@canonical.com>
On Fri, May 24, 2019 at 03:37:57PM +0800, Hui Wang wrote:
>
> On 2019/5/24 下午3:26, Pali Rohár wrote:
> > On Friday 24 May 2019 13:50:53 Hui Wang wrote:
> > > On 2019/5/24 下午1:36, Peter Hutterer wrote:
> > > > On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
> > > > > On 2019/5/23 下午2:01, Peter Hutterer wrote:
> > > > > > On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
> > > > > > > On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
> > > > > > > > Hi Pali,
> > > > > > > >
> > > > > > > > Ok, and cannot you set ALPS_DUALPOINT flag based on that
> > > > > > > > alps_check_is_trackpoint() result and then update
> > > > > > > > alps_process_packet_ss4_v3() code to supports also
> > > > > > > > V8 trackpoint packets?
> > > > > > > > --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
> > > > > > > > Then we choose the standard mouse driver.
> > > > > > > Mouse speed is something which is configurable. Have you configured it
> > > > > > > somehow? Also there is libinput project should handle these settings
> > > > > > > more properly.
> > > > > > >
> > > > > > > Adding Peter Hutterer, maintainer of libinput to loop. I think he could
> > > > > > > help with this problem.
> > > > > > libinput has a quirk for a magic multiplier on trackpoints. it was the only
> > > > > > solution I found that came close to "working" given that every device seems
> > > > > > to provide some other random magic data. Doc for it is here:
> > > > > > https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
> > > > > Hello Peter Hutterer,
> > > > >
> > > > > To adjust the trackpoint speed from userspace:
> > > > >
> > > > > If the libinput version is lower than 1.9.0, we could set
> > > > > POINTINGSTICK_CONST_ACCEL=0.25
> > > > >
> > > > > If the libinput version is higher than 1.12.0, we could set
> > > > > AttrTrackpointMultiplier=0.25
> > > > >
> > > > > But if we use libinput-1.10.0, how could we adjust the speed?
> > > > The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
> > > > well (hence why it got replaced again). See the docs here though:
> > > > https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
> > > >
> > > > Cheers,
> > > > Peter
> > > OK, got it, Thanks.
> > Is not here some database where for input device name / id is specified
> > that property? So users do not have to invent what is correct value for
> > their hardware?
>
> Since the libinput version in the ubuntu 18.04 is 1.10, I tried to set
> LIBINPUT_ATTR_TRACKPOINT_RANGE with different values (from 25, 20, 10, 5) in
> the udev hwdb database, I checked it with "udevadm info /dev/input/eventX"
> to confirm the value is set to LIBINPUT_ATTR_TRACKPOINT_RANGE successfully,
> but looks like the cursor speed doesn't change at all. So for ubuntu 18.04,
> looks like we have to adjust the speed in the kernel driver.
I don't think it's a good idea to make the kernel driver behaviour based on
an EOL libinput version just because one version of ubuntu ships with that.
18.10 and 19.04 both ship with libinput 1.12.
It'd be better to make sure it works well with a *current* version and then
patch libinput on 18.04 where needed.
Cheers,
Peter
^ permalink raw reply
* Re: [PATCH v2 08/10] Input: elan_i2c - export true width/height
From: Benjamin Tissoires @ 2019-05-24 9:37 UTC (permalink / raw)
To: Dmitry Torokhov, KT Liao, Rob Herring, Aaron Ma, Hans de Goede
Cc: open list:HID CORE LAYER, lkml, devicetree
In-Reply-To: <20190521132712.2818-9-benjamin.tissoires@redhat.com>
On Tue, May 21, 2019 at 3:28 PM Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
>
> The width/height is actually in the same unit than X and Y. So we should
> not tamper the data, but just set the proper resolution, so that userspace
> can correctly detect which touch is a palm or a finger.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> --
>
> new in v2
> ---
> drivers/input/mouse/elan_i2c_core.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
> index 7ff044c6cd11..6f4feedb7765 100644
> --- a/drivers/input/mouse/elan_i2c_core.c
> +++ b/drivers/input/mouse/elan_i2c_core.c
> @@ -45,7 +45,6 @@
> #define DRIVER_NAME "elan_i2c"
> #define ELAN_VENDOR_ID 0x04f3
> #define ETP_MAX_PRESSURE 255
> -#define ETP_FWIDTH_REDUCE 90
> #define ETP_FINGER_WIDTH 15
> #define ETP_RETRY_COUNT 3
>
> @@ -915,12 +914,8 @@ static void elan_report_contact(struct elan_tp_data *data,
> return;
> }
>
> - /*
> - * To avoid treating large finger as palm, let's reduce the
> - * width x and y per trace.
> - */
> - area_x = mk_x * (data->width_x - ETP_FWIDTH_REDUCE);
> - area_y = mk_y * (data->width_y - ETP_FWIDTH_REDUCE);
> + area_x = mk_x * data->width_x;
> + area_y = mk_y * data->width_y;
>
> major = max(area_x, area_y);
> minor = min(area_x, area_y);
> @@ -1123,8 +1118,10 @@ static int elan_setup_input_device(struct elan_tp_data *data)
> ETP_MAX_PRESSURE, 0, 0);
> input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0,
> ETP_FINGER_WIDTH * max_width, 0, 0);
> + input_abs_set_res(input, ABS_MT_TOUCH_MAJOR, data->x_res);
> input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0,
> ETP_FINGER_WIDTH * min_width, 0, 0);
> + input_abs_set_res(input, ABS_MT_TOUCH_MINOR, data->y_res);
I had a chat with Peter on Wednesday, and he mentioned that this is
dangerous as Major/Minor are max/min of the width and height. And
given that we might have 2 different resolutions, we would need to do
some computation in the kernel to ensure the data is correct with
respect to the resolution.
TL;DR: I don't think we should export the resolution there :(
KT, should I drop the patch entirely, or is there a strong argument
for keeping the ETP_FWIDTH_REDUCE around?
Cheers,
Benjamin
>
> data->input = input;
>
> --
> 2.21.0
>
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Pali Rohár @ 2019-05-24 9:52 UTC (permalink / raw)
To: Peter Hutterer
Cc: Hui Wang, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <20190524093238.GA1119@jelly>
On Friday 24 May 2019 19:32:38 Peter Hutterer wrote:
> On Fri, May 24, 2019 at 09:26:48AM +0200, Pali Rohár wrote:
> > On Friday 24 May 2019 13:50:53 Hui Wang wrote:
> > > On 2019/5/24 下午1:36, Peter Hutterer wrote:
> > > > On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
> > > > > On 2019/5/23 下午2:01, Peter Hutterer wrote:
> > > > > > On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
> > > > > > > On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
> > > > > > > > Hi Pali,
> > > > > > > >
> > > > > > > > Ok, and cannot you set ALPS_DUALPOINT flag based on that
> > > > > > > > alps_check_is_trackpoint() result and then update
> > > > > > > > alps_process_packet_ss4_v3() code to supports also
> > > > > > > > V8 trackpoint packets?
> > > > > > > > --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
> > > > > > > > Then we choose the standard mouse driver.
> > > > > > > Mouse speed is something which is configurable. Have you configured it
> > > > > > > somehow? Also there is libinput project should handle these settings
> > > > > > > more properly.
> > > > > > >
> > > > > > > Adding Peter Hutterer, maintainer of libinput to loop. I think he could
> > > > > > > help with this problem.
> > > > > > libinput has a quirk for a magic multiplier on trackpoints. it was the only
> > > > > > solution I found that came close to "working" given that every device seems
> > > > > > to provide some other random magic data. Doc for it is here:
> > > > > > https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
> > > > > Hello Peter Hutterer,
> > > > >
> > > > > To adjust the trackpoint speed from userspace:
> > > > >
> > > > > If the libinput version is lower than 1.9.0, we could set
> > > > > POINTINGSTICK_CONST_ACCEL=0.25
> > > > >
> > > > > If the libinput version is higher than 1.12.0, we could set
> > > > > AttrTrackpointMultiplier=0.25
> > > > >
> > > > > But if we use libinput-1.10.0, how could we adjust the speed?
> > > > The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
> > > > well (hence why it got replaced again). See the docs here though:
> > > > https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
> > > >
> > > > Cheers,
> > > > Peter
> > >
> > > OK, got it, Thanks.
> >
> > Is not here some database where for input device name / id is specified
> > that property? So users do not have to invent what is correct value for
> > their hardware?
>
> yeah, libinput ships with a quirks database that sets those, but it relies
> on users to submit the quirks.
> https://gitlab.freedesktop.org/libinput/libinput/tree/master/quirks
That is enough!
> There's no "correct" value anyway, if you ask 3 users what the trackpoint
> should do you'll get 5 answers :)
I know :) but reason for such database is to provide some sane defaults.
Which seems it is already there.
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply
* Re: 答复: 答复: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
From: Peter Hutterer @ 2019-05-24 10:58 UTC (permalink / raw)
To: Hui Wang
Cc: Pali Rohár, Xiaoxiao Liu, dmitry.torokhov, XiaoXiao Liu,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaojian Cao, zhangfp1@lenovo.com
In-Reply-To: <f0c2dff9-519e-d54d-4cd0-2be666656dc2@canonical.com>
On Fri, May 24, 2019 at 06:43:58PM +0800, Hui Wang wrote:
>
> On 2019/5/24 下午5:37, Peter Hutterer wrote:
> > On Fri, May 24, 2019 at 03:37:57PM +0800, Hui Wang wrote:
> > > On 2019/5/24 下午3:26, Pali Rohár wrote:
> > > > On Friday 24 May 2019 13:50:53 Hui Wang wrote:
> > > > > On 2019/5/24 下午1:36, Peter Hutterer wrote:
> > > > > > On Fri, May 24, 2019 at 01:25:52PM +0800, Hui Wang wrote:
> > > > > > > On 2019/5/23 下午2:01, Peter Hutterer wrote:
> > > > > > > > On Wed, May 22, 2019 at 09:40:30AM +0200, Pali Rohár wrote:
> > > > > > > > > On Wednesday 22 May 2019 07:30:43 Xiaoxiao Liu wrote:
> > > > > > > > > > Hi Pali,
> > > > > > > > > >
> > > > > > > > > > Ok, and cannot you set ALPS_DUALPOINT flag based on that
> > > > > > > > > > alps_check_is_trackpoint() result and then update
> > > > > > > > > > alps_process_packet_ss4_v3() code to supports also
> > > > > > > > > > V8 trackpoint packets?
> > > > > > > > > > --> Yes, we can do like so, when we use the v8 method to process the trackpoint , the mouse speed is not ideal.
> > > > > > > > > > Then we choose the standard mouse driver.
> > > > > > > > > Mouse speed is something which is configurable. Have you configured it
> > > > > > > > > somehow? Also there is libinput project should handle these settings
> > > > > > > > > more properly.
> > > > > > > > >
> > > > > > > > > Adding Peter Hutterer, maintainer of libinput to loop. I think he could
> > > > > > > > > help with this problem.
> > > > > > > > libinput has a quirk for a magic multiplier on trackpoints. it was the only
> > > > > > > > solution I found that came close to "working" given that every device seems
> > > > > > > > to provide some other random magic data. Doc for it is here:
> > > > > > > > https://wayland.freedesktop.org/libinput/doc/latest/trackpoint-configuration.html
> > > > > > > Hello Peter Hutterer,
> > > > > > >
> > > > > > > To adjust the trackpoint speed from userspace:
> > > > > > >
> > > > > > > If the libinput version is lower than 1.9.0, we could set
> > > > > > > POINTINGSTICK_CONST_ACCEL=0.25
> > > > > > >
> > > > > > > If the libinput version is higher than 1.12.0, we could set
> > > > > > > AttrTrackpointMultiplier=0.25
> > > > > > >
> > > > > > > But if we use libinput-1.10.0, how could we adjust the speed?
> > > > > > The LIBINPUT_ATTR_TRACKPOINT_RANGE property, which didn't end up working
> > > > > > well (hence why it got replaced again). See the docs here though:
> > > > > > https://wayland.freedesktop.org/libinput/doc/1.10.0/trackpoints.html
> > > > > >
> > > > > > Cheers,
> > > > > > Peter
> > > > > OK, got it, Thanks.
> > > > Is not here some database where for input device name / id is specified
> > > > that property? So users do not have to invent what is correct value for
> > > > their hardware?
> > > Since the libinput version in the ubuntu 18.04 is 1.10, I tried to set
> > > LIBINPUT_ATTR_TRACKPOINT_RANGE with different values (from 25, 20, 10, 5) in
> > > the udev hwdb database, I checked it with "udevadm info /dev/input/eventX"
> > > to confirm the value is set to LIBINPUT_ATTR_TRACKPOINT_RANGE successfully,
> > > but looks like the cursor speed doesn't change at all. So for ubuntu 18.04,
> > > looks like we have to adjust the speed in the kernel driver.
> > I don't think it's a good idea to make the kernel driver behaviour based on
> > an EOL libinput version just because one version of ubuntu ships with that.
> > 18.10 and 19.04 both ship with libinput 1.12.
> >
> > It'd be better to make sure it works well with a *current* version and then
> > patch libinput on 18.04 where needed.
>
> OK, that is sth we need to do. But anyway it is a bit risky to backport
> that much code and the whole folder of quirks to libinput 1.10.4, we need
> to do lots of test to make sure there is no regression on other machines.
>
> Probably we only need to keep the quirks/30-vendor-alps.quirks to 1.10.4 and
> drop other quirks, that will be better for our testing effort.
might be worth looking at what is in 1.10.7, e.g. a3b3e85c0e looks like it
may be of interest. That one suggests the range on some ALPS devices is over
100, so testing with 5-25 may really not have had any effect.
Cheers,
Peter
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox