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

acpi_gpiobus: don't print error message if _AEI object doesn't exist

GPIO controllers aren't required to have an _AEI object.

Reviewed by: wulf
Approved by: imp (mentor)
Differential Revision: http

acpi_gpiobus: don't print error message if _AEI object doesn't exist

GPIO controllers aren't required to have an _AEI object.

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

show more ...


# 9c2509f8 04-Jul-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

gpio: hide internal gpiobus symbols

Move functions and variables internal to gpiobus to their own header to
avoid namespace pollution and misuse.

Reviewed by: wulf, imp
Approved by: imp (mentor)
Di

gpio: hide internal gpiobus symbols

Move functions and variables internal to gpiobus to their own header to
avoid namespace pollution and misuse.

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

show more ...


Revision tags: release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2, release/14.3.0, release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3
# d6dc661c 11-Mar-2025 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

acpi_gpiobus: mask pin flags for GPIOBUS_PIN_SETFLAGS

GPIOBUS_PIN_SETFLAGS calls GPIO_PIN_SETFLAGS, which doesn't accept
interrupt flags.

Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: ht

acpi_gpiobus: mask pin flags for GPIOBUS_PIN_SETFLAGS

GPIOBUS_PIN_SETFLAGS calls GPIO_PIN_SETFLAGS, which doesn't accept
interrupt flags.

Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1667
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>

show more ...


# da94bc91 11-Mar-2025 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

gpio: don't misuse pin->flags

The flags member of gpio_pin_t was only meant for pin flags acquired via
the FDT.

Instead, make an accessor so gpioaei can still access the flags and
remove the now un

gpio: don't misuse pin->flags

The flags member of gpio_pin_t was only meant for pin flags acquired via
the FDT.

Instead, make an accessor so gpioaei can still access the flags and
remove the now unused gpio_pin_get_by_acpi_index.

Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1667
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>

show more ...


# f7cacc68 11-Mar-2025 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

acpi_gpiobus: clarify error message

This message was identical to another a few lines up, making it hard to
tell where the error occurred.

Reviewed-by: Ed Maste <emaste@FreeBSD.org>
Reviewed-by: Wa

acpi_gpiobus: clarify error message

This message was identical to another a few lines up, making it hard to
tell where the error occurred.

Reviewed-by: Ed Maste <emaste@FreeBSD.org>
Reviewed-by: Warner Losh <imp@FreeBSD.org>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1667
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>

show more ...


# 6aab381a 07-Mar-2025 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

acpi_gpiobus: assume GPIO_PIN_INPUT for interrupt pins

Different drivers respond differently to having neither GPIO_PIN_INPUT
or GPIO_PIN_OUTPUT set, this stops the unpredictable results.


Revision tags: 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
# bb8c68b2 09-Dec-2024 Andrew Turner <andrew@FreeBSD.org>

acpi_gpiobus: Fix cleanup on set flags failure

When GPIOBUS_PIN_SETFLAGS fails we called gpiobus_free_ivars to clean
up the contents of the ivar, then would free the ivar. This lead to a
use-after-f

acpi_gpiobus: Fix cleanup on set flags failure

When GPIOBUS_PIN_SETFLAGS fails we called gpiobus_free_ivars to clean
up the contents of the ivar, then would free the ivar. This lead to a
use-after-free as the ivar had already been set on the child so
gpiobus_child_deleted would try to free it again.

Fix this by removing the early cleanup and letting
gpiobus_child_deleted handle it.

Fixes: c9e880c0ceef ("gpiobus: Use a bus_child_deleted method to free ivars for children")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47670

show more ...


Revision tags: release/14.2.0
# 9709bda0 22-Oct-2024 Colin Percival <cperciva@FreeBSD.org>

GPIO: Add ACPI _AEI support

Changes to acpi_gpiobus.c handle discovering and parsing the _AEI
objects and storing necessary data in device ivars. A new gpioaei.c
file implements the device, which s

GPIO: Add ACPI _AEI support

Changes to acpi_gpiobus.c handle discovering and parsing the _AEI
objects and storing necessary data in device ivars. A new gpioaei.c
file implements the device, which simply requests an interrupt when
the pin is triggered and invokes the appropriate _Exx or _Lxx ACPI
method.

This makes the GPIO "power button" work on arm64 Graviton systems,
allowing EC2 "Stop"/"Reboot" instance calls to be handled cleanly.
(Prior to this change, those requests would time out after 4 minutes
and the instance would be forcibly killed.)

Reviwed by: imp, andrew, Ahmad Khalifa
MFC after: 3 days
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D47253
Co-authored-by: Andrew Turner <andrew@FreeBSD.org>

show more ...


# 0ffd7d4d 29-Oct-2024 Colin Percival <cperciva@FreeBSD.org>

acpi_gpiobus: IoRestriction is only for type IO

The IoRestriction field of ACPI_RESOURCE_GPIO is only meaningful
for resources of type ACPI_RESOURCE_GPIO_TYPE_IO.

Reported by: jrtc27
Reviewed by: j

acpi_gpiobus: IoRestriction is only for type IO

The IoRestriction field of ACPI_RESOURCE_GPIO is only meaningful
for resources of type ACPI_RESOURCE_GPIO_TYPE_IO.

Reported by: jrtc27
Reviewed by: jrtc27
Differential Revision: <https://reviews.freebsd.org/D47331>

show more ...


# 2d421991 22-Oct-2024 Colin Percival <cperciva@FreeBSD.org>

acpi_gpiobus: Narrow scope of NOT_YET

GPIO interrupts work just fine and will be used shortly. We still
do not support GPIO_INTR_SHAREABLE however, so leave that within
the NOT_YET scope.

Reviwed

acpi_gpiobus: Narrow scope of NOT_YET

GPIO interrupts work just fine and will be used shortly. We still
do not support GPIO_INTR_SHAREABLE however, so leave that within
the NOT_YET scope.

Reviwed by: andrew
MFC after: 1 week
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D47251

show more ...


# c8081327 12-Oct-2024 Colin Percival <cperciva@FreeBSD.org>

acpi_gpiobus: OR GPIO_PIN_(IN|OUT)PUT into flags

Right now flags is set to 0 before this "=" -> "|=" change, but it will
matter when the NOT_YET section above becomes effective.

MFC after: 2 weeks

acpi_gpiobus: OR GPIO_PIN_(IN|OUT)PUT into flags

Right now flags is set to 0 before this "=" -> "|=" change, but it will
matter when the NOT_YET section above becomes effective.

MFC after: 2 weeks
Sponsored by: Amazon

show more ...


Revision tags: release/13.4.0
# 92adaa58 08-Jul-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

gpiobus(4): Add an acpi variant of gpiobus

This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.

Reviewed by: wulf
MFC after: 1 mont

gpiobus(4): Add an acpi variant of gpiobus

This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.

Reviewed by: wulf
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/1359

show more ...