| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
SPI attachments.
|
|
|
|
|
|
|
|
derive the proper wait delay for the measurement based upon the over
sampling setting and allow the wait factor multiplier to be adjusted.
|
|
just return junk if the wait is not long enough to allow a measurement
to start.
|
|
atmospheric pressure sensor. This is an inexpensive to moderately
expensive chip available from a large number of places. The driver
supports all aspects of the two chips, except for the repeating read
mode which would allow for sub-second queries, such as fall detection
or perhaps even as an altimeter. This driver also only supports the
I2C interface and not the SPI interface.
The BME280, the one with humidity, is not fully tested at this point,
awaiting upon a breakout board and may not show proper humidity.
|
|
slow for an I2C sensor it is inexpensive and should work well enough
in most indoor conditions. All features of the chip are supported.
|
|
PR# kern/57030
|
|
|
|
It was introduced in 2007 for some Xbox thing which was removed in
2011. The API and the threads it spawned have been sitting around
idly for over a decade serving no purpose -- sometimes causing kernel
lock spinouts in the event of panic.
Add ic_tag_private to obviate need for future ABI changes. Not
currently used, but we can privately allocate memory in iic_tag_init
for the purpose later if need be without changing ABI.
XXX kernel revbump -- changes struct i2c_controller
|
|
|
|
in iic_print_direct(). (From thorpej-i2c-spi-conf2 branch.)
|
|
|
|
|
|
This way we don't pollute the NetBSD kernel namespace with all the
Linux compat shim definitions needed to build drm, except for the
local drm drivers that need the API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it was found that the datasheet does not appear to provide enough
information to make use of the alarm and interrupt function work. So
actually remove the dead code that was an attempt at making that all
work. Adjust the man page to mention that this.
|
|
the iic module. There are valid configurations where i2c_subr code
can be both built-in and part of a loaded module (eg, piixpm is in
the kernel, but the iic module is loaded later). This causes the
in-kernel linker to detect a duplicate symbol.
|
|
interfaces, make sure that initialization and destruction
follow the proper sequence. This is triggered by the recent
changes to the devsw stuff; per riastradh@ the required call
sequence is:
devsw_attach()
config_init_component() or config_cf*_attach()
...
config_fini_component() or config_cf*_detach()
devsw_detach()
While here, add a few missing calls to some of the detach
routines.
Testing of these changes has been limited to:
1. compile without build break
2. no related test failures from atf
3. modload/modunload work as well as
before.
No functional device testing done, since I don't have any
of these devices. Let me know of any damage I might cause
here!
XXX Some of the modules affected by this commit are already
XXX broken; see kern/56772. This commit does not break
any additional modules (as far as I know).
|
|
still recursively get i2cexec since the iic depends on it.)
Partial fix for kern/56772
|
|
Prune a whole lotta dead branches as a result of this. (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back. To be
cleaned up in subsequent commits...)
XXX kernel ABI change to devsw_detach signature requires bump
|
|
Will help to make struct device opaque later.
|
|
|
|
from which the newly created handle will inherit it's implementation.
The root implementation for a new handle type is used if an invalid
"super handle" is passed.
|
|
devhandle_invalid(), which returns an invalid devhandle.
|
|
|
|
or ACPI "cookie". Temporary measure until the i2c autoconfiguration
overhaul is merged (which fixes this in a more generic way).
|
|
add support for 8-bit and I2C variants of the chip:
- MCP23008 / MCP23S08: 8-bit (I2C / SPI)
- MCP23017 / MCP23S17: 16-bit (I2C / SPI)
- MCP23018 / MCP23S18: 16-bit (I2C / SPI), open-drain outputs
The MCP23x17 and MCP23x18 are essentially identical, software-wise; we
merely report different GPIO pin capabilities (no push-pull output for
MCP23x18). Also, remove the tri-state capability that was previously
advertised by the old version of this driver; these chips have no way
to put the pin into a HI-Z mode.
All 3 I2C versions are supported, but the SPI front-end still only
supports the MCP23S17 for now (SPI autoconfiguration needs an overhaul).
mcp23s17gpio(4) remains present as a link to the new mcpgpio(4) man page.
XXX Still to-do: FDT integration, interrupt suppoort.
|
|
|
|
|
|
|
|
Access to the softc and hidms state is currently kernel-locked.
|
|
Need this to serialize access to sc_state, sc_refcnt.
XXX Should harmonize this with uhidev(4) and tighten assertions.
|
|
|
|
Limited to 64k and only happens on attach anyway. Let's not leave a
rake to trip on here.
|
|
- Can't run iic_exec in softint because it does cv_wait, at least on
some i2c controllers -- defer to workqueue instead.
- Fix violations of locking rules:
. Do not take a lock at higher IPL than it is defined at!
. Do not sleep under a lock!
. Definitely do not sleep under a spin lock!
In this case, sc_intr_lock was defined at IPL_VM but used at IPL_TTY,
and i2c transactions -- possibly causing sleep for cv_wait -- were
issued under it.
But in this case, the interrupt handler needs only a single bit to
mark whether the work is pending, so just use atomic_swap for that.
- Use an adaptive lock (IPL_NONE) for i2c transactions.
- Detach children, and do so before freeing anything.
|
|
Mark the sections that are conventionally separate files for hardware
interface (*reg.h) versus software state (*var.h).
|
|
|
|
|
|
|