summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
AgeCommit message (Collapse)Author
2021-12-07A driver and user land utility for the Sparkfun Serial Controlled Motorbrad
Driver module as illustrated here: https://www.sparkfun.com/products/13911 A SCMD module is a ARM SOC simular to a Arduino in front of a motor driver chip. The single SCMD module can control two motors and up to 16 additional modules can be chained together using an internal I2C bus. One can interface with the SCMD using tty uart commands, SPI or I2C. The driver in this commit adds a kernel driver for the I2C and SPI interfaces. The command line utility provides a set of convenience commands that support most of the functions of the SCMD and is able to use the tty uart mode, SPI user land or the included kernel driver in a uniform manor. The use of the SCMD module is mostly for small robots and the like, but it can control anything that is controllable by voltage.
2021-12-06Check the return value correctly. Pointed out by pgoyette@.msaitoh
2021-12-06Carefully access to the I2C bus in the match function.msaitoh
2021-12-01Use aprint_debug instead of aprint_error for expected failure.msaitoh
2021-11-30Access byte2...msaitoh
2021-11-14Fix some regressions that were introduced.brad
One must make sure that you release the i2c bus if you acquire. One must not try to release the i2c bus if you failed to acquire it. One can't leave too early from the single-shot refresh without checking the status register as there may have been a reset and releasing the i2c bus.
2021-11-13Brad wants the __did_not_work code back :-)christos
2021-11-12simplify the code and remove unused (it is in CVS anyway). Try to mergechristos
duplicate code. Follow KNF. Brad, please test!
2021-11-12Fix the serial number handling of the HTU21D chip and probably others.brad
Increase the number of read attempts as the HTU21D and probably others do not respond as fast the actual SI70xx chip can.
2021-11-11Some HTU21D chips do not have a heater register and apparently nobrad
heater element. Disable the heater features in the driver when that condition is detected and let the attachment succeed. Also mention that the SHT21 is another clone.
2021-11-10s/acutal/actual/ in comment.msaitoh
2021-11-07cwfg: update for dts-5.15 binding changesjmcneill
2021-11-06Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humiditybrad
sensor such as: https://www.adafruit.com/product/2857 This is a higher priced sensor with a lot of features, including the ability to do sub-second periodic updates. The driver supports everything about the sensor except for the alert pin.
2021-10-29Correct an off by one degree error in the temperature conversion.brad
2021-10-20- fix clang compilation: add "%s" to format stringchristos
- comma is followed by space - KNF multi-line comments - fold long lines - early returns, fixes a missed iic_release_bus() on error. - foo == false -> !foo
2021-10-18Fix llvm build: error: equality comparison with extraneous parentheseschristos
[-Werror,-Wparentheses-equality]
2021-10-14A driver for the Sensirion SGP40 MOx gas sensor. An example of thisbrad
chip from Adafruit is: https://www.adafruit.com/product/4829 This is a moderately priced gas sensor that can detect volatile organic compounds in the air. The driver uses the 3-clause BSD licensed VOC algorithm provided by Sensirion to turn the raw sensor metric into a VOC index which can indicate the quality of the air in a particular indoor environment. All published functions of the chip are supported and one unpublished feature.
2021-10-12fix various typos, mainly in comments.andvar
2021-10-03A driver for the Sensirion SHT40/SHT41/SHT45 temperature and humiditybrad
sensor. An example of this chip is: https://www.adafruit.com/product/4885 This is a lower cost chip that provides higher then usual precision according to the data sheet. This driver supports all of the published functions that the chip has.
2021-08-21fix some more typos in comments/log messages, improve wording as well.andvar
2021-08-09fix various typos in compatibility, mainly in comments.andvar
2021-08-07Merge thorpej-cfargs2.thorpej
2021-08-05ssdfb: revert rev 1.14tnn
Can't run the worker thread MPSAFE with spi(4) yet because most controller drivers still lack MP safety. Cause issues when using multiple displays.
2021-08-03Fix various typos in comments. Also add missing NetBSD RCS Id in some of ↵andvar
these files.
2021-07-30ssdfb(4): remove code for dealing with non-MPSAFE attachmenttnn
spi(4) was marked MPSAFE some time ago, so we're always on an MPSAFE parent device.
2021-07-27move the fcu driver into arch/macppc where it belongsmacallan
2021-07-25don't put CPUs in separate zones, turns out there really isn't much thatmacallan
keeps the airflow apart around them
2021-06-21fix proplib deprecationchristos
2021-06-15iic_acquire_bus may fail.mlelstv
2021-06-15avoid double-freemlelstv
2021-06-14Call sysmon_envsys_destroy() if we receive any error from sysmon, ratherjdc
than just on some errors.
2021-06-14Avoid double free when attach fails.mlelstv
2021-06-13iic_acquire_bus can failmlelstv
2021-06-13Clear sc_sme pointer to avoid double free.mlelstv
2021-06-13iic_acquire_bus can fail.mlelstv
2021-05-24Bail out of axpreg_attach if axpreg_get_voltage returns an error.skrll
uvol isn't updated and shouldn't be used.
2021-05-21add \n to attach outputmacallan
2021-05-21don't prop_object_retain(NULL)macallan
2021-04-24Merge thorpej-cfargs branch:thorpej
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?).
2021-04-16spello in commentskrll
2021-03-01Use lmtemp(4) as entropy source.rin
2021-03-01Use dstemp(4) as entropy source.rin
2021-02-06- Add some additional compat strings from the DT bindings.thorpej
- Use device_compatible_entry::value to hold the device type, and generally tidy up device type selection.
2021-01-30Add the standard compat string from the Device Tree bindings.thorpej
2021-01-30Add standard compat strings from the Device Tree bindings.thorpej
2021-01-30Add the standard compat string from the Device Tree bindings.thorpej
2021-01-30Add a proper compat string for this device, following the standardthorpej
conventions.
2021-01-30If we're going to keep a reference on the "props" dictionary fromthorpej
the i2c_attach_args, we should retain it.
2021-01-28No need to consult ia->ia_ncompat before calling iic_compatible_lookup().thorpej
2021-01-28Use iic_compatible_lookup() in ssdfb_i2c_attach().thorpej