Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Positivo C4128B #217

Merged
merged 1 commit into from Oct 6, 2023
Merged

Add Positivo C4128B #217

merged 1 commit into from Oct 6, 2023

Conversation

ghost
Copy link

@ghost ghost commented Oct 4, 2023

Seems to use the same panel as the Positivo C464C, although I tweaked the values a bit after running evtest.

One major annoyance is that it seems impossible to be able to swipe into the screen from the top or the left borders, since the device does not send a zero position from either axis. If there is a way to solve this, please let me know :-p

I also tried patching the kernel to use the mainline silead module, and it works fine, so I may try sending the patch in the future.

@onitake
Copy link
Owner

onitake commented Oct 4, 2023

The Linux touchscreen driver supports min and max properties: https://elixir.bootlin.com/linux/v6.5.5/source/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
Would that help?

(Note: requires kernel 5.x or later. 4.x had different properties)

@onitake
Copy link
Owner

onitake commented Oct 4, 2023

Is this PR ready for merge, or should I wait until you've submitted the kernel patch?

@jwrdegoede
Copy link
Collaborator

I also tried patching the kernel to use the mainline silead module, and it works fine, so I may try sending the patch in the future.

Upstream maintainer of drivers/platform/x86/touchscreen_dmi.c here. As @onitake mentioned with the mainline kernel driver you can fix the not being able to swipe from the top / left side issue by setting min x/y properties, see e.g. : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/touchscreen_dmi.c#n99

Once you have this working please do submit your touchscreen_dmi.c changes upstream. I know the whole upstream patch submission process can be a bit daunting if that is a problem you can also just send me your modified touchscreen_dmi.c at hdegoede@redhat.com and then I can turn it into a patch and submit it myself.

I really want this to work out of the box as much as possible for users, which requires a touchscreen_dmi.c entry. Unfortunately we cannot add the firmwares to linux-firmware proper so users still need to manually download the fw file and drop it into /lib/firmware/silead .

@jwrdegoede
Copy link
Collaborator

p.s. you can find the min values just like how you find the max values, run evtest and see what the minimum reported values are when you (repeatedly) swipe over the edges.

@ghost
Copy link
Author

ghost commented Oct 4, 2023

Thanks for the tips, everyone! I will try tweaking the touchscreen-min-x/y values, then I'll submit the kernel patch as soon as my spare time allows.

Is this PR ready for merge, or should I wait until you've submitted the kernel patch?

I believe it is ready for merging, I just did a small update to the commit to adjust the firmware file name for the silead driver. The silead_ts.fw is also working with the gslx680-acpi driver, so the files should already be useful for someone :-p

@ghost
Copy link
Author

ghost commented Oct 4, 2023

For completeness' sake, here's the kernel patch as it currently stands:

--- a/drivers/platform/x86/touchscreen_dmi.c.orig	2023-10-03 16:36:24.190623912 -0400
+++ b/drivers/platform/x86/touchscreen_dmi.c	2023-10-03 16:33:00.842254721 -0400
@@ -756,6 +756,19 @@
 	.properties	= pipo_w11_props,
 };
 
+static const struct property_entry positivo_c4128b_props[] = {
+	PROPERTY_ENTRY_U32("touchscreen-size-x", 1920),
+	PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
+	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-positivo_c4128b.fw"),
+	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+	{ }
+};
+
+static const struct ts_dmi_data positivo_c4128b_data = {
+	.acpi_name	= "MSSL1680:00",
+	.properties	= positivo_c4128b_props,
+};
+
 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
 	PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
 	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
@@ -1481,6 +1494,14 @@
 		},
 	},
 	{
+		/* Positivo C4128B */
+		.driver_data = (void *)&positivo_c4128b_data,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "C4128B-1"),
+		},
+	},
+	{
 		/* Point of View mobii wintab p800w (v2.0) */
 		.driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
 		.matches = {

My only concern is that a quick online search revealed that there is also a C4128B-3 model available. I would like to believe that it uses the same panel, but I'm not sure. Is it OK to match only to a C4128B-1?

@ghost
Copy link
Author

ghost commented Oct 5, 2023

I've sent the patch to the kernel: https://lore.kernel.org/linux-input/20231004235900.426240-1-japareaggae@gmail.com/

I've decided to only match to the C4128B-1, since I'm unsure about the panel on the -3 variant.

@onitake
Copy link
Owner

onitake commented Oct 5, 2023

All right!

To complete the PR, could you please add these things?

  • /firmware/linux/READMEmd (one line describing the kernel-ready firmware))
  • /firmware/linux/silead/gsl1680-positivo-c4128b.fw (please move firmware/positivo/c4128b/gsl1680-positivo-c4128b.fw there)
  • README.md (a reference to firmware/positivo/c4128b)

As for the patch, it should normally also be sent to the platform-driver-x86 list, but I think @jwrdegoede can pick it up for now.

@ghost
Copy link
Author

ghost commented Oct 5, 2023

I've just pushed an update with the changes you've requested!

roxell pushed a commit to roxell/linux that referenced this pull request Oct 6, 2023
Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
@onitake onitake merged commit e641911 into onitake:master Oct 6, 2023
@onitake
Copy link
Owner

onitake commented Oct 6, 2023

Perfect, thank you very much!

mj22226 pushed a commit to mj22226/linux that referenced this pull request Oct 22, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Oct 23, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Kaz205 pushed a commit to Kaz205/linux that referenced this pull request Oct 25, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Whissi pushed a commit to Whissi/linux-stable that referenced this pull request Oct 25, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Whissi pushed a commit to Whissi/linux-stable that referenced this pull request Oct 25, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
DawnBreather pushed a commit to DawnBreather/linux-kernel that referenced this pull request Oct 25, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
DawnBreather pushed a commit to DawnBreather/linux-kernel that referenced this pull request Oct 25, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
rlmenge pushed a commit to rlmenge/CBL-Mariner-Linux-Kernel that referenced this pull request Nov 23, 2023
[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista that referenced this pull request Dec 20, 2023
Source: Kernel.org
MR: 130463
Type: Integration
Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.10.y
ChangeID: ead8131372af5d3948eaccfb82a6a2030b9e2aae
Description:

[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista that referenced this pull request Dec 20, 2023
Source: Kernel.org
MR: 130463
Type: Integration
Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.10.y
ChangeID: ead8131372af5d3948eaccfb82a6a2030b9e2aae
Description:

[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista that referenced this pull request Dec 20, 2023
Source: Kernel.org
MR: 130463
Type: Integration
Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.10.y
ChangeID: ead8131372af5d3948eaccfb82a6a2030b9e2aae
Description:

[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
sparkstar pushed a commit to sparkstar/jammy-stable that referenced this pull request Jan 15, 2024
BugLink: https://bugs.launchpad.net/bugs/2049350

[ Upstream commit aa7dcba3bae6869122828b144a3cfd231718089d ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
sparkstar pushed a commit to sparkstar/jammy-stable that referenced this pull request Jan 22, 2024
BugLink: https://bugs.launchpad.net/bugs/2049350

[ Upstream commit aa7dcba3bae6869122828b144a3cfd231718089d ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
sileshn pushed a commit to sileshn/ubuntu-kernel-jammy that referenced this pull request Feb 4, 2024
BugLink: https://bugs.launchpad.net/bugs/2049350

[ Upstream commit aa7dcba3bae6869122828b144a3cfd231718089d ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
wanghao75 pushed a commit to openeuler-mirror/kernel that referenced this pull request Mar 28, 2024
stable inclusion
from stable-v5.10.199
commit ead8131372af5d3948eaccfb82a6a2030b9e2aae
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9AWJ5

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ead8131372af5d3948eaccfb82a6a2030b9e2aae

--------------------------------

[ Upstream commit aa7dcba ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: sanglipeng <sanglipeng1@jd.com>
Elchanz3 pushed a commit to Elchanz3/android_kernel_samsung_sdk-s5e9925_r11s that referenced this pull request Jun 2, 2024
[ Upstream commit aa7dcba3bae6869122828b144a3cfd231718089d ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Elchanz3 pushed a commit to Elchanz3/android_kernel_samsung_sdk-s5e9925_r11s that referenced this pull request Jun 8, 2024
[ Upstream commit aa7dcba3bae6869122828b144a3cfd231718089d ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
eclipse-oniro-oh-bot pushed a commit to eclipse-oniro-mirrors/kernel_linux_5.10 that referenced this pull request Jul 6, 2024
stable inclusion
from stable-5.10.199
commit ead8131372af5d3948eaccfb82a6a2030b9e2aae
category: bugfix
issue: #IA71TN
CVE: NA

Signed-off-by: wanxiaoqing <wanxiaoqing@huawei.com>
---------------------------------------

[ Upstream commit aa7dcba3bae6869122828b144a3cfd231718089d ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: wanxiaoqing <wanxiaoqing@huawei.com>
fluffball3 pushed a commit to fluffball3/android_kernel_samsung_m33x that referenced this pull request Oct 2, 2024
[ Upstream commit aa7dcba3bae6869122828b144a3cfd231718089d ]

Add information for the Positivo C4128B, a notebook/tablet convertible.

Link: onitake/gsl-firmware#217
Signed-off-by: Renan Guilherme Lebre Ramos <japareaggae@gmail.com>
Link: https://lore.kernel.org/r/20231004235900.426240-1-japareaggae@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants