Page MenuHomeFreeBSD

acpi_gpiobus: IoRestriction is only for type IO
ClosedPublic

Authored by cperciva on Oct 29 2024, 5:07 PM.
Tags
None
Referenced Files
F133401653: D47331.id.diff
Sat, Oct 25, 12:52 PM
F133401637: D47331.id145610.diff
Sat, Oct 25, 12:52 PM
F133369529: D47331.diff
Sat, Oct 25, 6:25 AM
Unknown Object (File)
Thu, Oct 23, 5:39 AM
Unknown Object (File)
Wed, Oct 8, 9:12 PM
Unknown Object (File)
Sun, Oct 5, 3:43 AM
Unknown Object (File)
Wed, Oct 1, 11:49 PM
Unknown Object (File)
Tue, Sep 30, 10:38 AM
Subscribers

Details

Summary

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

Reported by: jrtc27

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60249
Build 57133: arc lint + arc unit

Event Timeline

Don't we need to set GPIO_PIN_INPUT for interrupts?

This revision is now accepted and ready to land.Oct 29 2024, 5:18 PM

Don't we need to set GPIO_PIN_INPUT for interrupts?

Depends what our framework is expecting I guess, but that would seem sensible to me.

Hmm, I don't actually see anything in the ACPI spec saying that IoRestriction only applies for ACPI_RESOURCE_GPIO_TYPE_IO. So I think we have three options here:

  1. Go ahead with this patch, on the basis of "this is what Linux does",
  2. Force GPIO_PIN_INPUT for ACPI_RESOURCE_GPIO_TYPE_INT on the basis of "if we're generating interrupts obviously it's an input", or
  3. Just parse the values we're given and hope they make sense.

@andrew, @jrtc27, any preference?

Hmm, I don't actually see anything in the ACPI spec saying that IoRestriction only applies for ACPI_RESOURCE_GPIO_TYPE_IO. So I think we have three options here:

  1. Go ahead with this patch, on the basis of "this is what Linux does",
  2. Force GPIO_PIN_INPUT for ACPI_RESOURCE_GPIO_TYPE_INT on the basis of "if we're generating interrupts obviously it's an input", or
  3. Just parse the values we're given and hope they make sense.

@andrew, @jrtc27, any preference?

This table in the link I posted above:

image.png (744×2 px, 191 KB)

Hmm, I don't actually see anything in the ACPI spec saying that IoRestriction only applies for ACPI_RESOURCE_GPIO_TYPE_IO. So I think we have three options here:

  1. Go ahead with this patch, on the basis of "this is what Linux does",
  2. Force GPIO_PIN_INPUT for ACPI_RESOURCE_GPIO_TYPE_INT on the basis of "if we're generating interrupts obviously it's an input", or
  3. Just parse the values we're given and hope they make sense.

@andrew, @jrtc27, any preference?

This table in the link I posted above:

image.png (744×2 px, 191 KB)

(Note that interrupts have a separate definition for byte 7, with some common fields, but the I/O Restriction bits are replaced by the Interrupt Mode and half the Interrupt Polarity)

This table in the link I posted above:

Aha, I didn't notice the text "for IO Connections" .