Page MenuHomeFreeBSD
Feed Advanced Search

Jul 25 2020

marc.priggemeyer_gmail.com updated the summary of D16698: First draft HID over I2C support (Mouse only).
Jul 25 2020, 9:52 AM · Contributor Reviews (base)

Jul 22 2020

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

Are you having issues with sysutils/iichid or wulf's respository? He fixed serious issues and provided a HID layer that you should stick to.

Jul 22 2020, 12:05 PM · Contributor Reviews (base)

Jul 15 2020

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

I'm using patches from this review for last two years.
Please apply this patch to FreeBSD base code.

Jul 15 2020, 1:27 PM · Contributor Reviews (base)
KOT_MATPOCKuH.Ru added a comment to D16698: First draft HID over I2C support (Mouse only).

I'm using patches from this review for last two years.
Please apply this patch to FreeBSD base code.

Jul 15 2020, 11:02 AM · Contributor Reviews (base)

Jun 26 2020

cperciva accepted D18482: Amazon EC2: Disable floppy devices (fdc0, fd0,) and parallel port device (pp0).

Ah, on t2.micro I see warnings about fdc (but not about ppc). Normally I aim to minimize the difference between EC2 and "stock" FreeBSD, but I guess there's no harm in making this change even if it only affects older instance types.

Jun 26 2020, 12:55 AM · Contributor Reviews (base)

Jun 25 2020

imp accepted D18482: Amazon EC2: Disable floppy devices (fdc0, fd0,) and parallel port device (pp0).
Jun 25 2020, 11:25 PM · Contributor Reviews (base)
james.wright_digital-chaos.com added a comment to D18482: Amazon EC2: Disable floppy devices (fdc0, fd0,) and parallel port device (pp0).

Which instance type are you seeing this on? I haven't been able to reproduce it.

Jun 25 2020, 10:20 PM · Contributor Reviews (base)
cperciva added a comment to D18482: Amazon EC2: Disable floppy devices (fdc0, fd0,) and parallel port device (pp0).

Which instance type are you seeing this on? I haven't been able to reproduce it.

Jun 25 2020, 9:09 PM · Contributor Reviews (base)
lwhsu accepted D18482: Amazon EC2: Disable floppy devices (fdc0, fd0,) and parallel port device (pp0).

@cperciva I think this patch is good, can you check it? Thanks!

Jun 25 2020, 1:28 PM · Contributor Reviews (base)

Feb 15 2020

jhibbits abandoned D7697: Add AER register reporting support via sysctl.

No longer working on this. Someone else can take it up.

Feb 15 2020, 3:49 PM · Contributor Reviews (base), PCI

Dec 25 2019

zarychtam_plan-b.pwste.edu.pl added a comment to D16698: First draft HID over I2C support (Mouse only).

I don't know if comments to this review are still relevant, but I'd like to report that this driver built on recent 12.1-STABLE can work fine after resume. To enable suspend/resume support the module acpi_iichid has to be unloaded and loaded again which can be done for instance with the help of rc.{suspend,resume} scripts.

Dec 25 2019, 2:41 AM · Contributor Reviews (base)

Dec 18 2019

lwhsu added a member for Contributor Reviews (base): lwhsu.
Dec 18 2019, 11:25 PM

Oct 7 2019

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

Thanks for the remarks. I'd suggest to stop riding a dead horse and make the switch altogether.

This driver still has some advantages over mine. It supports 12.0-release, sysmouse(8) protocol and it does not require ig4 patching. So, I would prefer it for non-HID trackpads like some Synaptics models. Al least for now.

Oct 7 2019, 7:11 PM · Contributor Reviews (base)
marc.priggemeyer_gmail.com added a comment to D16698: First draft HID over I2C support (Mouse only).

Thanks for the remarks. I'd suggest to stop riding a dead horse and make the switch altogether. It has been pointed out previously that the separation of ACPI and HID over I2C code like it was done here, especially the interrupt handling, was ill-conceived.
Abstraction of HID code was initially considered, but not implemented on my part. Since wulf has already done these things and even has the multitouch part working, switching over is the most sensible thing. This code here was intended to be a first draft and has served its purpose.

Oct 7 2019, 6:16 PM · Contributor Reviews (base)
imp added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#478767, @imp wrote:

So with the suggested changes, I'm not able to get very far with the patches in this review. With wulf's code I'm able to get the device probed. With this code, I see the following

Is this code still really considered? wulf's repo is currently actively developed (now even includes the long-awaited and very necessary "HID bus" abstraction), this was last updated in August.

data point: I'm using wulf's code on my Pixelbook, multi-touch works great for both the touchpad and touchscreen.

Oct 7 2019, 5:26 PM · Contributor Reviews (base)
greg_unrelenting.technology added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#478767, @imp wrote:

So with the suggested changes, I'm not able to get very far with the patches in this review. With wulf's code I'm able to get the device probed. With this code, I see the following

Oct 7 2019, 2:05 PM · Contributor Reviews (base)
imp added a comment to D16698: First draft HID over I2C support (Mouse only).

So with the suggested changes, I'm not able to get very far with the patches in this review. With wulf's code I'm able to get the device probed. With this code, I see the following:

Oct 7 2019, 1:12 AM · Contributor Reviews (base)
imp added inline comments to D16698: First draft HID over I2C support (Mouse only).
Oct 7 2019, 1:08 AM · Contributor Reviews (base)

Sep 29 2019

rozhuk.im-gmail.com added a comment to D16698: First draft HID over I2C support (Mouse only).

kernel trap 22 with interrupts disabled
panic: spin locks can only use msleep_spin
cpuid = 7 time = 1569790352
KDB: stack backtrace:
#0 0xffffffff805da3fd at kdb_backtrace+0x6d
#1 0xffffffff80594fed at vpanic+0x19d
#2 0xffffffff80594e43 at panic+0x43
#3 0xffffffff8057df32 at unlock_spin+0x12
#4 0xffffffff8053f577 at _cv_wait_sig+0x127
#5 0xffffffff81d1dace at iichid_read+0x8e
#6 0xffffffff804b690a at devfs_read_f+0xda
#7 0xffffffff805f4752 at kern_readv+0x92
#8 0xffffffff805f46b4 at sys_read+0x84
#9 0xffffffff808451d8 at amd64_syscall+0x218
#10 0xffffffff80821270 at fast_syscall_common+0x101

Sep 29 2019, 9:08 PM · Contributor Reviews (base)
wulf added inline comments to D16698: First draft HID over I2C support (Mouse only).
Sep 29 2019, 9:45 AM · Contributor Reviews (base)
wulf added inline comments to D16698: First draft HID over I2C support (Mouse only).
Sep 29 2019, 9:26 AM · Contributor Reviews (base)
wulf added inline comments to D16698: First draft HID over I2C support (Mouse only).
Sep 29 2019, 9:09 AM · Contributor Reviews (base)
rozhuk.im-gmail.com added a comment to D16698: First draft HID over I2C support (Mouse only).

Panic on kldload acpi_iichid in iichid_read()->cv_wait_sig().
FreeBSD 12.1 amd64 @ Asus 505z

Sep 29 2019, 5:04 AM · Contributor Reviews (base)

Aug 25 2019

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

I built this on -current and got an insta-panic when trying to lock a null spin lock in attach...

Aug 25 2019, 5:56 AM · Contributor Reviews (base)
imp added inline comments to D16698: First draft HID over I2C support (Mouse only).
Aug 25 2019, 5:52 AM · Contributor Reviews (base)

Aug 23 2019

wulf added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#464917, @imp wrote:

We really have three problems that we need to solve:

(1) iichid
(2) how to get the acpi stuff to automatically add iichid devices

iichid device is a child of acpi bus also, so it can be rephrased as "how to get the acpi stuff to automatically add acpi device with given CID"

(3) How to cope with resume and resets not being quite right for the ig4.

It is not clear which reset is mentioned:

  1. IG4 controller reset (set designware specific parameters like timing counters and so on)
  2. iicbus reset - FIFO flushing, setting of symbol speed and slave address
  3. I2C hid device reset - performed with special I2C command

If it is mentioned in context of @johalun suspend/resume patch, then most probably it misses iicbus reset as it is performed by ig4 driver in a lazy way at a start of next xfer. sc->slave_valid bool variable should be reset to trigger it and I do not see that in @johalun resume method.

Would we make better progress with we split those three issues up into their own reviews?

Aug 23 2019, 1:01 AM · Contributor Reviews (base)

Aug 22 2019

imp added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#461247, @wulf wrote:

Hi @marc.priggemeyer_gmail.com,

I wrote iicbus(4) extension which performs ACPI-based enumeration of I2C devices connected to a controller. It is not limited to HID devices and fires at iicbus attach stage.

The extension walks through ACPI children of I2C controller and for each device found it:

  1. Creates iicbus child device
  2. Adds I2C address to ivars
  3. Adds ACPI-handle to iicbus-child ivars, so you can evaluate acpi_get_handle(dev); on iicbus child
  4. Copies all newbus resources from corresponding ACPIbus-hosted device to I2Cbus-hosted one.

It effectively makes a copy of existing ACPI device on top of I2C bus.
It should also fix ig4 bug that brokes allocation of interrupts on ig4 children (Only partially tested yet, I have access only to GPIO devices now)

I think using of this extension should eliminate nasty ACPI<->I2C devices interaction that is found in the patch from current review.
iicbus(4) extension support in my driver (for reference): https://github.com/wulf7/iichid/commit/6f5c3d3eb008848ab9d18e1dcf8fd35ca80e517e

Patch could be found here: https://people.freebsd.org/~wulf/acpi_iicbus.patch

Aug 22 2019, 7:06 PM · Contributor Reviews (base)

Aug 12 2019

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

I wrote iicbus(4) extension which performs ACPI-based enumeration of I2C devices connected to a controller. It is not limited to HID devices and fires at iicbus attach stage.

Aug 12 2019, 12:15 AM · Contributor Reviews (base)

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)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

However, loading iichid.ko doesn't go well:

Jul 29 03:00:32 thorium kernel: acpi_iichid0: <HID over I2C (ACPI)> on acpi0
Jul 29 03:00:32 thorium kernel: imt0:   ACPI Hardware ID  : ELAN1200
Jul 29 03:00:32 thorium kernel: imt0:   IICbus addr       : 0x15
Jul 29 03:00:32 thorium kernel: imt0:   HID descriptor reg: 0x01
Jul 29 03:00:32 thorium kernel: imt0: could not retrieve HID descriptor from the device: 3
Jul 29 2019, 1:20 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)
wulf 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

If you mean these lines:

device_printf(sc->dev, "no data received\n");

and

DPRINTF(sc, "%*D\n", actual, sc->ibuf, " ");

then I get just this (a single touch):

Jul 29 02:01:08 thorium kernel: something
Jul 29 02:01:08 thorium syslogd: last message repeated 2 times
Jul 29 02:01:08 thorium kernel: imt0: no data received
Jul 29 02:01:08 thorium kernel: something
Jul 29 02:01:08 thorium syslogd: last message repeated 4 times
Jul 29 02:01:08 thorium kernel: imt0: no data received
Jul 29 02:01:08 thorium syslogd: last message repeated 1 times
Jul 29 02:01:08 thorium kernel: something
Jul 29 02:01:08 thorium syslogd: last message repeated 3 times
Jul 29 02:01:08 thorium kernel: imt0: no data received
Jul 29 02:01:08 thorium kernel: something
Jul 29 02:01:08 thorium syslogd: last message repeated 2 times
Jul 29 02:01:08 thorium kernel: imt0: no data received
Jul 29 02:01:08 thorium syslogd: last message repeated 1 times
Jul 29 02:01:08 thorium kernel: something
Jul 29 02:01:08 thorium syslogd: last message repeated 5 times
Jul 29 02:01:08 thorium kernel: imt0: no data received
Jul 29 02:01:08 thorium kernel: something
Jul 29 02:01:08 thorium syslogd: last message repeated 3 times
Jul 29 02:01:08 thorium kernel: imt0: no data received
Jul 29 2019, 12:16 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

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

Yes, it still prints.

Jul 28 2019, 11:30 PM · Contributor Reviews (base)
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)
wulf 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?

Yes! :) It prints "something".

Jul 28 2019, 10:53 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)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).
In D16698#457847, @wulf wrote:
Jul 28 2019, 10:00 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)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

Here it is.

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

Updated D16698 builds and runs fine on 12-STABLE though it still lacks resume support.

I must admit I wasn't able to test https://github.com/wulf7/iichid. The module didn't work for me:

Jul 28 18:20:49 bsdondell kernel: imt0: IRQ allocation failed. Fallback to sampling.

Jul 28 2019, 7:29 PM · Contributor Reviews (base)
zarychtam_plan-b.pwste.edu.pl added a comment to D16698: First draft HID over I2C support (Mouse only).

Updated D16698 builds and runs fine on 12-STABLE though it still lacks resume support.

Jul 28 2019, 5:05 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)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

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

Jul 28 2019, 9:22 AM · 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)
wulf added a comment to D16698: First draft HID over I2C support (Mouse only).

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

Jul 27 2019, 9:23 AM · 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

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

Sorry, no difference.

I enabled debugging output in imt.c so please:

Jul 22 2019, 10:27 AM · Contributor Reviews (base)
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

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

The only problem -- the device is still dead;

I fixed one bug, so try one more time

it generates nothing with libinput debug-events, and no events in xev.

libinput debug-events is not the right tool to debug evdev. evemu-record from devel/evemu port is better

Jul 21 2019, 11:35 PM · Contributor Reviews (base)
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)
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

Jul 21 2019, 12:56 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

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.

Jul 19 2019, 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)
Jul 19 2019, 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.

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)
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.

Jul 18 2019, 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?

Jul 18 2019, 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.

Jul 18 2019, 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.

Jul 18 2019, 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 :)

Jul 18 2019, 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 :)

Jul 18 2019, 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.

Jul 18 2019, 10:46 AM · 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)
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.
Jul 17 2019, 1:06 AM · 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)
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:

Jul 16 2019, 3:17 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)

Jul 8 2019

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

Jul 8 2019, 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

Jul 8 2019, 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

Jul 8 2019, 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

Jul 8 2019, 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)
Jul 8 2019, 12:51 PM · Contributor Reviews (base)

Jul 7 2019

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?

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

Jul 6 2019

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?

Jul 6 2019, 10:06 PM · Contributor Reviews (base)
marc.priggemeyer_gmail.com updated the diff for D16698: First draft HID over I2C support (Mouse only).
Jul 6 2019, 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?

Jul 6 2019, 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.
Jul 6 2019, 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.

Jul 6 2019, 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.

Jul 6 2019, 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.

Jul 6 2019, 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.

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

Jun 28 2019

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

Jun 27 2019

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.

Jun 27 2019, 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.

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

Jun 26 2019

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.
Jun 26 2019, 8:54 PM · Contributor Reviews (base), arm64
greg_unrelenting.technology updated subscribers of D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Jun 26 2019, 8:52 PM · Contributor Reviews (base), arm64
greg_unrelenting.technology updated the test plan for D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Jun 26 2019, 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).
Jun 26 2019, 8:48 PM · Contributor Reviews (base), arm64
greg_unrelenting.technology created D20775: Add missing ACPI GICv2 MSI/MSI-X attachment.
Jun 26 2019, 8:47 PM · Contributor Reviews (base), arm64

Jun 24 2019

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:

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

Jun 23 2019

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

Jun 23 2019, 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

Jun 23 2019, 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.

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