{"id":23831896,"url":"https://github.com/onitake/gsl-firmware","last_synced_at":"2025-05-15T11:08:44.270Z","repository":{"id":3802309,"uuid":"50939068","full_name":"onitake/gsl-firmware","owner":"onitake","description":"Firmware repository for Silead touchscreen controllers","archived":false,"fork":false,"pushed_at":"2025-02-22T23:26:49.000Z","size":6488,"stargazers_count":343,"open_issues_count":62,"forks_count":206,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-11T21:19:02.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onitake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-02T17:41:41.000Z","updated_at":"2025-03-31T15:10:47.000Z","dependencies_parsed_at":"2024-05-31T12:59:16.311Z","dependency_job_id":"2840061f-4345-45a8-a27b-55d02385b1b8","html_url":"https://github.com/onitake/gsl-firmware","commit_stats":{"total_commits":217,"total_committers":71,"mean_commits":3.056338028169014,"dds":0.7050691244239631,"last_synced_commit":"53528618f8e5b62140c84b258513d50e056306ce"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fgsl-firmware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fgsl-firmware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fgsl-firmware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onitake%2Fgsl-firmware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onitake","download_url":"https://codeload.github.com/onitake/gsl-firmware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328385,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-02T14:08:43.009Z","updated_at":"2025-05-15T11:08:44.251Z","avatar_url":"https://github.com/onitake.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gsl-firmware\n\nThis repository contains firmware images for the Silead\ntouchscreen controllers in various tablet (and other) devices.\n\nThere is also a number of conversion tools here that help with\nextraction and preparation of firmware images.\n\nThe firmware files were extracted from Android and Windows device\ndrivers, as published by device manufacturers. They are intended\nfor people who prefer to replace the shipped operating\nsystem with a generic Linux distribution such as Debian or Ubuntu.\n\nThe files may be covered by proprietary licenses or copyright.\nPlease consult the manufacturer's website or device documentation\nfor more information.\n\nIn contrast, everything in the tools directory is published under\nthe GNU General Public license v2, as laid out in\n[tools/LICENSE](tools/LICENSE). See [tools/AUTHORS.md](tools/AUTHORS.md)\nfor copyright information.\n\n\n## Device list\n\n| Manufacturer  | Device                          | Tested  | Firmware                                                       |\n|---------------|---------------------------------|---------|----------------------------------------------------------------|\n| Archos        | 101 Cesium Educ                 | yes     | [firmware/archos/101_cesium_educ](firmware/archos/101_cesium_educ)|\n| BUSH          | Bush Windows tablet             | yes     | [firmware/bush/bush_windows_tablet](firmware/bush/bush_windows_tablet)|\n| Chuwi         | hi8                             | yes     | [firmware/chuwi/hi8](firmware/chuwi/hi8)                       |\n| Chuwi         | Hi8 Air                         | yes     | [firmware/chuwi/hi8_air](firmware/chuwi/hi8_air)               |\n| Chuwi         | vi8                             | no      | [firmware/chuwi/vi8](firmware/chuwi/vi8)                       |\n| Chuwi         | vi10                            | yes     | [firmware/chuwi/vi10](firmware/chuwi/vi10)                     |\n| Chuwi         | Hi10 Air                        | yes     | [firmware/chuwi/hi10_air](firmware/chuwi/hi10_air)             |\n| Chuwi         | Hi10 Pro                        | yes     | [firmware/chuwi/hi10_pro](firmware/chuwi/hi10_pro)             |\n| Chuwi         | Hi10 Pro new (z8350, 20161209)  | yes     | [firmware/chuwi/hi10_pro-z8350](firmware/chuwi/hi10_pro-z8350) |\n| Chuwi         | Hi10 Plus                       | yes     | [firmware/chuwi/hi10_plus](firmware/chuwi/hi10_plus)           |\n| Chuwi         | HiBook                          | yes     | [firmware/chuwi/hibook](firmware/chuwi/hibook)                 |\n| Chuwi         | SurBook mini                    | yes     | [firmware/chuwi/surbook_mini](firmware/chuwi/surbook_mini)     |\n| Chuwi         | vx8 3G 32GB                     | no      | [firmware/chuwi/vx8_3g_32GB](firmware/chuwi/vx8_3g_32GB)       |\n| Nuvision      | NES11                           | yes     | [firmware/nuvision/nes11](firmware/nuvision/nes11)             |\n| EastRising\t| ER-TPC050-1                     | yes     | [firmware/eastrising/er-tpc050-1](firmware/eastrising/er-tpc050-1)|\n| Trekstor      | SurfTab wintron 7.0             | yes     | [firmware/trekstor/surftab7old](firmware/trekstor/surftab7old) |\n| Trekstor      | SurfTab wintron 7.0 (ST70416-6) | yes     | [firmware/trekstor/surftab7new](firmware/trekstor/surftab7new) |\n| Trekstor      | SurfTab twin 10.1 (ST10432-8)   | yes     | [firmware/trekstor/surftab-twin-10.1-ST10432-8](firmware/trekstor/surftab-twin-10.1-ST10432-8)|\n| Trekstor      | Primebook C13                   | yes     | [firmware/trekstor/primebook-c13/](firmware/trekstor/primebook-c13/)|\n| Trekstor      | Primetab T13B                   | no      | [firmware/trekstor/primetab-t13b/](firmware/trekstor/primetab-t13b/)|\n| Utok          | i800                            | yes     | [firmware/utok/i800](firmware/utok/i800)                       |\n| RCA           | Cambio W101 V2 10.1\" tablet     | yes     | [firmware/rca/w101v2](firmware/rca/w101v2)                     |\n| RCA           | Cambio W122SC24T2 12.2 tablet   | no      | [firmware/rca/w122sc24t2](firmware/rca/w122sc24t2)             |\n| Odys          | Fusion Win 12 - 2in1            | yes     | [firmware/odys/fusionwin12](firmware/odys/fusionwin12)         |\n| Onda          | V820w 16G                       | yes     | [firmware/onda/v820w_16g](firmware/onda/v820w_16g)             |\n| Onda          | V820w 32G                       | yes     | [firmware/onda/v820w_32g](firmware/onda/v820w_32g)             |\n| Onda          | V891 v5                         | yes     | [firmware/onda/v891_v5](firmware/onda/v891_v5)                 |\n| Onda          | V891w                           | no      | [firmware/onda/v891w](firmware/onda/v891w)                     |\n| Onda          | oBook 20 Plus                   | yes     | [firmware/onda/obook_20_plus](firmware/onda/obook_20_plus)     |\n| EduGear       | XR2N1                           | yes     | [firmware/edugear/xr2n1](firmware/edugear/xr2n1)               |\n| Cube          | i10                             | yes     | [firmware/cube/i10](firmware/cube/i10)                         |\n| Cube          | KNote (i1101)                   | yes     | [firmware/cube/i1101](firmware/cube/i1101)                     |\n| Cube          | KNote Go(i1101S)                | yes     | [firmware/cube/i1101S](firmware/cube/i1101S)                   |\n| jumper        | EZpad mini3                     | yes     | [firmware/jumper/EZpad_mini3](firmware/jumper/EZpad_mini3)     |\n| jumper        | EZpad 5SE                       | no      | [firmware/jumper/EZpad_5SE](firmware/jumper/EZpad_5SE)         |\n| jumper        | EZpad 6                         | yes     | [firmware/jumper/EZpad_6](firmware/jumper/EZpad_6)             |\n| jumper        | EZpad 6(S) Pro                  | yes     | [firmware/jumper/EZpad_6_pro](firmware/jumper/EZpad_6_pro)     |\n| jumper        | EZpad 6(S) Pro b                | yes     | [firmware/jumper/EZpad_6_pro_b](firmware/jumper/EZpad_6_pro_b) |\n| jumper        | EZpad 8 Pro                     | yes     | [firmware/jumper/EZpad_8_pro](firmware/jumper/EZpad_8_pro)     |\n| 4Good         | T803i                           | no      | [firmware/4good/t803i](firmware/4good/t803i)                   |\n| Voyo          | VBOOK A1                        | yes     | [firmware/voyo/at13](firmware/voyo/at13)                       |\n| Voyo          | VBOOK V3Pro                     | no      | [firmware/voyo/vbook_v3pro](firmware/voyo/vbook_v3pro)         |\n| DEXP          | Ursus 7W Rev.1                  | yes     | [firmware/dexp/ursus7w-rev1](firmware/dexp/ursus7w-rev1)       |\n| DEXP          | Ursus 7W Rev.2                  | yes     | [firmware/dexp/ursus7w-rev1](firmware/dexp/ursus7w-rev2)       |\n| DEXP          | Ursus KX210i                    | yes     | [firmware/dexp/ursus-kx210i](firmware/dexp/ursus-kx210i)       |\n| Teclast       | X3 Plus                         | yes     | [firmware/teclast/x3_plus](firmware/teclast/x3_plus)           |\n| Teclast       | X5 Pro                          | yes     | [firmware/teclast/x5_pro](firmware/teclast/x5_pro)             |\n| Proworx       | MX049                           | yes     | [firmware/proworx/mx049](firmware/proworx/mx049)               |\n| Insignia      | Flex 8                          | yes     | [firmware/insignia/flex8](firmware/insignia/flex8)             |\n| Insignia      | Flex 11                         | yes     | [firmware/insignia/flex11](firmware/insignia/flex11)           |\n| iLife         | ZedBook 2                       | yes     | [firmware/ilife/zedbook2](firmware/ilife/zedbook2)             |\n| IRBIS         | tw48                            | yes     | [firmware/irbis/tw48/](firmware/irbis/tw48)                    |\n| IRBIS         | TW39                            | yes (doesn't work)     | [firmware/irbis/TW39](firmware/irbis/TW39)                     |\n| Myria         | MY8307                          | yes     | [firmware/myria/my8307](firmware/myria/my8307)                 |\n| Schneider     | SCT101CTM                       | yes     | [firmware/schneider/sct101ctm](firmware/schneider/sct101ctm)   |\n| techBite      | Arc 11.6                        | yes     | [firmware/techbite/arc_11_6](firmware/techbite/arc_11_6)       |\n| Vinga         | Twizzle J116                    | yes     | [firmware/vinga/twizzle_j116](firmware/vinga/twizzle_j116)     |\n| Multilaser    | M11W                            | yes     | [firmware/multilaser/m11w](firmware/multilaser/m11w)           |\n| RWC           | NANOTE P8                       | yes     | [firmware/rwc/nanote-p8](firmware/rwc/nanote-p8)               |\n| RWC           | NANOTE NEXT                     | yes     | [firmware/rwc/nanote-next](firmware/rwc/nanote-next)           |\n| viglen        | connect10\"                      | yes     | [firmware/vliglen/connect10](firmware/viglen/connect10)        |\n| Saphir        | WinPad 10.1 FHD                 | no      | [firmware/saphir/winpad_10_1](firmware/saphir/winpad_10_1)     |\n| Hykker        | Hello                           | yes     | [firmware/hykker/hello]( firmware/hykker/hello)                |\n| Fusion5       | FWIN232PLUS                     | yes     | [firmware/fusion5/fwin232plus](firmware/fusion5/fwin232plus)   |\n| Fusion5       | T60                             | yes     | [firmware/fusion5/T60](firmware/fusion5/T60)                   |\n| CSL           | Panther Tab HD                  | yes     | [firmware/csl/panther-tab-hd](firmware/csl/panther-tab-hd)     |\n| Positivo      | C4128B                          | yes     | [firmware/positivo/c4128b](firmware/positivo/c4128b)           |\n| Globalspace   | SoLT IVW 11.6\"                  | yes     | [firmware/globalspace/solt-ivw-11.6](firmware/globalspace/solt-ivw-11.6) |\n| SARY          | Tab 3                           | yes     | [firmware/sary/tab-3](firmware/sary/tab-3) |\n\n\n## Adding new firmware\n\nTo request new firmware to be added to the list, please send a\npull request with the following structure:\n\n- `firmware/\u003cmanufacturer\u003e/\u003cdevice\u003e/\u003cunpacked driver\u003e/`\n  The original Windows or Android drivers or firmware files\n  (SileadTouch.sys, SileadTouch.fw, gslx68x_ts.ko, ...)\n- `firmware/\u003cmanufacturer\u003e/\u003cdevice\u003e/README.md`\n  A readme containing all (known) device information plus\n  download links to the original Windows/Android driver or\n  firmware. See [firmware/README.md.template](firmware/README.md.template)\n  for an example with explanations.\n- `firmware/\u003cmanufacturer\u003e/\u003cdevice\u003e/silead.fw`\n  (optional) The extracted regular firmware, as created by fw_extractor,\n  untscfg, unscramble or scanwindrv (see below).\n- `firmware/linux/gsl1680-\u003cmanufacturer\u003e-\u003cdevice\u003e.fw`\n  (optional) The same file as silead.fw, for use with the silead.ko driver\n  that is part of the Linux kernel (see below).\n  If you add this please also add an entry for this to `firmware/linux/README.md`.\n- `firmware/\u003cmanufacturer\u003e/\u003cdevice\u003e/silead_ts.fw`\n  (optional) Firmware in gslx680_ts_acpi format created by fwtool using correct\n  parameters (see below).\n- `README.md`\n  A patch to this readme file that adds an entry to the device list.\n\nThe \"Tested\" field should only be \"Yes\" if you have confirmed that\nthe converted firmware works with silead_ts.ko or gslx680_ts_acpi.ko\nand the touchscreen responds properly, i.e. the device parameters\nare good.\n\n\n## Extracting firmware\n\nOriginal vendor firmware comes in various formats, depending\non the operating system and driver version.\n\n\n### Android driver\n\nThe official Android driver can be found under this path (or similar):\n/system/vendor/modules/gslx680.ko\nCopy this file to an SD card, use a file transfer utility, or use `adb pull`.\n\nOn your build machine, use the script 'firmware/fw_extractor' from the command\nline to extract the firmware from the driver:\n\n    tools/fw_extractor my_android_gslx680.ko\n\nThe Android driver may well contain multiple firmwares to support\ndifferent hardware configurations with the same driver. The extractor\nwill spit those out as seperate files. We currently have no way of\nknowing which is right for your device. You will have to try each.\nSometimes, the file names will give a clue, like panel size, product\nname, resolution or chip name. Test the matching ones first.\n\n\n### Windows driver\n\nIf you have a Windows driver instead, the firmware either comes in\nthe form of a file named GSL_TS_CFG.h (or similar) or SileadTouch.fw.\nThe latter is just a scrambled version of GSL_TS_CFG.h and can be easily\nrestored by XORing every byte with 0x88.\n\nTo convert GSL_TS_CFG.h to binary, use:\n\n    tools/untscfg GSL_TS_CFG.h firmware.fw\n\nFor a scrambled SileadTouch.fw, use:\n\n    tools/unscramble SileadTouch.fw firmware.fw\n\nIf your vendor only supplied a Windows driver and no separate\nfirmware, you can still extract the firmware blob that is contained\ninside.\n\nUse the scanwindrv script to extract it:\n\n    tools/scanwindrv SileadTouch.sys\n\nAs with the Android driver, this may produce multiple firmware files named\nfirmware_00.fw, firmware_01.fw, etc. - you have to test them to find the\ncorrect one for your device.\n\n\n## Usage\n\nThere are currently two open-source drivers available for Silead chips:\nsilead_ts and gslx680_ts_acpi.\n\nsilead_ts ships with the Linux kernel since version 4.8 and is the recommended\ndriver. gslx680_ts_acpi can still be useful for initial testing or if silead_ts\ndoes not work for you.\n\nWhen Silead touchscreen support was added to ACPI (PC) platforms, the\nintegrator did not anticipate any uses cases outside the device vendor's\necosystems. For this reason, it is required to pass additional\ndevice parameters to the driver that are neither contained in the firmware\nnor in the ACPI DSDT. silead_ts handles this in the kernel, using a DMI\nquirk table. gslx680_ts_acpi expects firmware in its own format which contains\nthis information.\n\nsilead_ts allows passing the device parameters on the kernel commandline\nto test on devices which are not yet in the DMI quirk table. This is supported\nin kernel 6.10 and later, for older kernels the kernel needs to be patched\nand rebuilt [(see e.g. kernel-recompile-debian.md)](kernel-recompile-debian.md)\nto test parameter changes. For older kernels testing is easier with\ngslx680_ts_acpi.\n\n\n### Determining the touchscreen's parameters\n\n#### 1. Extract the firmware from the factory OS\n\nBefore even installing Linux make sure you have extracted the firmware from\nthe original factory OS as described above. Silead firmwares are model specific,\nso if the factory OS is wiped before retrieving the firmware then things will\nnot work. In this case you may still be able to download a factory OS image from\nthe device vendor's website, but not all vendors offer this.\n\n#### 2. Copying the firmware to /lib/firmare\n\nsilead_ts, which should already be enabled in your Linux distribution's kernel,\nwill print an error message about not being able to find the firmware in dmesg.\nTo get this error message run `sudo dmesg | grep silead`.\n\nCopy the extracted firmware under `/lib/firmware/silead/` using the name\ngiven in the error message. Usually it should be copied to\n`/lib/firmware/silead/mssl1680.fw`. After copying run\n`sudo rmmod silead; sudo modprobe silead` and then rerun\n`sudo dmesg | grep silead` this should now show the touchscreen getting\nregistered in the form of a line containing `input: silead_ts as ...`.\n\n#### 3. Testing you have the right firmware\n\nInstall evtest or evemu-record (evemu), although all examples below use\n`evtest` using either the `evtest` or `evemu-record` command should work.\n\nRun `sudo evtest`. This gives a list of `/dev/input/event#` devices.\nReplace `#` in the commands below with the number of the `/dev/input/event#`\nnode for the `silead_ts` input device.\n\nRun `sudo evtest /dev/input/event# | grep ABS_X` and then slowly run\nyour finger over the screen from the left edge of the screen to\nthe right edge along the middle line of the display and press Ctrl + C\nto terminate evtest when done. This should print slowly increasing or\ndecreasing ABS_X values.\n\nIf instead the ABS_X values stay approx. the same then your X and Y axis are\nswapped. Redo the test moving your finger over the screen from the top edge\nof the screen to the bottom edge along the middle line of the display instead.\n\nIf there are big jumps or holes in the range, retry making sure your finger\nmakes proper contact with the screen. If that doesn't help, then you have\nthe wrong firmware.\n\nAfter verifying the X axis works well repeat the process for ABS_Y and\nverify that the Y axis works well too.\n\n#### 4. Determine the min and max values of the axis\n\nRun `sudo evtest /dev/input/event# | grep ABS_X` and for the same edges\nas used for ABS_X during step 3 first place your finger on the display\nnear the edge and then *slowly* move it over the edge to the bezel,\nnotice the lowest or highest value reported for ABS_X while doing this.\nRepeat this about 5 times to make sure you really have found\nthe lowest / highest value the axis reports.\n\nWrite down the lowest ABS_X value observed as x-min and the highest\nobserved value (on the other edge) as x-max.\n\nRepeat this for ABS_Y and write down y-min and y-max.\n\n#### 5. Testing the parameters\n\nWhen running kernel 6.10 or later you can now test the found min/max\nvalues on the kernel commandline.\n\nThis requires the ACPI Hardware ID (HID) for the touchscreen. Run\n`ls -d /sys/bus/i2c/devices/i2c-MSSL*`, this should output a single line\nending in e.g. `i2c-MSSL1680:00`. The ACPI HID of the touchscreen is the bit\nafter the `i2c-` and before the `:00` so `MSSL1680` in this case.\n\nThis HID is the first argument for the `i2c_touchscreen_props` kernel\ncommandline argument. To pass the found min/max values the following syntax\nis used:\n\n```\ni2c_touchscreen_props=\u003cACPI_HW_ID\u003e:touchscreen-min-x=\u003cx-min\u003e:touchscreen-min-y=\u003cy-min\u003e:touchscreen-size-x=\u003cx-max + 1\u003e:touchscreen-size-y=\u003cy-max + 1\u003e\n```\n\nSo if for example in step 4. you have found values of x-min=8, y-min=8,\nx-max=1919, y-max=1079 then the kernel commandline argument to pass would be:\n\n```\ni2c_touchscreen_props=MSSL1680:touchscreen-min-x=8:touchscreen-min-y=8:touchscreen-size-x=1920:touchscreen-size-y=1080\n```\n\nEdit your kernel configuration, e.g. `/boot/loader/entries/\u003ccurrent-kernel\u003e.conf`,\nadd this to your kernel commandline then reboot to test. After reboot run\n`sudo cat /proc/cmdline` to make sure that `i2c_touchscreen_props=...` is there\nand is correct.\n\nWith some luck your touchscreen will now work right away. Sometimes the X/Y axis\nneed be to swapped or inverted. Note swapping will automatically swap the size\nand min parameters, so those must not be swapped manually. So lets say you need\nto swap and invert the Y axis, you would then extend `i2c_touchscreen_props=`\nby adding `:touchscreen-swapped-x-y:touchscreen-inverted-y` after the size-x\nparameter, so you would get (abbreviated):\n\n```\ni2c_touchscreen_props=MSSL1680:touchscreen-min-x=...:touchscreen-size-y=1080:touchscreen-swapped-x-y:touchscreen-inverted-y\n```\n\nIf one of the bezels around the display has a Windows logo chances are this\ncan operate as a capacitive home-button. To test this add `:silead,home-button`\nafter the existing `i2c_touchscreen_props=` parameters. After rebooting with\n`:silead,home-button` added to the parameters run `sudo evtest /dev/input/event#`\nand press the Windows logo if this reports `KEY_LEFTMETA` events then it works.\n\nIf this does not work drop `silead,home-button` from your parameters since this\nmay cause spurious `KEY_LEFTMETA` events when it is not supported.\n\nThe linux touchscreen framework also supports some other properties that\nmay be useful, see [touchscreen.yaml](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml)\nfor a full list.\n\n#### 6. Submit the parameters to gsl-firmware\n\nAt this point everything should work. Please submit a pull request\nas described under \"Adding new firmware\" above. Please include\na copy of the working firmware as\n`firmware/linux/silead/gsl\u003cchip name\u003e-\u003cmanufacturer\u003e-\u003cdevice\u003e.fw`\nin this pull request. If you don't know the chip name, use gsl1680.\nManufacturer and device name should be shortened to make the name readable,\nbut still sufficiently unique.\n\nAlso update firmware/linux/README.md adding an entry for the new firmware.\n\nIn the pull request text please provide the working `i2c_touchscreen_props=`\nparameters and the output of running `grep . /sys/class/dmi/id/* 2\u003e /dev/null`\nas a normal user. Then the gsl-firmware maintainers can help with creating\na DMI quirk for your device model to make future kernels automatically apply\nthe right parameters.\n\nYou can also create a touchscreen_dmi.c patch yourself if you want, see below.\n\n\n### Patching touchscreen_dmi.c\n\nFetch the current Linux source code and open `drivers/platform/x86/silead_dmi.c`\nin a text editor. Since Linux kernel 4.19, this file is called\n`drivers/platform/x86/touchscreen_dmi.c`.\n\nSupposing you named your firmware `gsl1680-mycompany-mytablet.fw` and the\ntouchscreen has a resolution of 128x128 points, add a new section to the file:\n\n```c\nstatic const struct property_entry mycompany_mytablet_props[] = {\n\tPROPERTY_ENTRY_U32(\"touchscreen-size-x\", 128),\n\tPROPERTY_ENTRY_U32(\"touchscreen-size-y\", 128),\n\tPROPERTY_ENTRY_STRING(\"firmware-name\", \"gsl1680-mycompany_mytablet.fw\"),\n\tPROPERTY_ENTRY_U32(\"silead,max-fingers\", 10),\n\t{ }\n};\n\nstatic const struct silead_ts_dmi_data mycompany_mytablet_data = {\n\t.acpi_name\t= \"MSSL1680:00\",\n\t.properties\t= mycompany_mytablet_props,\n};\n```\n\nIn some rare cases, the `acpi_name` may be different.\n\nFurther below, there is a list named `silead_ts_dmi_table`:\n```c\nstatic const struct dmi_system_id silead_ts_dmi_table[] = {\n```\n\nAdd a new entry to this list:\n```c\n\t{\n\t\t/* Teclast X3 Plus */\n\t\t.driver_data = (void *)\u0026mycompany_mytablet_data,\n\t\t.matches = {\n\t\t\tDMI_MATCH(DMI_SYS_VENDOR, \"MyCompany\"),\n\t\t\tDMI_MATCH(DMI_PRODUCT_NAME, \"MyTablet\"),\n\t\t\tDMI_MATCH(DMI_BOARD_NAME, \"Generic Board\"),\n\t\t},\n\t},\n```\n\nThe exact values and suitable matching tags depend on the particular device.\nYou can find them by running `grep . /sys/class/dmi/id/* 2\u003e /dev/null`.\n\n[See here for an example patch](https://patchwork.kernel.org/project/platform-driver-x86/patch/20180608214558.30717-3-hdegoede@redhat.com/).\n\nAfter adding the override tables, you have to recompile your kernel,\nas the DMI overrides are outside the context of the driver. Install and reboot.\nYou may also try reloading the kernel using `kexec`, but this can lead to an\nunstable system and is not recommended.\n\nOnce the parameters have been tested successfully, it's recommended that\nyou submit the patch for Linux kernel inclusion.\nSee the [Submitting patches](https://www.kernel.org/doc/html/latest/process/submitting-patches.html)\ndocumentation on how to do this. Please send it to the\n[linux-input](http://vger.kernel.org/vger-lists.html#linux-input) and\n[platform-driver-x86](http://vger.kernel.org/vger-lists.html#platform-driver-x86)\nmailing lists.\n\n\n### gslx680_ts_acpi\n\nThe [gslx680-acpi](https://github.com/onitake/gslx680-acpi) driver\nrequires firmware in a special compact format.\n\nUse [tools/fwtool](tools/fwtool) to convert regular firmware\ninto this format. The tool will also store device parameters (such as\nsuch as panel width and height, tracking support, etc.) inside the firmware.\n\nThe file format is described in 'firmware/Firmware/Silead.pm'.\nUse perldoc or a text editor to read.\n\nExample usage:\n\n    tools/fwtool -c firmware.fw -m 1680 -w 940 -h 750 -t 10 silead_ts.fw\n\nThis will read the regular `firmware.fw` file and convert it into `silead_ts.fw`\nin the gslx680_ts_acpi format, then set the controller type to GSL1680,\nthe panel width to 940 dots, the height to 750 dots and the maximum number\nof touch points to 10. The README for each firmware should give\nyou information on the information to put there.\n\nIt is also possible to convert the scrambled SileadTouch.fw from a\nWindows driver directly:\n\n    tools/fwtool -c SileadTouch.fw -3 -m 1680 -w 940 -h 750 -t 10 silead_ts.fw\n\nAnd for an unscrambled GSL_TS_CFG.h, use:\n\n    tools/fwtool -c TS_CFG.h -2 -m 1680 -w 940 -h 750 -t 10 silead_ts.fw\n\nYou might still need to calibrate the touchscreen later, if\nthe numbers are unknown or not accurate. Note that the maximum\nwidth and height are 4095. The driver is currently hardcoded\nto a touch point limit of 10 fingers, so specifying more than\nthat will not work.\n\nIf your touchscreen controller does not support finger tracking\n(this is crucial for proper mouse emulation) or axes seem to be\nmirrored or swapped, you can modify the firmware to\nenable corresponding features in the driver.\n\nFor example, this enables software finger tracking and mirrors\nthe horizontal axis:\n\n    tools/fwtool -s -f track,xflip silead_ts.fw\n\nThe -f option may also be specified directly when converting\na firmware image.\n\nThe resulting firmware should be named silead_ts.fw and\ninstalled into /lib/firmware so the driver can find it.\n\nTo convert a firmware image back into regular format, use:\n\n    tools/fwtool -x gslxxxx.fw silead_ts.fw\n\nNote that memory page order is not preserved. This should not\npose a problem for the controller, however.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonitake%2Fgsl-firmware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonitake%2Fgsl-firmware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonitake%2Fgsl-firmware/lists"}