History log of /src/sys/dev/i2c/tcakp.c |
Revision | | Date | Author | Comments |
1.18 |
| 17-Sep-2025 |
thorpej | These drivers conditionally support FDT (with an #ifdef). Rather than blindly assume that i2c_attach_args::ia_cookie is an FDT phandle, consult self's devhandle and, if the type is DEVHANDLE_TYPE_OF, exctract the phandle from there.
XXX These drivers should probably become FDT-only (like many others already are) because the functionality is questionable without information from the device tree.
|
1.17 |
| 07-Aug-2021 |
thorpej | branches: 1.17.2; Merge thorpej-cfargs2.
|
1.16 |
| 24-Apr-2021 |
thorpej | branches: 1.16.2; 1.16.8; Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments.
Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.)
Remove unnecessary or redundant interface attributes where they're not needed.
There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)
...and a sentinel value CFARG_EOL.
Add some extra sanity checking to ensure that interface attributes aren't ambiguous.
Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
|
1.15 |
| 27-Jan-2021 |
thorpej | branches: 1.15.2; Use DEVICE_COMPAT_EOL.
|
1.14 |
| 25-Jan-2021 |
thorpej | Since we're using designated initialisers for compat data, we should use a completely empty initializer for the sentinel.
|
1.13 |
| 17-Jan-2021 |
thorpej | Use designated initializers and a consistent termination style in compat_data[].
|
1.12 |
| 16-Dec-2020 |
christos | interupt -> interrupt
|
1.11 |
| 23-Dec-2019 |
thorpej | branches: 1.11.8; - Don't use I2C_F_POLL. - Don't access the i2c from hard interrupt context. Instead, schedule a soft interrupt to do the real work. (No need to mask the interrupt source, since this device has an edge-sensitive interrupt per the DT info; will need to be revisited if there's ever a flavor that uses a level-sensitive interrupt). - Split out the i2c bus acquire / release from the register read / write functions, allowing us to batch several i2c transactions under a single acquire / release cycle.
|
1.10 |
| 17-Oct-2018 |
jmcneill | lock/unlock I2C bus around transfers as required by API
|
1.9 |
| 26-Jun-2018 |
thorpej | branches: 1.9.2; In my quest to make device_compatible_entry (and associated goo) super-general, it turns out I also made it a little to cumbersome to use (if my tired fingers are any indication). So, this is a course-correction -- one string per entry (like of_compat_data, which it will soon replace), and remove the over-verbose macros.
|
1.8 |
| 18-Jun-2018 |
thorpej | - Rename iic_compat_match() to iic_compatible_match() and change it to use the new device_compatible_match() routine. A pointer to the matching device_compatible_entry is returned if a match is found. - Adjust iic_use_direct_match() accordingly. - i2c drivers now provide device_compatible_entry tables when performing direct-config matching. - In the dsrtc driver, take advantage of this new capability to greatly simplify model selection.
(I'm coming for you next, of_compat_data...)
|
1.7 |
| 16-Jun-2018 |
thorpej | More cleanup to i2c autoconfiguration:
- Get all of the drivers onto the new match quality constants. - Introduce a new helper function, iic_use_direct_match(), that has all of the logic for direct-config matching. If it returns true, the driver returns the match result (which may be 0). If it returns false, the driver does indirect-config matching. - iic_compat_match() now returns a weighted match quality; matches to lower-indexed "compatible" device property are more-specific matches, and return a better match quality accordingly.
|
1.6 |
| 30-Apr-2018 |
jmcneill | tcakp_match: filter on ia_addr for indirect config (device is expected at 0x34)
|
1.5 |
| 10-Dec-2017 |
bouyer | branches: 1.5.2; Factor out bus-independant HID code so that it can be shared by USB, bluetooth and i2c. dev/usb/ukbdmap.c is renamed to dev/hid/hidkbdmap.c dev/usb/hid.[ch] moved to dev/hid/ usage pages moved from dev/usb/usbhid.h moved to dev/hid/hid.h, and updated with OpenBSD entries. bus-independant code moved from dev/usb/ums.c to dev/hid/hidms.c (the same should be done for keyboard and touchpad drivers)
Needed for the upcoming HID over I2C support, proposed on tech-kern@ on Dec, 1.
|
1.4 |
| 31-Aug-2017 |
jmcneill | branches: 1.4.2; Instead of a Linux keymap, convert Linux event codes to USB scan codes and use the ukbd keymaps instead.
|
1.3 |
| 30-Aug-2017 |
jmcneill | Use linux_keymap instead of pckbd keymap
|
1.2 |
| 26-Aug-2017 |
jmcneill | wscons is not mpsafe, so take kernel lock for intr handler
|
1.1 |
| 26-Aug-2017 |
jmcneill | Add driver for Texas Instruments TCA8418 I2C Controller Keypad Scan IC.
|
1.4.2.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.4.2.1 |
| 31-Aug-2017 |
jdolecek | file tcakp.c was added on branch tls-maxphys on 2017-12-03 11:37:02 +0000
|
1.5.2.4 |
| 20-Oct-2018 |
pgoyette | Sync with head
|
1.5.2.3 |
| 28-Jul-2018 |
pgoyette | Sync with HEAD
|
1.5.2.2 |
| 25-Jun-2018 |
pgoyette | Sync with HEAD
|
1.5.2.1 |
| 02-May-2018 |
pgoyette | Synch with HEAD
|
1.9.2.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.9.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.11.8.2 |
| 03-Apr-2021 |
thorpej | Sync with HEAD.
|
1.11.8.1 |
| 03-Jan-2021 |
thorpej | Sync w/ HEAD.
|
1.15.2.1 |
| 23-Mar-2021 |
thorpej | Convert config_found_ia() call sites where the device only carries a single interface attribute to bare config_found() calls.
|
1.16.8.1 |
| 04-Aug-2021 |
thorpej | Adapt to CFARGS().
|
1.16.2.1 |
| 08-May-2021 |
thorpej | ia->ia_cookie -> devhandle_to_of(device_handle(self))
|
1.17.2.1 |
| 09-Aug-2021 |
thorpej | Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2, which is based on a newer HEAD revision.
|