Now it do not fail, but input is still not working. I tried to read HID descriptor by using bus_raw from userland and some garbage different on each run is returned. Maybe there are some differences between intel i2c controllers. Working Linux driver: https://github.com/torvalds/linux/blob/v5.4/drivers/i2c/busses/i2c-designware-master.c. I briefly compared Haiku pch_i2c and Linux i2c-designware and I did’t found major differences.
ACPI interrupts might need special handling. Did you check interrupts work as expected for the I2C controller?
When executing
const size_t dataSize = 0x1e;
uint16 addr = 0x10;
uint16 cmd = 1;
uint8 data[dataSize];
i2c_ioctl_exec exec;
exec.addr = addr;
exec.op = I2C_OP_READ_STOP;
exec.cmdBuffer = &cmd;
exec.cmdLength = sizeof(cmd);
exec.buffer = &data;
exec.bufferLength = dataSize;
if (ioctl(fd, I2CEXEC, &exec, sizeof(exec)) == 0) {
for (int i = 0; i < exec.bufferLength; i++) {
printf("%02x ", (int)(data[i]));
if (i % 16 == 15) printf("\n");
}
printf("\n");
} else
printf("error\n");
Following is written to syslog
KERN: pch_i2c: CALLED status_t acquire_bus(i2c_bus_cookie)
KERN: pch_i2c: CALLED status_t exec_command(i2c_bus_cookie, i2c_op, i2c_addr, const void*, size_t, void*, size_t)
KERN: pch_i2c: exec_command: acquired busy flag
KERN: pch_i2c: exec_command: write slave address
KERN: pch_i2c: exec_command: write command buffer
KERN: pch_i2c: pch_i2c_interrupt_handler 10
KERN: pch_i2c: exec_command: processing buffer 30 bytes
KERN: pch_i2c: pch_i2c_interrupt_handler 10
KERN: pch_i2c: pch_i2c_interrupt_handler 4
Last message repeated 1 time
KERN: pch_i2c: exec_command 18 bytes to be read
KERN: pch_i2c: pch_i2c_interrupt_handler 4
KERN: Last message repeated 3 times.
KERN: pch_i2c: pch_i2c_interrupt_handler 0
KERN: pch_i2c: exec_command: processing done
KERN: pch_i2c: CALLED void release_bus(i2c_bus_cookie)
And stdout is:
0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00
It don’t look like HID descriptor.
Something weirld is happening: syslog output and file creation inside <i2c_hid> HIDDevice::HIDDevice is not working, but fParser.ReportAt(HID_REPORT_TYPE_ANY, i)->PrintToStream();
is working. I tried TRACE_ALWAYS and dprintf and it don’t working. HIDDevice::HIDDevice is definitely called, I checked it by inserting panic()
call and getting KDL stack trace.
I follow this post with great interest because I have a laptop with I2C touchpad (15340) ,.
Will your work on the I2C bus allow me to have a functional touchpad?
Korli said that he managed to make his I2C touchpad working. I can give instructions how to build I2C HID drivers or I can upload prebuilt package if needed.
Can you provide hardware ID for I2C controller? If you use Windows, you can set list devices by connection in Device Manager, find your touchpad, go up to find I2C controller, open properties and copy hardware ID.
On linux :
input: ELAN1200:00 04F3:3067 Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN1200:00/0018:04F3:3067.0001/input/input9.
you can find all description in 15340 ticket.
I did MAJ 54042, the I2C bus is well recognized, but the touchpad does not work.
listdev :
device Signal processing controller [11|80|0]
vendor 8086: Intel Corporation
device 9d61: Sunrise Point-LP Serial IO I2C Controller #1
device Signal processing controller [11|80|0]
vendor 8086: Intel Corporation
device 9d60: Sunrise Point-LP Serial IO I2C Controller #0
This device ID is supported by pch_i2c driver: https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/busses/i2c/pch_i2c_pci.cpp#n326. Driver is not included to image yet, it should be built and installed manually.
I am not a developer, so I will wait for it to be included in the updates.
Thank you for your help
You can try to install this package and reboot: https://gofile.io/?c=k0tF19. See if your touchpad start working or not. Also take syslog again.
Ok, good news it works … almost.
everything is fine except that the cursor is “drifting” all the time, it is constantly moving and going to hang on one of the edges of the screen and is too sensitive.
I tried different settings without arriving at a usable operation
Did i2c* files created in /boot/system/cache/tmp? If yes, please attach it to ticket.
Ok it is done, but do not forget that during the installation of haiku (7/8 months), the touchpad not being detected the setting utility was not installed.
This may be the problem.
And with the regression of “supplicant wpa” (see 15866, 15868), I no longer have an internet connection, so no longer the possibility of updating.
Yes, sorry, this is due to changing Haiku itself without wpa_supplicant in lock-step yesterday; we ran into some hiccups during some builder updates as part of work towards R1/beta2. You can revert to the previous “state” (in /system/packages/administrative/state_...
) by pkgman install path/to/state/*.hpkg
and rebooting; this should bring back WiFi for now.
Don’t be sorry it’s part of the game.
Thank you, I will try to follow your procedure
Ok that’s good, I reinstalled the 54020 version.
Rather than reinstall everything, is it possible to install the Touchpad utility?
I tried “pkgman install Touchpad” but without result.
Touchpad controls shows up only if the hw amd the driver supports it.
Btw Touchpad prefs located in Input prefs nowadays… Or at least it should.
Yes, it will be shown as a Touchpad in Input preferences if your device is supported as a touchpad. Otherwise it will show as a mouse.
yes it is seen as a mouse.
But, I have another laptop (old), on which the touchpad was detected correctly and on which the utility “Touchpad” disappeared from preferences.
I find a link in “superprefs”, but without effect (bring up the utility).
Have there been any changes?
Touchpad preference was moved to Input preference. It should be displayed when touchpad device is selected.