Date: Wed, 23 Dec 2020 08:11:56 GMT From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a223aa8abd6d - cyapa(4): Make button detection matching ChromeOS driver Message-ID: <202012230811.0BN8Bu22054524@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a223aa8abd6d1bf9547262c9a52333bcf4d0d13a commit a223aa8abd6d1bf9547262c9a52333bcf4d0d13a Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2020-12-21 15:24:09 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2020-12-23 08:09:25 +0000 cyapa(4): Make button detection matching ChromeOS driver Tested-by: Matthias Apitz <guru@unixarea.de> MFC-after: 2 weeks --- sys/dev/cyapa/cyapa.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/cyapa/cyapa.c b/sys/dev/cyapa/cyapa.c index 293d68e9abdc..644d59ae095f 100644 --- a/sys/dev/cyapa/cyapa.c +++ b/sys/dev/cyapa/cyapa.c @@ -536,13 +536,14 @@ cyapa_attach(device_t dev) cap.phy_siz_x_low; sc->cap_phyy = ((cap.phy_siz_xy_high << 8) & 0x0F00) | cap.phy_siz_y_low; - sc->cap_buttons = cap.buttons; + sc->cap_buttons = cap.buttons >> 3 & + (CYAPA_FNGR_LEFT | CYAPA_FNGR_RIGHT | CYAPA_FNGR_MIDDLE); device_printf(dev, "%5.5s-%6.6s-%2.2s buttons=%c%c%c res=%dx%d\n", cap.prod_ida, cap.prod_idb, cap.prod_idc, - ((cap.buttons & CYAPA_FNGR_LEFT) ? 'L' : '-'), - ((cap.buttons & CYAPA_FNGR_MIDDLE) ? 'M' : '-'), - ((cap.buttons & CYAPA_FNGR_RIGHT) ? 'R' : '-'), + ((sc->cap_buttons & CYAPA_FNGR_LEFT) ? 'L' : '-'), + ((sc->cap_buttons & CYAPA_FNGR_MIDDLE) ? 'M' : '-'), + ((sc->cap_buttons & CYAPA_FNGR_RIGHT) ? 'R' : '-'), sc->cap_resx, sc->cap_resy); sc->hw.buttons = 5;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012230811.0BN8Bu22054524>