Page MenuHomeFreeBSD

Contributor Reviews (base)Project
ActivePublic

Recent Activity

Today

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.

Sun, Jul 21, 2:34 PM · Contributor Reviews (base)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

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

That is expected as it ignored any touchpads

Sun, Jul 21, 12:56 PM · Contributor Reviews (base)

Yesterday

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

[...]

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

Fri, Jul 19

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

@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

leaving all other modules built from the source of this thread?

drivers from this review should be at least unloaded from kernel. There is no need to revert D16698 patch. Just don't try to kldload both modules in between reboots.

Should I remove evdev support from the kernel?

No need. It links with evdev unconditionally

Can you please share your xorg configuration?

I do not have any specific xorg.conf options. Any evdev-awared autoconfiguration backend should work out of box. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196678 for example.

Fri, Jul 19, 9:31 PM · Contributor Reviews (base)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

Parsed:

0x05, 0x0D,        // Usage Page (Digitizer)
0x09, 0x05,        // Usage (Touch Pad)
0xA1, 0x01,        // Collection (Application)
0x85, 0x04,        //   Report ID (4)
0x09, 0x22,        //   Usage (Finger)
0xA1, 0x02,        //   Collection (Logical)
Fri, Jul 19, 9:13 PM · Contributor Reviews (base)
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.

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

Thu, Jul 18

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.

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

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.

Thu, Jul 18, 9:59 PM · Contributor Reviews (base)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

I see. Sigh. Anyway, some people from this thread reported that two finger scrolling *does* work, including @johalun himself in his announcement:

If I do two finger horizontal scroll I don't get any event callbacks at all while I do for vertical. Could this be something that has to be enabled by sending some command to the device?

Thu, Jul 18, 9:45 PM · Contributor Reviews (base)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

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

Thu, Jul 18, 9:34 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.

Thu, Jul 18, 7:13 PM · Contributor Reviews (base)
johalun 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 :)

Thu, Jul 18, 4:30 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 :)

Thu, Jul 18, 2:28 PM · Contributor Reviews (base)
greg_unrelenting.technology 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)

Thanks; I thought that kldload evdev was enough; but kernel with EVDEV_SUPPORT was needed.

Thu, Jul 18, 10:46 AM · Contributor Reviews (base)

Wed, Jul 17

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)

Wed, Jul 17, 10:48 PM · Contributor Reviews (base)
greg_unrelenting.technology 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.
Wed, Jul 17, 1:06 AM · Contributor Reviews (base)

Tue, Jul 16

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.

Tue, Jul 16, 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

Tue, Jul 16, 5:45 PM · Contributor Reviews (base)
marc.priggemeyer_gmail.com 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:

Tue, Jul 16, 3:17 PM · Contributor Reviews (base)

Mon, Jul 15

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

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

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

Mon, Jul 8

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

Oh, nice. Your iichid_identify() method is basically identical to what I wrote. You're right, it does not strictly require a separate module, it just seemed cleaner to have a generic acpi_iichid bus.

I don't object to acpi_iichid module existence. It just adds an extra requirements for module load order which I was not able to solve quickly.

I think it would be best to try and base the ims driver on top of your code. Are you interested in trying to integrate them?

Yes, I am going to submit this code to the project when it will be ready, so it is better to have it insync with ims

Mon, Jul 8, 11:15 PM · Contributor Reviews (base)
markj added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#452631, @wulf wrote:

I wrote a driver for I2C MT touchscreens https://github.com/wulf7/iichid which is heavily based on the code in this review.
It does not require dedicated ACPI module at all and has some I2C/HID layers separation which is missed in current review.
So I think it may have sense to join efforts and codebases

Mon, Jul 8, 10:19 PM · Contributor Reviews (base)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

I wrote a driver for I2C MT touchscreens https://github.com/wulf7/iichid which is heavily based on the code in this review.
It does not require dedicated ACPI module at all and has some I2C/HID layers separation which is missed in current review.
So I think it may have sense to join efforts and codebases

Mon, Jul 8, 10:06 PM · Contributor Reviews (base)
marc.priggemeyer_gmail.com added a comment to D16698: First draft HID over I2C support (Mouse only).

I reuploaded the full patch with a sysctl (power_state) added.
Setting

Mon, Jul 8, 9:07 PM · Contributor Reviews (base)
fbsd_opal.com added a comment to D16698: First draft HID over I2C support (Mouse only).

I just looked into Microsoft's HID over I2C specification document again. Section 8.2 deals with "Host Initiated Power Optimizations" (HIPO). There, sleep and on are explicitly stated as modes that the host should take care of:
Quote: [1]

The HOST is responsible for optimizing the power of the overall system and the DEVICE. This method of power optimization is to be used when the HOST wishes to provide power optimization notifications to devices.
The following power states are defined for HIPO and are not to be confused with vendor specific DIPO states.

• ON
• SLEEP

Section 7.2.8 specifies the SET_POWER command, so the DEVMETHODs device_suspend and device_resume should implement sleep and wakeup transitions for the human interface device. In addition, the device is not required to respond to the SET_POWER command, so it could be implemented fairly easy. Probably something like this (untested):

static int
iichid_write_register(device_t dev, uint8_t* cmd, int cmdlen)
static int
iichid_set_power(device_t dev, struct i2c_hid_desc* hid_desc, bool sleep)
Mon, Jul 8, 12:51 PM · Contributor Reviews (base)

Sun, Jul 7

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

Hmm, I think I did not intend to create a new diff. Should I reupload, or can it be merged?

Sun, Jul 7, 4:12 PM · Contributor Reviews (base)

Sat, Jul 6

marc.priggemeyer_gmail.com added a comment to D16698: First draft HID over I2C support (Mouse only).

Hmm, I think I did not intend to create a new diff. Should I reupload, or can it be merged?

Sat, Jul 6, 10:06 PM · Contributor Reviews (base)
marc.priggemeyer_gmail.com updated the diff for D16698: First draft HID over I2C support (Mouse only).
Sat, Jul 6, 9:55 PM · Contributor Reviews (base)
marc.priggemeyer_gmail.com added a comment to D16698: First draft HID over I2C support (Mouse only).

Do you have a license header for iichid.c?

Sat, Jul 6, 9:38 PM · Contributor Reviews (base)
markj added a comment to D16698: First draft HID over I2C support (Mouse only).

#1

The acpi_iichid driver needs to be rewritten. It should be a child of the iic bus, not the acpi bus. I've started working on this.

I will submit to the more experienced developers on this point, for completeness I would still like to include my findings here:

  • The I2C Bus is not enumerable, which means that the driver won't be attached automatically if it is a child of iicbus.
Sat, Jul 6, 8:11 PM · Contributor Reviews (base)
marc.priggemeyer_gmail.com added a comment to D16698: First draft HID over I2C support (Mouse only).

#1

The acpi_iichid driver needs to be rewritten. It should be a child of the iic bus, not the acpi bus. I've started working on this.

Sat, Jul 6, 7:37 PM · Contributor Reviews (base)
markj added a comment to D16698: First draft HID over I2C support (Mouse only).

@marc.priggemeyer_gmail.com or @markj, is what's here sufficient for now, or do the edev fixes need to go in, too? It looked like suspend/resume was the biggest issue. I'm worried about this review being a casualty of perfection vs making incremental, usable progress. Given the successes reported so far, I'm trying to gauge what's mandatory vs what should be done next post-commit.

Sat, Jul 6, 3:41 PM · Contributor Reviews (base)
fbsd_opal.com added a comment to D16698: First draft HID over I2C support (Mouse only).

@marc.priggemeyer_gmail.com or @markj, is what's here sufficient for now, or do the edev fixes need to go in, too? It looked like suspend/resume was the biggest issue. I'm worried about this review being a casualty of perfection vs making incremental, usable progress. Given the successes reported so far, I'm trying to gauge what's mandatory vs what should be done next post-commit.

Sat, Jul 6, 10:38 AM · Contributor Reviews (base)
seanc added a comment to D16698: First draft HID over I2C support (Mouse only).

@marc.priggemeyer_gmail.com or @markj, is what's here sufficient for now, or do the edev fixes need to go in, too? It looked like suspend/resume was the biggest issue. I'm worried about this review being a casualty of perfection vs making incremental, usable progress. Given the successes reported so far, I'm trying to gauge what's mandatory vs what should be done next post-commit.

Sat, Jul 6, 7:02 AM · Contributor Reviews (base)

Fri, Jun 28

bcran closed D20765: Add ACPI entries for Synopsys Designware UARTs used on ARM platforms.
Fri, Jun 28, 1:19 AM · Contributor Reviews (base), arm64
bcran closed D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Fri, Jun 28, 1:17 AM · Contributor Reviews (base), arm64
bcran accepted D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Fri, Jun 28, 1:14 AM · Contributor Reviews (base), arm64
bcran added a comment to D20765: Add ACPI entries for Synopsys Designware UARTs used on ARM platforms.
Fri, Jun 28, 1:10 AM · Contributor Reviews (base), arm64

Thu, Jun 27

greg_unrelenting.technology added a comment to D20765: Add ACPI entries for Synopsys Designware UARTs used on ARM platforms.

I just tried booting with this patch applied and with EDK2 firmware built from master yesterday, and I still don't see any output - both with devicetree and acpi.

Thu, Jun 27, 10:56 PM · Contributor Reviews (base), arm64
bcran added a comment to D20765: Add ACPI entries for Synopsys Designware UARTs used on ARM platforms.

I just tried booting with this patch applied and with EDK2 firmware built from master yesterday, and I still don't see any output - both with devicetree and acpi.

Thu, Jun 27, 6:49 PM · Contributor Reviews (base), arm64
D20775: Add missing ACPI GICv2 MSI/MSI-X attachment is now accepted and ready to land.
Thu, Jun 27, 6:22 AM · Contributor Reviews (base), arm64

Wed, Jun 26

greg_unrelenting.technology retitled D20775: Add missing ACPI GICv2 MSI/MSI-X attachment from Add missing ACPI GICv2 MSI/MSI-X support to Add missing ACPI GICv2 MSI/MSI-X attachment.
Wed, Jun 26, 8:54 PM · Contributor Reviews (base), arm64
greg_unrelenting.technology updated subscribers of D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Wed, Jun 26, 8:52 PM · Contributor Reviews (base), arm64
greg_unrelenting.technology updated the test plan for D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Wed, Jun 26, 8:51 PM · Contributor Reviews (base), arm64
greg_unrelenting.technology added a project to D20765: Add ACPI entries for Synopsys Designware UARTs used on ARM platforms: Contributor Reviews (base).
Wed, Jun 26, 8:48 PM · Contributor Reviews (base), arm64
greg_unrelenting.technology created D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Wed, Jun 26, 8:47 PM · Contributor Reviews (base), arm64

Mon, Jun 24

fbsd_opal.com added a comment to D16698: First draft HID over I2C support (Mouse only).

By the way, there is an error in the diff of sys/conf/files in this D16698 patch:

Mon, Jun 24, 8:25 AM · Contributor Reviews (base)

Sun, Jun 23

fbsd_opal.com added a comment to D16698: First draft HID over I2C support (Mouse only).

Could anyone affected by the issue give the patch here a try? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238037

Sun, Jun 23, 8:04 PM · Contributor Reviews (base)
markj added a comment to D16698: First draft HID over I2C support (Mouse only).

Could anyone affected by the issue give the patch here a try? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238037

Sun, Jun 23, 7:48 PM · Contributor Reviews (base)
fbsd_opal.com added a comment to D16698: First draft HID over I2C support (Mouse only).

I've been playing around with it here https://gist.github.com/johalun/ffc271a07a0cf50d0bc816138c4eec81 but still no success. Basically there are no interrupts from the device after resume. I don't know if this is because ig4 or the i2c device missing some kind of reset command. I found something in MS docs about sending an i2c reset command which you can see in the resume function but it doesn't do anything which makes me think that ig4 is the problem. Here I simply copy/paste the routine from the attach function to resume but not sure that's enough. Probably need to spend some times reading reference manual for the devices.

Sun, Jun 23, 7:45 PM · Contributor Reviews (base)