Page MenuHomeFreeBSD

nikola.lecic_anthesphoria.net (Nikola Lečić)
User

Projects

User does not belong to any projects.

User Details

User Since
May 12 2019, 9:06 AM (26 w, 3 d)

Recent Activity

Jul 29 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457967, @wulf wrote:

Could you send me your DSDT table with email? It is too big to be posted here. It can be obtained with

# acpidump -dt

Sure, done.

Jul 29 2019, 1:46 PM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).

try to replace 'IG4_CTL_SPEED_STD' string in /usr/src/sys/dev/ichiic/ig4_iic.c file with digit '6' than rebuild and reload ig4.ko .

Jul 29 2019, 1:04 AM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457883, @wulf wrote:

Yes, it still prints.

Ok. than uncomment pair of debugging printfs in iichid_event_task(). They lie several lines below iichid_intr() sub.
If you get one line with hex data per "something", post it here

Jul 29 2019, 12:03 AM · Contributor Reviews (base)

Jul 28 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457878, @wulf wrote:
In D16698#457872, @wulf wrote:
In D16698#457847, @wulf wrote:

then comment out imt_set_input_mode() call in imt_attach() subroutine (imt.c) and insert printf("something\n"); into iichid_intr() sub (iichid.c)
If it print something on the console when you touching trackpad surface?

Yes! :) It prints "something".

It should print continuously if you'd move your finger

Jul 28 2019, 11:18 PM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457872, @wulf wrote:
In D16698#457847, @wulf wrote:

then comment out imt_set_input_mode() call in imt_attach() subroutine (imt.c) and insert printf("something\n"); into iichid_intr() sub (iichid.c)
If it print something on the console when you touching trackpad surface?

Jul 28 2019, 10:41 PM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457847, @wulf wrote:

Here it is.

Attach phase looks good now
Try to replace iichid_set_power() and iichid_reset() subroutine bodies in iichid.c with return(0);

Jul 28 2019, 9:23 PM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457750, @wulf wrote:

All done, no difference, nothing happens with evemu-record. :(

What is in your dmesg log? Please post it including device attachment part

Jul 28 2019, 1:26 PM · Contributor Reviews (base)

Jul 27 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457552, @wulf wrote:

Touching/pressing/doing anything with touchpad produces absolutely nothing.

Ouuuch. I forgot one important thing! ig4.ko must be fixed before this driver get used. I am sorry.
Just add following snippet to ig4iic_pci_methods array in /usr/src/sys/dev/ichiic/ig4_pci.c and rebuild kernel or ig4.ko

/* Bus interface */
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource),
DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource),
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
Jul 27 2019, 11:47 PM · Contributor Reviews (base)

Jul 23 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#456208, @wulf wrote:

Sorry, no difference.

I enabled debugging output in imt.c so please:

  1. Update sources
  2. make && sudo kldload ./iichid.ko
  3. sudo sysctl hw.imt.debug=6
  4. sudo evemu-record /dev/input/event<touchpad unit number>
  5. Do a touch for half an second
  6. Post dmesg output starting form first imt0: line
Jul 23 2019, 12:23 AM · Contributor Reviews (base)

Jul 22 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#456090, @wulf wrote:

The only problem -- the device is still dead;

I fixed one bug, so try one more time

Jul 22 2019, 12:46 AM · Contributor Reviews (base)

Jul 21 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#455907, @wulf wrote:

Unlike with previous driver, I don't see /dev/input/event3 (HID over IIC) anymore.

That is expected as it ignored any touchpads
I added some basic touchpad support (surface touches only, no buttons) so you can try it again
Unfortunately, it is untested.

Jul 21 2019, 2:34 PM · Contributor Reviews (base)

Jul 20 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#455669, @wulf wrote:

@wulf, please explain how to test this driver. Should I just compile new iichid.ko (running make in the input directory),

just unpack it at your $HOME. Than

make && sudo kldload ./iichid.ko

[...]

Jul 20 2019, 3:18 PM · Contributor Reviews (base)

Jul 19 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#455371, @wulf wrote:

We have the wmt driver but right now it's *touchscreen*-only and (of course) USB-only.

I have half-completed (it is working for me!) WIP port of wmt for i2c bus https://github.com/wulf7/iichid.

Jul 19 2019, 12:21 AM · Contributor Reviews (base)

Jul 18 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#455403, @wulf wrote:

OS driver or userland applications just do not have enough information as finger coords or count to support doublefinger scroll or multifinger taps.

I wrote a simple util to dump report descriptor from I2C HID device

.
It accepts 3 input parameters: iic device path, i2c bus address and i2c HID register and prints report descriptor of given I2C device on stdout. This report descriptor can be further analyzed with any tool (e.g. web-based http://eleccelerator.com/usbdescreqparser/) to examine HID device capabilities.

Jul 18 2019, 11:38 PM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).

EVDEV is still optional and the driver won't compile without the #ifdefs if it's not enabled. Just recently I think it has been enabled by default.

Jul 18 2019, 7:13 PM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).

hm. EVDEV_SUPPORT enables evdev in "legacy" drivers like psm, ums, ukbd etc. I'm not sure why @johalun added ifdefs for that here, this is a new driver :)

Jul 18 2019, 2:28 PM · Contributor Reviews (base)

Jul 17 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).
  1. I compiled this driver with EVDEV support (https://gist.github.com/johalun/3c67a678e740b82512cec52bfe926092). How can I make use of it? I see no difference with and without this patch.

If there's a new device in /dev/input, it is working. You can run libinput debug-events to see the input events. To consume evdev devices from xorg, use xf86-input-libinput. There were patches for autodetection (one adding evdev autodetection to the devd backend, another switching to the udev backend with libudev-devd). The devd one might have been merged?? (I don't follow Xorg, I use Wayland exclusively)

Jul 17 2019, 10:48 PM · Contributor Reviews (base)

Jul 16 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).

... please note that I edited my last post; touchpad is working again after test #3.

Jul 16 2019, 7:33 PM · Contributor Reviews (base)
nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).

Many thanks for your efforts! My laptop: Asus Zenbook 14 UX410UFR with 12.0-RELEASE. After kldload ig4 iic acpi_iichid the device works after being probed with i2c -v -s -f /dev/iic1 (thanks fbsd_opal.com). My /var/log/messages:

Could you post the full output of the i2c -v -s -f /dev/iic1 command? I just checked the implementation and i2c either uses START/STOP or reads a byte to perform a scan per address. On my laptop (using ig4), I get the following output and I think it looks similar on yours.

dev: /dev/iic1, addr: 0x0, r/w: r, offset: 0x00, width: 8, count: 1
Hardware may not support START/STOP scanning; trying less-reliable read method.
Scanning I2C devices on /dev/iic1: 2c

Jul 16 2019, 5:45 PM · Contributor Reviews (base)

Jul 15 2019

nikola.lecic_anthesphoria.net added a comment to D16698: First draft HID over I2C support (Mouse only).

Many thanks for your efforts! My laptop: Asus Zenbook 14 UX410UFR with 12.0-RELEASE. After kldload ig4 iic acpi_iichid the device works after being probed with i2c -v -s -f /dev/iic1 (thanks fbsd_opal.com). My /var/log/messages:

Jul 15 2019, 1:07 AM · Contributor Reviews (base)