History log of /freebsd/sys/dev/gpio/gpioths.c (Results 1 – 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 84c5f982 09-May-2022 John Baldwin <jhb@FreeBSD.org>

gpio: Remove unused devclass arguments to DRIVER_MODULE.


Revision tags: release/12.3.0, release/13.0.0
# 519b64e2 23-Jan-2021 Mark Johnston <markj@FreeBSD.org>

Revert "Define PNP info after defining driver modules"

This reverts commit aa37baf3d7cf51da92fd367476182802e71838ae.

The reverted commit was motivated by a problem observed on stable/12,
but it tur

Revert "Define PNP info after defining driver modules"

This reverts commit aa37baf3d7cf51da92fd367476182802e71838ae.

The reverted commit was motivated by a problem observed on stable/12,
but it turns out that a better solution was committed in r348309 but not
MFCed. So, revert this change since it is unnecessary and not really
correct: it assumes that the order in which module metadata records is
defined determines their order in the output linker set. While this
seems to hold in my testing, it is not guaranteed.

Reported by: cem
Discussed with: imp
MFC after: 3 days

show more ...


# aa37baf3 21-Jan-2021 Mark Johnston <markj@FreeBSD.org>

Define PNP info after defining driver modules

PNP info definitions currently have an unfortunate requirement in that
they must follow the associated module definition in the module metadata
linker s

Define PNP info after defining driver modules

PNP info definitions currently have an unfortunate requirement in that
they must follow the associated module definition in the module metadata
linker set. Otherwise devmatch can segfault while processing the linker
hints file since kldxref maintains the order in the linker set.

A number of drivers violate this requirement. In some cases this can
cause devmatch(8) to segfault when processing the linker hints file.
Work around the problem for now simply by adjusting the drivers.

Reviewed by: imp
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D28260

show more ...


Revision tags: release/12.2.0, release/11.4.0
# aa063061 27-Dec-2019 Brad Davis <brd@FreeBSD.org>

[gpioths] Fix GPIOTHS_DEBUG

Chase the removal of dev from gpioths_dht_readbytes() in r355540.

Reviewed by: ian
Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D22926


# 989da27e 09-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Switch gpioths(4) from using a callout to a taskqueue for periodic polling
of the sensor hardware. Part of the polling process involves signalling
the chip then waiting 20 milliseconds. This was be

Switch gpioths(4) from using a callout to a taskqueue for periodic polling
of the sensor hardware. Part of the polling process involves signalling
the chip then waiting 20 milliseconds. This was being done with DELAY(),
which is a pretty rude thing to do in a callout. Now a taskqueue_thread
task is scheduled to do the polling, and because sleeping is allowed in
the task context, pause_sbt() replaces DELAY() for the 20ms wait.

show more ...


# ffe0ca86 09-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Paste things correctly so that I'm added to the *end* of the copyright list.


# 5f0cf995 09-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Add myself to the copyright list. Also add an SPDX tag. And finally, fix
a missing word and a spelling error in a comment.


# 1398c4c5 09-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Add FDT support to the gpioths driver. It now uses the newer gpio_pin_*()
API and can attach based on either hints or fdt data.


# 35e9bfc9 08-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Add a MODULE_DEPEND() for the gpioths driver. Also, note that the prior commit
changed the sysctl format for the temperature from "I" to "IK", and
correspondingly changed the units from integer degre

Add a MODULE_DEPEND() for the gpioths driver. Also, note that the prior commit
changed the sysctl format for the temperature from "I" to "IK", and
correspondingly changed the units from integer degrees C to decikelvin.
For access via sysctl(8) the output will be the same except that now
decimal fractions will be shown when available.

show more ...


# ce508b36 08-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Add support for more chips to the gpioths driver.

Previously the driver supported the DHT11 sensor. Now it supports

DHT11, DHT12, DHT21, DHT22, AM3201, AM3202.

All these chips are similar, diffe

Add support for more chips to the gpioths driver.

Previously the driver supported the DHT11 sensor. Now it supports

DHT11, DHT12, DHT21, DHT22, AM3201, AM3202.

All these chips are similar, differing primarily in supported temperature
and humidity ranges and accuracy (and, presumably, cost). There are two
basic data formats reported by the various chips, and it is possible to
figure out at runtime which format to use for decoding the data based on
the range of values in a single byte of the humidity measurement. (which
is detailed in a comment block, so I won't recapitulate it here).

show more ...


# 78e70ab9 08-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Simplify sysctl stuff in the gpioths driver. There is no need to use local
functions to handle the sysctls, they all just access simple readonly
integer variables. There's no need to track the oids

Simplify sysctl stuff in the gpioths driver. There is no need to use local
functions to handle the sysctls, they all just access simple readonly
integer variables. There's no need to track the oids of the ones we add,
since the teardown is done by newbus code, not the driver itself.

Also remove the DDB code, because it just provides access to the same data
that the sysctls already provide.

show more ...


# 9f8df20c 08-Dec-2019 Ian Lepore <ian@FreeBSD.org>

Several small fixes for the gpioths (temp/humidity sensor) driver.

At the end of a read cycle, set the gpio pin to INPUT rather than OUTPUT.
The state of the single-wire "bus" when idle should be hi

Several small fixes for the gpioths (temp/humidity sensor) driver.

At the end of a read cycle, set the gpio pin to INPUT rather than OUTPUT.
The state of the single-wire "bus" when idle should be high; setting the
pin to input allows the external pullup to pull the line high. Setting it
to output (and leaving it driving low) was leading a good read cycle followed
by one that would fail, and it just continued like that forever, effectively
reading the sensor once every 10 seconds instead of 5.

In the attach function, do an initial read from the device before registering
the sysctls for accessing the last-read values, to prevent reading spurious
values for the first 5 seconds after the driver attaches.

Do a callout_drain() in the detach function to prevent crashes after
unloading the module.

show more ...


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0
# 721fc9d8 16-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r312207 through r312308.


# a61b4567 16-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r312305


# 662e30fc 16-Jan-2017 Michael Zhilin <mizhka@FreeBSD.org>

[gpioths] new driver for temperature/humidity sensor DHT11

This patch adds driver for temperature/humidity sensor connected via GPIO.
To compile it into kernel add "device gpioths". To activate driv

[gpioths] new driver for temperature/humidity sensor DHT11

This patch adds driver for temperature/humidity sensor connected via GPIO.
To compile it into kernel add "device gpioths". To activate driver, use
hints (.at and .pins) for gpiobus. As result it will provide temperature &
humidity values via sysctl.

DHT11 is cheap & popular temperature/humidity sensor used via GPIO on ARM
or MIPS devices like Raspberry Pi or Onion Omega.

Reviewed by: adrian
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D9185

show more ...