Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1499198

Re: [PATCH v2 1/4] ACPI / property: Allow holes in reference properties

From "Rafael J. Wysocki" <rafael@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/4] ACPI / property: Allow holes in reference properties
Date 2016-10-11 22:50 +0200
Message-ID <src9P-2XG-1@gated-at.bofh.it> (permalink)
References <smJSO-4KE-11@gated-at.bofh.it> <smJSO-4KE-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 29, 2016 at 3:39 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> DT allows holes or empty phandles for references. This is used for example
> in SPI subsystem where some chip selects are native and others are regular
> GPIOs. In ACPI _DSD we currently do not support this but instead the
> preceding reference consumes all following integer arguments.
>
> For example we would like to support something like the below ASL fragment
> for SPI:
>
>   Package () {
>       "cs-gpios",
>       Package () {
>           ^GPIO, 19, 0, 0, // GPIO CS0
>           0,               // Native CS
>           ^GPIO, 20, 0, 0, // GPIO CS1
>       }
>   }
>
> The zero in the middle means "no entry" or NULL reference. To support this
> we change acpi_data_get_property_reference() to take firmware node and
> num_args as argument and rename it to __acpi_node_get_property_reference().
> The function returns -ENOENT if the given index resolves to "no entry"
> reference and -ENODATA when there are no more entries in the property.
>
> We then add static inline wrapper acpi_node_get_property_reference() that
> passes MAX_ACPI_REFERENCE_ARGS as num_args to support the existing
> behaviour which some drivers have been relying on.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

The patch looks good to me and I don't see any reason to defer it, so
I'm queuing it up for the next ACPI pull request.

Thanks,
Rafael

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/4] ACPI / gpio: Updates to properties Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-09-29 15:50 +0200
  [PATCH v2 1/4] ACPI / property: Allow holes in reference properties Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-09-29 15:50 +0200
    Re: [PATCH v2 1/4] ACPI / property: Allow holes in reference properties "Rafael J. Wysocki" <rafael@kernel.org> - 2016-10-11 22:50 +0200
  [PATCH v2 3/4] ACPI / gpio: Add hogging support Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-09-29 15:50 +0200
  [PATCH v2 4/4] ACPI / gpio: Allow holes in list of GPIOs for a device Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-09-29 15:50 +0200
  Re: [PATCH v2 0/4] ACPI / gpio: Updates to properties Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-07 19:20 +0200

csiph-web