History log of /freebsd/sys/dev/gpio/gpiopps.c (Results 1 – 12 of 12)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ff826f8e 04-Jul-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

gpiopps: don't use internal gpiobus function

gpiobus_release_pin is only meant to be used internally by gpiobus. Use
gpio_pin_release instead.

This also fixes a memory leak since gpio_pin_get_by_of

gpiopps: don't use internal gpiobus function

gpiobus_release_pin is only meant to be used internally by gpiobus. Use
gpio_pin_release instead.

This also fixes a memory leak since gpio_pin_get_by_ofw_idx returns a
malloc'd pointer, which gpio_pin_release now frees.

Reviewed by: wulf, imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D50871

show more ...


Revision tags: release/14.3.0, release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0
# 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
# 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 f

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

show more ...


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

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

show more ...


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

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

show more ...


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

Fix a common typo in source code comments

- s/concurently/concurrently/

MFC after: 3 days


Revision tags: 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, release/12.1.0
# 068bd593 13-Aug-2019 Ian Lepore <ian@FreeBSD.org>

Add PNP_INFO to the gpiopps driver.


Revision tags: release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0
# 128e3872 27-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.