Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/dev
Module Name: src
Committed By: brad
Date: Mon Dec 1 14:56:03 UTC 2025
Modified Files:
src/sys/dev/i2c: sc16is7xxi2c.c
src/sys/dev/ic: comvar.h sc16is7xx.c sc16is7xx_tty.c sc16is7xx_ttyvar.h
sc16is7xxvar.h
src/sys/dev/spi: sc16is7xxspi.c
Log Message:
When using a SC16IS7xx device in interrupt polling mode it was pretty
abusive to the I2C or SPI bus, and beat up the USB bus pretty badly as
the kthread ran all of the time checking to see if an interrupt
occurred.
Take advantage of the enable and disable calls that the general com.c
code supports for the purpose of doing power management and use those
to start, pause and resume the kthread only when the device is
actually open(). There does not effect the use of the GPIO on the
SC16IS7XX as that doesn't use the kthread for anything. There does
not seem to be any particular down side to this change. That is, it
there doesn't seem to be a use case for the device not to be open()
and still want interrupts handled.
Also... apparently the device property is-console and/or
force-console needs to be set to something. Just letting those float
appears to have the chance of introducing random values which are
sometimes "true", which is unexpected. For the SC16IS7xx device, just
set these to false. It is mostly a SMOP to getting this device
working as a console, with limitations, as the I2C or SPI bus must
exist first and be in a working state. There is some interesting
ability of UEFI to talk to a I2C bus, so it may be possible to even
have early console if you can get that path working on systems that
have UEFI. While the ability to have a dedicated console, and perhaps
KGDB, port outside of what a system might usually have is interesting,
all of this is beyond my particular use case.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/sc16is7xxi2c.c
cvs rdiff -u -r1.100 -r1.101 src/sys/dev/ic/comvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/sc16is7xx.c \
src/sys/dev/ic/sc16is7xx_tty.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/sc16is7xx_ttyvar.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/sc16is7xxvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/spi/sc16is7xxspi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index