Home | History | Annotate | Download | only in i2c
History log of /src/sys/dev/i2c/ihidev.h
RevisionDateAuthorComments
 1.8  17-Sep-2025  thorpej This driver only works with ACPI. Rather than consult i2c_attach_args::
ia_cookietype, consult self's devhandle and check for DEVHANDLE_TYPE_ACPI.
Use the devhandle to get the ACPI handle where necessary, so it is no longer
necessary to store the ACPI handle in a softc field called "sc_phandle"
(which is not an accurate name).
 1.7  08-Dec-2024  jmcneill ihidev: Add support for GPIO interrupts.
 1.6  14-Jan-2022  riastradh branches: 1.6.10;
ihidev(4): Fix locking and interrupt handler.

- Can't run iic_exec in softint because it does cv_wait, at least on
some i2c controllers -- defer to workqueue instead.

- Fix violations of locking rules:
. Do not take a lock at higher IPL than it is defined at!
. Do not sleep under a lock!
. Definitely do not sleep under a spin lock!
In this case, sc_intr_lock was defined at IPL_VM but used at IPL_TTY,
and i2c transactions -- possibly causing sleep for cv_wait -- were
issued under it.

But in this case, the interrupt handler needs only a single bit to
mark whether the work is pending, so just use atomic_swap for that.

- Use an adaptive lock (IPL_NONE) for i2c transactions.

- Detach children, and do so before freeing anything.
 1.5  14-Jan-2022  riastradh ihidev(4): Add missing includes and header guard.

Mark the sections that are conventionally separate files for hardware
interface (*reg.h) versus software state (*var.h).
 1.4  09-Jan-2020  thorpej branches: 1.4.10; 1.4.20;
Re-enable the intr / mask / softint / unmask dance now that the x86
interrupt issue is fixed. Verified working by ryoon@ (thanks!).
 1.3  25-Dec-2019  thorpej branches: 1.3.2;
Revert previous until issues can be sorted out.
 1.2  22-Dec-2019  thorpej The hid-over-i2c spec specifies that compliant devices use level-sensitive
interrupts. However, it's not safe to do i2c bus access in hard interrupt
context, and we must read the event data off the device in order to clear
the interrupt condition.

Address this by using acpi_intr_mask() to mask off the interrupt source
while a softint is pending to service the events, re-enabling it once
servicing is completed.

While here, re-factor the interrupt setup / tear-down code a bit to
eventually once day simplify supporting the FDT bindings for hid-over-i2c.
 1.1  10-Dec-2017  bouyer branches: 1.1.4;
Add drivers for HID over I2C devices, and a driver for I2C mices.
From OpenBSD.
 1.1.4.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.2.1  17-Jan-2020  ad Sync with head.
 1.4.20.1  09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.4.10.1  08-May-2021  thorpej Rather than using the "cookie" from the i2c_attach_args, use the
device handle that's already associated with our device_t.
 1.6.10.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed