Page MenuHomeFreeBSD

acpi_gpiobus: IoRestriction is only for type IO
AcceptedPublic

Authored by cperciva on Tue, Oct 29, 5:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 6:44 AM
Unknown Object (File)
Tue, Oct 29, 11:21 PM
F101444451: image.png
Tue, Oct 29, 5:34 PM
Subscribers

Details

Reviewers
jrtc27
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.Tue, Oct 29, 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" .