History log of /freebsd/sys/dev/iicbus/iichid.c (Results 1 – 22 of 22)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 3ddaf820 02-Jan-2025 John Baldwin <jhb@FreeBSD.org>

Use bus_generic_detach instead of device_delete_children in detach

While here, check for errors from bus_generic_detach and move it to
the start of detach if necessary.

Differential Revision: https

Use bus_generic_detach instead of device_delete_children in detach

While here, check for errors from bus_generic_detach and move it to
the start of detach if necessary.

Differential Revision: https://reviews.freebsd.org/D47969

show more ...


# 18250ec6 06-Dec-2024 John Baldwin <jhb@FreeBSD.org>

Replace calls to bus_generic_attach with bus_attach_children

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47675


Revision tags: release/14.2.0
# 018cb11c 08-Nov-2024 Vladimir Kondratyev <wulf@FreeBSD.org>

iichid(4): Do not power down opened device in attach handler

Some iichid(4) child devices, currently hkbd(4) only, opens parent
device in their attach handlers. That breaks internal iichid(4) state

iichid(4): Do not power down opened device in attach handler

Some iichid(4) child devices, currently hkbd(4) only, opens parent
device in their attach handlers. That breaks internal iichid(4) state
leading to rejecting any incoming data on software and hardware levels.

Fix it with adding of extra state check in iichid(4) attach handler.

Reported by: many
Submitted by: trasz (initial version)
PR: 280290
MFC after: 3 days

show more ...


Revision tags: release/13.4.0
# 5b56413d 25-Jul-2024 Warner Losh <imp@FreeBSD.org>

newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY

Sponsored by: Netflix


# 0ac6cc3f 23-Jul-2024 Ed Maste <emaste@FreeBSD.org>

iichid: Soften "Interrupt setup failed" message

Users may interpret the message as a possible hardware error, but the
issue is in fact unimplemented functionality. Reword the message to
avoid imply

iichid: Soften "Interrupt setup failed" message

Users may interpret the message as a possible hardware error, but the
issue is in fact unimplemented functionality. Reword the message to
avoid implying it is an error.

Reviewed by: wulf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46092

show more ...


# 48f5a429 05-Jun-2024 Mark Johnston <markj@FreeBSD.org>

iicbus: Use device_set_descf()

No functional change intended.

MFC after: 1 week


Revision tags: release/14.1.0, release/13.3.0
# 358453ce 27-Dec-2023 Alexander Motin <mav@FreeBSD.org>

iichid(4): Switch taskqueue to "fast"

While "fast" taskqueue may be more expensive due to spinlock use,
when used mainly for timeout tasks it allows to avoid extra context
switches to and from callo

iichid(4): Switch taskqueue to "fast"

While "fast" taskqueue may be more expensive due to spinlock use,
when used mainly for timeout tasks it allows to avoid extra context
switches to and from callout thread, that is even more expensive.

MFC after: 1 month

show more ...


# a8f80c0c 27-Dec-2023 Alexander Motin <mav@FreeBSD.org>

iichid(4): Unify two taskqueue tasks

taskqueue_enqueue_timeout(0) is equivalent to taskqueue_enqueue(),
so no need to create a separate periodic_task and event_task to run
exactly the same handler.

iichid(4): Unify two taskqueue tasks

taskqueue_enqueue_timeout(0) is equivalent to taskqueue_enqueue(),
so no need to create a separate periodic_task and event_task to run
exactly the same handler.

MFC after: 1 month

show more ...


# 68e457df 24-Dec-2023 Alexander Motin <mav@FreeBSD.org>

iichid(4): Restore/increase sampling rate

My previous commit by reducing precision reduced the sampling rate
from 60Hz to 40Hz on idle system. Return it back to 60-80Hz range,
that should be good f

iichid(4): Restore/increase sampling rate

My previous commit by reducing precision reduced the sampling rate
from 60Hz to 40Hz on idle system. Return it back to 60-80Hz range,
that should be good for mouse smoothness on 60Hz displays.

MFC after: 1 months

show more ...


# 8c86b981 23-Dec-2023 Alexander Motin <mav@FreeBSD.org>

iichid(4): Improve idle sampling hysteresis

In sampling mode some devices return same data indefinitely even if
there is nothing to report. Previous idle hysteresis implementation
activated only wh

iichid(4): Improve idle sampling hysteresis

In sampling mode some devices return same data indefinitely even if
there is nothing to report. Previous idle hysteresis implementation
activated only when device returned no data, so some devices ended up
polled at fast rate all the time. This new implementation compares
each new report with the previous, and, if they are identical, after
reaching threshold also drop sampling rate to slow.

On my Dell XPS 13 9310 with iichid(4) touchscreen and touchpad this
reduces idle power consumption by ~0.5W by reducing number of context
switches in the driver from ~4000 to ~700 per second when not touched.

MFC after: 1 month

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4b171281 03-Aug-2023 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: Add child device parameter to HID methods

Some devices like Apple HID-over-SPI may contain more than one report
descriptors necessitating creation of multiple hidbus children.
Add indentificato

hid: Add child device parameter to HID methods

Some devices like Apple HID-over-SPI may contain more than one report
descriptors necessitating creation of multiple hidbus children.
Add indentificator of child devices to distinct them.
No functional changes intended.

Differential Revision: https://reviews.freebsd.org/D41246

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 3a866152 20-Apr-2022 John Baldwin <jhb@FreeBSD.org>

iicbus: Remove unused devclass arguments to DRIVER_MODULE.


# 7fad3ed8 20-Apr-2022 Gordon Bergling <gbe@FreeBSD.org>

iicbus(4): Fix two typos in kernel error messages

- s/occured/occurred/

MFC after:3 days


# 34e051c4 03-Mar-2022 Vladimir Kondratyev <wulf@FreeBSD.org>

iichid(4): Add support for ASUS C300 chromebook.

Some chromebooks e.g. ASUS C300 have no valid _CID and _DSM ACPI
objects required for device identification and HID descriptor address
detection. Add

iichid(4): Add support for ASUS C300 chromebook.

Some chromebooks e.g. ASUS C300 have no valid _CID and _DSM ACPI
objects required for device identification and HID descriptor address
detection. Add quirk to allow required data to be hardcoded in to
driver.

MFC after: 2 month

show more ...


# 6b1da3d2 03-Mar-2022 Vladimir Kondratyev <wulf@FreeBSD.org>

iichid(4): Implement I2CRDWR command in hid_ioctl method

This command is intended to be compatible with I2CRDWR ioctl.
It is required to perform arbitrary I2C transfers by device
drivers which can s

iichid(4): Implement I2CRDWR command in hid_ioctl method

This command is intended to be compatible with I2CRDWR ioctl.
It is required to perform arbitrary I2C transfers by device
drivers which can switch between HID and native non-HID modes.

MFC after: 2 month

show more ...


Revision tags: release/12.3.0
# c508b081 30-Nov-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

iichid(4): Perform acknowledgement of I2C device interrupt after RESET command

in sampling mode to workaround firmware bug.

This fixes reboot or poweroff on frame.work laptops after first touch.

R

iichid(4): Perform acknowledgement of I2C device interrupt after RESET command

in sampling mode to workaround firmware bug.

This fixes reboot or poweroff on frame.work laptops after first touch.

Reported by: many
PR: 259230
MFC after: 1 week
Tested by: kevans, markj

show more ...


# 82626fef 09-Jul-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

iichid(4): Perform bus_teardown_intr/bus_setup_intr to disable interrupts

during suspend/resume cycle. Previously used bus_generic_suspend_intr and
bus_generic_resume_intr may cause interrupt storm

iichid(4): Perform bus_teardown_intr/bus_setup_intr to disable interrupts

during suspend/resume cycle. Previously used bus_generic_suspend_intr and
bus_generic_resume_intr may cause interrupt storm because of missed
interrupt acknowledges caused by blocking of intr handler.

Reported by: J.R. Oldroyd <jr_AT_opal_DOT_com>
MFC after: 1 week

show more ...


# 5236888d 31-May-2021 J.R. Oldroyd <jr@opal.com>

iichid(4): disable interrupt on suspend

Commit message of the identical change in Linux driver says:
"When an I2C HID device is powered off during system sleep, as a result
of removing its power res

iichid(4): disable interrupt on suspend

Commit message of the identical change in Linux driver says:
"When an I2C HID device is powered off during system sleep, as a result
of removing its power resources (by the ACPI core) the interrupt line
might go low as well. This results inadvertent interrupts."

This change fixes suspend/resume on Asus S510UQ laptops.

While here add a couple of typo fixes as well as a slight change to the
iichid_attach() code to have the power_on flag set properly.

Submitted by: J.R. Oldroyd <jr_AT_opal_DOT_com>
Reviewed by: wulf
MFC after: 1 week

show more ...


# 9aa0e5af 28-May-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

usbhid(4): Add second set of USB transfers to work in polled mode.

The second set of USB transfer is requested by hkbd(4) and
should improve HID keyboard handling in kdb and panic contexts.

MFC aft

usbhid(4): Add second set of USB transfers to work in polled mode.

The second set of USB transfer is requested by hkbd(4) and
should improve HID keyboard handling in kdb and panic contexts.

MFC after: 1 week
Reviewed by: hselasky
Differential revision: https://reviews.freebsd.org/D30486

show more ...


Revision tags: release/13.0.0
# 8ffcde25 09-Jan-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: fix extraneous SYSCTL_ADD_INT() options revealed by LINT build

Reviewed by: hselasky (as part of D28060)


Revision tags: release/12.2.0
# b1f1b07f 06-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

hid: Import iichid - I2C transport backend for HID subsystem

This implements hid_if.m methods for HID-over-I2C protocol [1].

Following kernel options are added:

IICHID_SAMPLING - Enable support fo

hid: Import iichid - I2C transport backend for HID subsystem

This implements hid_if.m methods for HID-over-I2C protocol [1].

Following kernel options are added:

IICHID_SAMPLING - Enable support for a sampling mode as interrupt
resource acquisition is not always possible in a case
of GPIO interrupts.
IICHID_DEBUG - Enable debug output.

The module is based on prior Marc Priggemeyer work (D16698).

[1] http://download.microsoft.com/download/7/d/d/7dd44bb7-2a7a-4505-ac1c-7227d3d96d5b/hid-over-i2c-protocol-spec-v1-0.docx

Differential revision: https://reviews.freebsd.org/D27892

show more ...