summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ims: an actual i2c-connected mouse is unlikelyjcs2021-01-221-3/+2
| | | | | | | Claim to be a touchpad instead, which sets up ims devices in X11 to be more like touchpads. ok mglocker
* Add support for the HYM8563 RTC, which is a PCF8563 clone.kettenis2021-01-131-5/+3
| | | | ok kurt@
* Extend pcamux(4) with ACPI support. So far pcamux(4) has assumed it'spatrick2020-11-141-5/+189
| | | | | | | | | | always matched on an FDT-capable device, but the HoneyComb LX2K seems to have a PCA9547 and provides it as NXP0002 HID. This means we know if it's ACPI or FDT based on the name passed. This is required to be able to make two acpitz(4) nodes work, since the thermel sensors are behind the mux. ok kettenis@
* Add support for the PCA9547 I2C mux to pcamux(4). In comparison topatrick2020-11-131-7/+21
| | | | | | | | the PCA954[68], this is a mux instead of a switch and can only have one active channel at a time. On the bright side, we treat switches like a mux, so only the bits have to be set a little bit differently. ok kettenis@
* Add support for the Micro Crystal RV4162. This variant holds thepatrick2020-10-231-3/+5
| | | | | | | | square wave frequency control bits in the Day Of Week register. To make sure we don't fudge with those bits, only reset those that hold the day and keep the rest as is. ok kettenis@
* Move mfokclock(4) from loongson to sys/dev/i2c so that it be used by morepatrick2020-09-302-1/+159
| | | | | | | | | | | platforms than just loongson. Rename it to mfokrtc(4) for consistency with other RTC drivers. Make it match on st,m41t83, since that was the chip for which the driver was written for. More compatible strings can be added for each chip of the series verified to behave the same. Discussed with kettenis@ Compile tested on loongson by kn@ Tested on loongson by and ok visa@
* Add support for the PCA9546 I2C switch to pcamux(4). In comparison topatrick2020-09-291-5/+14
| | | | | | PCA9548, this variant supports only 4 instead of 8 channels. ok kettenis@
* The pcamux(4) device tree node's children are the individual channels,patrick2020-09-291-2/+4
| | | | | | | | which we each treat as an I2C bus. While scanning these, we need to use each channel's node as starting point instead of the pcamux(4) node. This fixes finding and attaching devices connected to these channels. ok kettenis@
* Declare hw_{prod,serial,uuid,vendor,ver} in <sys/systm.h>.visa2020-08-261-4/+1
| | | | OK deraadt@, mpi@
* On some laptops that have a Windows Precision Touchpad (imt) andjcs2020-07-093-13/+26
| | | | | | | | | | | also a trackstick or separate physical buttons, imt was claiming all report ids of the ihidev device preventing the trackstick/buttons from attaching as a separate ims device on other report ids. Just claim the report ids that imt needs and let ims attach to others it may find. Fixes two Dell Latitude laptops and tested in snaps for a bit.
* Add pcamux(4), a driver for the PCA8548 I2C switch.kettenis2020-06-182-1/+235
| | | | ok patrick@
* Enable the trickle charger after setting the control register.patrick2020-04-291-5/+5
|
* Update the trickle charger diode defines based on the datasheet, andpatrick2020-04-291-3/+4
| | | | enable the trickle charger.
* Writing and reading time has been broken in abcrtc(4) as well. I waspatrick2020-04-291-19/+18
| | | | | | | | | | being too clever trying to use the SMBus block reads/writes. Instead the registers were written with an offset: Seconds were stored in the minutes, minutes were stored in the hours. No wonder time was ticking so slowly. Removing the bogus length field and simply writing/reading the time register values is enough. ok kettenis@
* Configure abcrtc(4)'s trickle charger. This uses informationpatrick2020-04-291-1/+63
| | | | | | | from the device tree to configures the RTC to be able to charge a connected battery or capacitor. ok kettenis@
* The function to write to abcrtc(4)'s configuration registerspatrick2020-04-291-2/+2
| | | | | | | unfortunately did not write the data to the register, but the register offset. Oops. ok kettenis@
* Attach when the name matches "dallas,ds1307" which is what the device treekettenis2020-04-271-8/+3
| | | | | | | binding uses. Remove warning about overwriting todr_handle since that is normal behaviour on arm64 systems. ok sthen@
* Don't clear OSF flag when we attach such that we can reject the RTC clockkettenis2020-04-271-9/+10
| | | | | | | | time if the flag is set. Instead clear the flag when we set the time. This way we don't use the clock time if the oscillator has been interrupted. This happens for example when the battery is dead. ok sthen@
* Add dsxrtc(4), a driver for the Maxim DS3231/DS3232 I2C RTC.kettenis2020-04-252-1/+254
| | | | ok deraadt@
* Remove unused include.kettenis2020-04-241-2/+1
|
* Remove unused struct.kettenis2020-04-241-7/+1
|
* ihidev(4): tsleep(9) -> tsleep_nsec(9); ok mpi@ jcs@cheloha2020-01-241-10/+3
|
* Use block mode for smbus access as required by the IPMI standard andkettenis2020-01-111-13/+57
| | | | | | implement multi-block transfers. ok claudio@
* Add constants to support block mode. Needed to support SMBus block readkettenis2020-01-111-9/+17
| | | | | | and write. ok claudio@
* Convert sleeps of 1sec or more to tsleep_nsec(9).mpi2020-01-091-2/+3
| | | | ok bluhm@
* Extend the expected SPD types to include DDR4 and low-power DDR3 & 4.claudio2019-12-161-2/+2
| | | | OK deraadt@ kettenis@
* Fix month mask.kettenis2019-10-061-2/+2
| | | | ok deraadt@, patrick@
* mcprtc(4), a driver for the Microchip MCP79400 RTC and similar variants.patrick2019-09-062-1/+280
| | | | ok kettenis@
* Avoid uninitialized variable; using a for loop like in siif_recvmsg() waskettenis2019-09-031-4/+4
| | | | | | what I had intended to write anyway. spotted-by & ok jsg@
* Add support for SMBus System Interface (SSIF).kettenis2019-08-192-1/+230
| | | | ok jmatthew@
* ihidev: continue doing polling when interrupt setup failsjcs2019-07-311-2/+2
|
* Even when polling is requested, install ihidev's interrupt handlerjcs2019-07-223-9/+67
| | | | | | | | If an interrupt is received, turn off polling and rely on interrupts. This may happen after S3 resume. Also properly shut down polling during suspend and start it up again on resume only after dwiic is back in action.
* change psize to a signed int to cope with it going negative sincejcs2019-04-081-4/+3
| | | | | | | the data read during polling may be junk fixed with Petr Ročkai ok deraadt, mpi, stsp
* abcrtc(4), a driver for the Abracon AB1805 RTC and similar variants.patrick2019-01-022-1/+266
| | | | ok kettenis@
* fix a memory leak in ihidev_hid_command()jsg2018-09-201-1/+2
| | | | ok claudio@
* Match on interfaces with Digitizers/Touchscreen collections, as longjcs2018-09-011-1/+7
| | | | | | | as they have an X usage. Should get basic touchscreen functionality on some common HID-over-i2c devices like laptops.
* Add umt(4) for USB Windows Precision Touchpad devicesjcs2018-08-251-2/+2
| | | | | | | | Based on imt(4) Rename HIDMT_INPUT_MODE_MT to HIDMT_INPUT_MODE_MT_TOUCHPAD ok deraadt
* Move HID->bus constant conversion for HID report types out of ihidevjcs2018-08-253-14/+7
| | | | | | | | | | | | | | | | | | | | | into hidmt. The HID code uses hid_feature, hid_input, and hid_output constants to refer to report types internally that then need to be converted to their bus-level counterparts before actually getting sent out (so hid_feature becomes UHID_FEATURE_REPORT for USB, I2C_HID_REPORT_TYPE_FEATURE for i2c). This conversion was hard-coded in ihidev but ihidev_[gs]et_report should assume the type passed is already an i2c-level define, not a hid one. This is how uhidev does it. Add a conversion routine callback that any hidmt callers need to set so that hidmt can convert hid constants to the bus-level versions. Also add a similar conversion function to uhidev. ok deraadt
* define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stopjcs2018-07-301-7/+6
| | | | claiming to be elantech devices
* Strip down the (not enabled) pcagpio(4) GPIO extender. This removespatrick2018-07-092-165/+79
| | | | | | | | | the sensors code and user-controllable GPIO bus attachment but at the same time hooks pcagpio(4) into the OFW GPIO framework so that it can be used by other device tree based drivers. Discussed with deraadt@ ok kettenis@
* set I2C_F_POLL when acquiring the iic bus in an interrupt handlerjcs2018-06-221-3/+3
| | | | found by witness, reported and tested by bentley
* Add islrtc(4), a driver for the Intersil ISL1208 Real Time Clock.kettenis2018-04-072-1/+267
|
* revert previous changes to enable dwiic on Dell precision as it seemsmlarkin2018-01-121-2/+2
| | | | | to cause issues on Dell XPS 15 9560. Will investigate and recommit later if a better fix can be found.
* Attach dwiic_pci on Dell Precision 7520. Also restrict ihidev reportsmlarkin2018-01-081-2/+2
| | | | | | to those of 3 bytes or more (as per the hid-over-i2c spec). discussed with jcs, kettenis
* Add bgw(4), a driver for a family of Bosch acceleration sensors.kettenis2017-11-302-1/+200
| | | | ok deraadt@, mlarkin@
* add an adaptive polling mode when no interrupt handler is available,jcs2017-11-292-33/+108
| | | | | | | | | such as on PCI dwiic(4) devices. this is a temporary workaround until the underlying interrupt problem is fixed. tested by various
* Add the compat-mode setup for wsmouse.bru2017-10-281-6/+27
|
* pcxrtc(4), a driver for the NXP PCF8563 RTC.kettenis2017-07-242-1/+292
| | | | ok deraadt@
* this is imt, not imsjcs2017-07-231-7/+7
|
* A pile of sizes to free(9). In test for a few days in snapshots.deraadt2017-04-081-2/+2
| | | | | Errors will result in nice clean panic messages so we know what's wrong. Reviewed by dhill visa natano jsg.