History log of /src/sys/dev/gpio/gpioaei.c (Results 1 – 19 of 19)
Revision Date Author Comments
# b9f1e45e 17-Feb-2026 John Baldwin <jhb@FreeBSD.org>

acpi_gpiobus: Reuse the existing IVAR index for an ACPI handle

ACPI_IVAR_HANDLE is a global index shared across multiple busses,
there is no need for a unique constant here.

Reviewed by: vexeduxr,

acpi_gpiobus: Reuse the existing IVAR index for an ACPI handle

ACPI_IVAR_HANDLE is a global index shared across multiple busses,
there is no need for a unique constant here.

Reviewed by: vexeduxr, imp
Differential Revision: https://reviews.freebsd.org/D54155

show more ...


# 01dcb4e6 09-Dec-2025 John Baldwin <jhb@FreeBSD.org>

gpio_alloc_intr_resource: Pass rid by value

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53407


# ed60e694 20-Aug-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

gpio: rework gpioaei

Rework gpioaei to make it support more than one pin per GPIO resource.
Also allow one instance of gpioaei to handle multiple resources.

Reviewed by: imp, jhb
Approved by: imp (

gpio: rework gpioaei

Rework gpioaei to make it support more than one pin per GPIO resource.
Also allow one instance of gpioaei to handle multiple resources.

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

show more ...


# 0fcd9be1 31-Mar-2025 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

gpioaei: mark the AEI ithread as sleepable

We call an ACPICA function in the interrupt handler which may attempt to
lock a mutex. If this is done while another instance of the handler
already holds

gpioaei: mark the AEI ithread as sleepable

We call an ACPICA function in the interrupt handler which may attempt to
lock a mutex. If this is done while another instance of the handler
already holds the lock, it would cause a kernel panic since sleeping
isn't allowed.

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


# adc2c156 07-Mar-2025 Vladimir Kondratyev <wulf@FreeBSD.org>

gpioaei: Add support for ACPI _EVT method

This method is often used to process GPIO "Power on" button press on
modern x86 laptops with S0ix sleep mode.

Tested with patch from https://reviews.freebs

gpioaei: Add support for ACPI _EVT method

This method is often used to process GPIO "Power on" button press on
modern x86 laptops with S0ix sleep mode.

Tested with patch from https://reviews.freebsd.org/D26407

Sponsored by: Future Crew LLC
MFC after: 2 month

show more ...


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


# 01dcb4e6 09-Dec-2025 John Baldwin <jhb@FreeBSD.org>

gpio_alloc_intr_resource: Pass rid by value

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53407


# ed60e694 20-Aug-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

gpio: rework gpioaei

Rework gpioaei to make it support more than one pin per GPIO resource.
Also allow one instance of gpioaei to handle multiple resources.

Reviewed by: imp, jhb
Approved by: imp (

gpio: rework gpioaei

Rework gpioaei to make it support more than one pin per GPIO resource.
Also allow one instance of gpioaei to handle multiple resources.

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

show more ...


# 0fcd9be1 31-Mar-2025 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

gpioaei: mark the AEI ithread as sleepable

We call an ACPICA function in the interrupt handler which may attempt to
lock a mutex. If this is done while another instance of the handler
already holds

gpioaei: mark the AEI ithread as sleepable

We call an ACPICA function in the interrupt handler which may attempt to
lock a mutex. If this is done while another instance of the handler
already holds the lock, it would cause a kernel panic since sleeping
isn't allowed.

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


# adc2c156 07-Mar-2025 Vladimir Kondratyev <wulf@FreeBSD.org>

gpioaei: Add support for ACPI _EVT method

This method is often used to process GPIO "Power on" button press on
modern x86 laptops with S0ix sleep mode.

Tested with patch from https://reviews.freebs

gpioaei: Add support for ACPI _EVT method

This method is often used to process GPIO "Power on" button press on
modern x86 laptops with S0ix sleep mode.

Tested with patch from https://reviews.freebsd.org/D26407

Sponsored by: Future Crew LLC
MFC after: 2 month

show more ...


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


# 01dcb4e6 09-Dec-2025 John Baldwin <jhb@FreeBSD.org>

gpio_alloc_intr_resource: Pass rid by value

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53407


# ed60e694 20-Aug-2025 Ahmad Khalifa <vexeduxr@FreeBSD.org>

gpio: rework gpioaei

Rework gpioaei to make it support more than one pin per GPIO resource.
Also allow one instance of gpioaei to handle multiple resources.

Reviewed by: imp, jhb
Approved by: imp (

gpio: rework gpioaei

Rework gpioaei to make it support more than one pin per GPIO resource.
Also allow one instance of gpioaei to handle multiple resources.

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

show more ...


# 0fcd9be1 31-Mar-2025 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

gpioaei: mark the AEI ithread as sleepable

We call an ACPICA function in the interrupt handler which may attempt to
lock a mutex. If this is done while another instance of the handler
already holds

gpioaei: mark the AEI ithread as sleepable

We call an ACPICA function in the interrupt handler which may attempt to
lock a mutex. If this is done while another instance of the handler
already holds the lock, it would cause a kernel panic since sleeping
isn't allowed.

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


# adc2c156 07-Mar-2025 Vladimir Kondratyev <wulf@FreeBSD.org>

gpioaei: Add support for ACPI _EVT method

This method is often used to process GPIO "Power on" button press on
modern x86 laptops with S0ix sleep mode.

Tested with patch from https://reviews.freebs

gpioaei: Add support for ACPI _EVT method

This method is often used to process GPIO "Power on" button press on
modern x86 laptops with S0ix sleep mode.

Tested with patch from https://reviews.freebsd.org/D26407

Sponsored by: Future Crew LLC
MFC after: 2 month

show more ...


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