History log of /freebsd-current/sys/dev/gpio/gpiopps.c
Revision 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.

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


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

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

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


# 84c5f982 09-May-2022 John Baldwin <jhb@FreeBSD.org>

gpio: Remove unused devclass arguments to DRIVER_MODULE.


# 1c7d15b0 30-Nov-2021 Warner Losh <imp@FreeBSD.org>

Make device_busy/unbusy work w/o Giant held

The vast majority of the busy/unbusy users in the tree don't acquire
Giant before calling device_busy/unbusy. However, if multiple threads
are opening a file, say, that causes the device to busy/unbusy, then we
can race to the root marking things busy. Move to using a reference
count to keep track of how many times a device_t has been made busy. Use
that count to make the same decisions that we'd make with the old device
state.

Note: gpiopps.c uses D_TRACKCLOSE. Others do as well. However, there's a
known race with closes that will be corrected for all the drivers that
do this in a future commit.

Sponsored by: Netflix
Reviewed by: hselasky, jhb
Differential Revision: https://reviews.freebsd.org/D26284


# 25c49c42 30-Nov-2021 Warner Losh <imp@FreeBSD.org>

Revert "Make device_busy/unbusy work w/o Giant held"

This reverts commit 08e781915363f98f4318a864b3b5a52bd99424c6.

Commit message was for a very old version of the patch. Will re-commit
with the right one since it's so bad. There's no locked versions of
it...that code was reworked to use refcnt APIs.

Noticed by: jhb, jtrc27
Sponsored by: Netflix


# 08e78191 30-Nov-2021 Warner Losh <imp@FreeBSD.org>

Make device_busy/unbusy work w/o Giant held

The vast majority of the busy/unbusy users in the tree don't acquire Giant
before calling device_busy/unbusy. However, if multiple threads are opening a
file, say, that causes the device to busy/unbusy, then we can race to the root
marking things busy. Create a new device_busy_locked and device_unbusy_locked
that are the current implemntations of device_busy and device_unbusy. Make
device_busy and unbusy acquire Giant before calling the _locked versrions. Since
we never sleep in the busy/unbusy path, Giant's single threaded semantics
suffice to keep this safe.

Sponsored by: Netflix
Reviewed by: hselasky, jhb
Differential Revision: https://reviews.freebsd.org/D26284


# 5d785ad6 29-Aug-2021 Gordon Bergling <gbe@FreeBSD.org>

Fix a common typo in source code comments

- s/concurently/concurrently/

MFC after: 3 days


# 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 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


# 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 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


# 068bd593 13-Aug-2019 Ian Lepore <ian@FreeBSD.org>

Add PNP_INFO to the gpiopps driver.


# 128e3872 26-May-2016 Ian Lepore <ian@FreeBSD.org>

Add a PPS driver that takes the timing pulse from a gpio pin. Currently
supports only ofw/fdt systems. Some day, hinted attachment for non-fdt
systems should be possible too.