summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
AgeCommit message (Collapse)Author
2021-11-22Add pcyrtc(4), a driver for the NXP PCF85063A/TP RTC chips.Mark Kettenis
ok patrick@
2021-11-22Remove unused header files and make some cosmetic changes.Mark Kettenis
ok patrick@
2021-10-26Improve unhibernate performance (30% on some machines, another upcoming diffTheo de Raadt
shows gains up to 50%) by skipping attach of irrelevant devices, which are tagged CD_SKIPHIBERNATE in the per-driver cfdriver. In particular, usb devices are not attached, so they don't need to detach during the suspend-unpack-resume. New bootblocks are required (which tell the kernel it's job is unhibernate before configure runs) tested by various
2021-08-26Request wMaxInputLength bytes of data on each interrupt which shouldJoshua Stein
already account for the two-byte length and one-byte report id, rather than adding them ourself and requesting wMaxInputLength + 3. Fixes dwiic timeouts requesting data from at least one touchpad. Tested by various
2021-06-23Add titmp(4), a driver for the TI TMP451 temperature sensor.Mark Kettenis
ok deraadt@
2021-04-24Remove unused function pointers from `todr_handle'.Martin Pieuchot
from miod@
2021-01-22ims: an actual i2c-connected mouse is unlikelyJoshua Stein
Claim to be a touchpad instead, which sets up ims devices in X11 to be more like touchpads. ok mglocker
2021-01-13Add support for the HYM8563 RTC, which is a PCF8563 clone.Mark Kettenis
ok kurt@
2020-11-14Extend pcamux(4) with ACPI support. So far pcamux(4) has assumed it'sPatrick Wildt
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@
2020-11-13Add support for the PCA9547 I2C mux to pcamux(4). In comparison toPatrick Wildt
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@
2020-10-23Add support for the Micro Crystal RV4162. This variant holds thePatrick Wildt
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@
2020-09-30Move mfokclock(4) from loongson to sys/dev/i2c so that it be used by morePatrick Wildt
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@
2020-09-29Add support for the PCA9546 I2C switch to pcamux(4). In comparison toPatrick Wildt
PCA9548, this variant supports only 4 instead of 8 channels. ok kettenis@
2020-09-29The pcamux(4) device tree node's children are the individual channels,Patrick Wildt
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@
2020-08-26Declare hw_{prod,serial,uuid,vendor,ver} in <sys/systm.h>.Visa Hankala
OK deraadt@, mpi@
2020-07-09On some laptops that have a Windows Precision Touchpad (imt) andJoshua Stein
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.
2020-06-18Add pcamux(4), a driver for the PCA8548 I2C switch.Mark Kettenis
ok patrick@
2020-04-29Enable the trickle charger after setting the control register.Patrick Wildt
2020-04-29Update the trickle charger diode defines based on the datasheet, andPatrick Wildt
enable the trickle charger.
2020-04-29Writing and reading time has been broken in abcrtc(4) as well. I wasPatrick Wildt
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@
2020-04-29Configure abcrtc(4)'s trickle charger. This uses informationPatrick Wildt
from the device tree to configures the RTC to be able to charge a connected battery or capacitor. ok kettenis@
2020-04-29The function to write to abcrtc(4)'s configuration registersPatrick Wildt
unfortunately did not write the data to the register, but the register offset. Oops. ok kettenis@
2020-04-27Attach when the name matches "dallas,ds1307" which is what the device treeMark Kettenis
binding uses. Remove warning about overwriting todr_handle since that is normal behaviour on arm64 systems. ok sthen@
2020-04-27Don't clear OSF flag when we attach such that we can reject the RTC clockMark Kettenis
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@
2020-04-25Add dsxrtc(4), a driver for the Maxim DS3231/DS3232 I2C RTC.Mark Kettenis
ok deraadt@
2020-04-24Remove unused include.Mark Kettenis
2020-04-24Remove unused struct.Mark Kettenis
2020-01-24ihidev(4): tsleep(9) -> tsleep_nsec(9); ok mpi@ jcs@cheloha
2020-01-11Use block mode for smbus access as required by the IPMI standard andMark Kettenis
implement multi-block transfers. ok claudio@
2020-01-11Add constants to support block mode. Needed to support SMBus block readMark Kettenis
and write. ok claudio@
2020-01-09Convert sleeps of 1sec or more to tsleep_nsec(9).Martin Pieuchot
ok bluhm@
2019-12-16Extend the expected SPD types to include DDR4 and low-power DDR3 & 4.Claudio Jeker
OK deraadt@ kettenis@
2019-10-06Fix month mask.Mark Kettenis
ok deraadt@, patrick@
2019-09-06mcprtc(4), a driver for the Microchip MCP79400 RTC and similar variants.Patrick Wildt
ok kettenis@
2019-09-03Avoid uninitialized variable; using a for loop like in siif_recvmsg() wasMark Kettenis
what I had intended to write anyway. spotted-by & ok jsg@
2019-08-19Add support for SMBus System Interface (SSIF).Mark Kettenis
ok jmatthew@
2019-07-31ihidev: continue doing polling when interrupt setup failsJoshua Stein
2019-07-22Even when polling is requested, install ihidev's interrupt handlerJoshua Stein
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.
2019-04-08change psize to a signed int to cope with it going negative sinceJoshua Stein
the data read during polling may be junk fixed with Petr Ročkai ok deraadt, mpi, stsp
2019-01-02abcrtc(4), a driver for the Abracon AB1805 RTC and similar variants.Patrick Wildt
ok kettenis@
2018-09-20fix a memory leak in ihidev_hid_command()Jonathan Gray
ok claudio@
2018-09-01Match on interfaces with Digitizers/Touchscreen collections, as longJoshua Stein
as they have an X usage. Should get basic touchscreen functionality on some common HID-over-i2c devices like laptops.
2018-08-25Add umt(4) for USB Windows Precision Touchpad devicesJoshua Stein
Based on imt(4) Rename HIDMT_INPUT_MODE_MT to HIDMT_INPUT_MODE_MT_TOUCHPAD ok deraadt
2018-08-25Move HID->bus constant conversion for HID report types out of ihidevJoshua Stein
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
2018-07-30define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stopJoshua Stein
claiming to be elantech devices
2018-07-09Strip down the (not enabled) pcagpio(4) GPIO extender. This removesPatrick Wildt
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@
2018-06-22set I2C_F_POLL when acquiring the iic bus in an interrupt handlerJoshua Stein
found by witness, reported and tested by bentley
2018-04-07Add islrtc(4), a driver for the Intersil ISL1208 Real Time Clock.Mark Kettenis
2018-01-12revert previous changes to enable dwiic on Dell precision as it seemsMike Larkin
to cause issues on Dell XPS 15 9560. Will investigate and recommit later if a better fix can be found.
2018-01-08Attach dwiic_pci on Dell Precision 7520. Also restrict ihidev reportsMike Larkin
to those of 3 bytes or more (as per the hid-over-i2c spec). discussed with jcs, kettenis