Commit graph

13 commits

Author SHA1 Message Date
Warner Losh 685dc743dc sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:36 -06:00
Warner Losh 95ee2897e9 sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:11 -06:00
John Baldwin ccc221b9a2 cyapa: Remove unused devclass argument to DRIVER_MODULE. 2022-05-09 12:22:02 -07:00
Warner Losh 3ca3bb576b cyapa_raw_input: elimmminate write only k variable
Sponsored by:		Netflix
2022-04-04 22:29:25 -06:00
Vladimir Kondratyev 4836af0d42 cyapa(4): Adapt to recent evdev KPI changes
MFC after:	2 weeks
2021-09-02 22:35:26 +03:00
Vladimir Kondratyev 5af73ad51b evdev: Remove useless "initial value" parameter from evdev_support_abs()
It can not be used for setting of state of multitouch events.
If necessary, use evdev_push_event() instead of it.
2021-01-08 02:18:41 +03:00
Vladimir Kondratyev 54d2dfc4b2 cyapa(4): Add support for evdev protocol
Tested-by:	Matthias Apitz <guru@unixarea.de>
MFC-after:	2 weeks
2020-12-23 11:10:49 +03:00
Vladimir Kondratyev a223aa8abd cyapa(4): Make button detection matching ChromeOS driver
Tested-by:	Matthias Apitz <guru@unixarea.de>
MFC-after:	2 weeks
2020-12-23 11:09:25 +03:00
Vladimir Kondratyev 6825cefb23 [cyapa] Postpone start of the polling thread until sleep is available
After recent ig4 changes cyapa driver can be attached before timers
initialization is completed. Start polling thread from config_intrhook
to avoid busy loops in that case.
2019-11-03 20:55:28 +00:00
Michael Gmelin 9c52035814 Fix typo in cyapa out of bounds check.
PR:		217783
Submitted by:	razmyslov@viva64.com
MFC after:	1 week
2017-08-08 13:27:32 +00:00
Andriy Gapon 448897d366 add iic interface to ig4 driver, move isl and cyapa to iicbus
Summary:
The hardware does not expose a classic SMBus interface.
Instead it has a lower level interface that can express a far richer
I2C protocol than what smbus offers.  However, the interface does not
provide a way to explicitly generate the I2C stop and start conditions.
It's only possible to request that the stop condition is generated
after transferring the next byte in either direction.  So, at least
one data byte must always be transferred.
Thus, some I2C sequences are impossible to generate, e.g., an equivalent
of smbus quick command (<start>-<slave addr>-<r/w bit>-<stop>).

At the same time isl(4) and cyapa(4) are moved to iicbus and now they use
iicbus_transfer for communication.  Previously they used smbus_trans()
interface that is not defined by the SMBus protocol and was implemented
only by ig4(4).  In fact, that interface was impossible to implement
for the typical SMBus controllers like intpm(4) or ichsmb(4) where
a type of the SMBus command must be programmed.

The plan is to remove smbus_trans() and all its uses.
As an aside, the smbus_trans() method deviates from the standard,
but perhaps backwards, FreeBSD convention of using 8-bit slave
addresses (shifted by 1 bit to the left).  The method expects
7-bit addresses.

There is a user facing consequence of this change.
A user must now provide device hints for isl and cyapa that specify an iicbus to use
and a slave address on it.
On Chromebook hardware where isl and cyapa devices are commonly found
it is also possible to use a new chromebook_platform(4) driver that
automatically configures isl and cyapa devices.  There is no need to
provide the device hints in that case,

Right now smbus(4) driver tries to discover all slaves on the bus.
That is very dangerous.  Fortunately, the probing code uses smbus_trans()
to do its job, so it is really enabled for ig4 only.
The plan is to remove that auto-probing code and smbus_trans().

Tested by:	grembo, Matthias Apitz <guru@unixarea.de> (w/o
		chromebook_platform)
Discussed with:	grembo, imp
Reviewed by:	wblock (docs)
MFC after:	1 month
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D8172
2016-10-30 12:15:33 +00:00
Michael Gmelin 12e413be27 Allow building a kernel with baked in ig4, isl and cyapa drivers.
Also addresses jhb's remarks on D2811 and D3068.

PR:		202059
Differential Revision:	https://reviews.freebsd.org/D3351
Reviewed by:	jhb
Approved by:	jhb
2015-08-19 09:49:29 +00:00
Michael Gmelin 46f07718f7 cyapa(4), driver for the Cypress APA I2C trackpad
Differential Revision:	https://reviews.freebsd.org/D3068
Reviewed by:	kib, wblock
Approved by:	kib
Relnotes:	yes
2015-07-25 18:14:35 +00:00