Le mer. 5 juil. 2023, 18:02, joshua stein <j...@jcs.org> a écrit : > > few commands from HID but is largely incompatible as reports are > different > > and report descriptors are missing. > > Some minor comments inline. It also needs a man page. > Fixed and added manpage.
> > > > > > +/* $OpenBSD: elantp.c,v 1.28 2023/07/04 15:14:01 kettenis Exp $ */ > > +/* > > + * elan-i2c driver > > Is there a URL to a document somewhere where any of this protocol > info comes from? > Added the link > > > > + > > +#define SLOW_POLL_MS 200 > > +#define FAST_POLL_MS 10 > > All polling code should probably be removed. Polling was only added > to ihidev as a workaround for an issue with our ACPI code which was > failing to enable interrupts properly, but has since been fixed. > Removed > > > > + > > +const struct wsmouse_accessops ietp_mouse_access = { > > + ietp_enable, > > There's spaces there instead of a tab. > Fixed > > > + > > + sc->sc_buttons = 0; > > + sc->sc_enabled = 1; > > + > > + uint16_t buf, reg; > > + uint8_t *buf8; > > + uint8_t pattern; > > Variable declarations need to go at the top of the function. > Done here and in other places > > > + > > + printf("%s:[%d:%d] %s\n", sc->sc_dev.dv_xname, > > + sc->max_x, sc->max_y, > > + sc->is_clickpad ? "clickpad" : "touchpad"); > > Is the x/y info actually needed? If so, add a space between the > device name and info, and probably remove the brackets. > Removed brackets and downgraded to DPRINTF > > > > > > + switch (cmd) { > > + case WSMOUSEIO_GTYPE: { > > + *(u_int *)data = WSMOUSE_TYPE_TOUCHPAD; > > + break; > > + } > > + > > Those brackets aren't needed. > Removed > > > > + * HID-over-i2c driver > > That needs to be changed to reflect what this is actually for. > Fixed