All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Flavio Suligoi" <f.suligoi@asem.it>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux PWM List" <linux-pwm@vger.kernel.org>,
	"ACPI Devel Maling List" <linux-acpi@vger.kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Len Brown" <lenb@kernel.org>
Subject: Re: [PATCH v3 1/6] docs: firmware-guide: ACPI: Add a PWM example
Date: Mon, 7 Jun 2021 14:38:26 +0200	[thread overview]
Message-ID: <CAJZ5v0jNWTzy37rX_V6LF7y7LOdy=KUokkVZ+25zj4+AZ244OQ@mail.gmail.com> (raw)
In-Reply-To: <20210607122458.40073-1-andriy.shevchenko@linux.intel.com>

On Mon, Jun 7, 2021 at 2:24 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> When PWM support for ACPI has been added into the kernel, it missed
> the documentation update. Hence update documentation here.
>
> Fixes: 4a6ef8e37c4d ("pwm: Add support referencing PWMs from ACPI")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

and I'm assuming this to go in via PWM.

> ---
> v3: despite flags being optional, don't alter it in the documentation
> v2: updated example to use 600 ms instead of 600 us (looks saner)
>  .../firmware-guide/acpi/enumeration.rst       | 32 +++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/Documentation/firmware-guide/acpi/enumeration.rst b/Documentation/firmware-guide/acpi/enumeration.rst
> index 9f0d5c854fa4..f588663ba906 100644
> --- a/Documentation/firmware-guide/acpi/enumeration.rst
> +++ b/Documentation/firmware-guide/acpi/enumeration.rst
> @@ -258,6 +258,38 @@ input driver::
>                 .id_table       = mpu3050_ids,
>         };
>
> +Reference to PWM device
> +=======================
> +
> +Sometimes a device can be a consumer of PWM channel. Obviously OS would like
> +to know which one. To provide this mapping the special property has been
> +introduced, i.e.::
> +
> +    Device (DEV)
> +    {
> +        Name (_DSD, Package ()
> +        {
> +            ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> +            Package () {
> +                Package () { "compatible", Package () { "pwm-leds" } },
> +                Package () { "label", "alarm-led" },
> +                Package () { "pwms",
> +                    Package () {
> +                        "\\_SB.PCI0.PWM",  // <PWM device reference>
> +                        0,                 // <PWM index>
> +                        600000000,         // <PWM period>
> +                        0,                 // <PWM flags>
> +                    }
> +                }
> +            }
> +
> +        })
> +        ...
> +
> +In the above example the PWM-based LED driver references to the PWM channel 0
> +of \_SB.PCI0.PWM device with initial period setting equal to 600 ms (note that
> +value is given in nanoseconds).
> +
>  GPIO support
>  ============
>
> --
> 2.30.2
>

  parent reply	other threads:[~2021-06-07 12:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 12:24 [PATCH v3 1/6] docs: firmware-guide: ACPI: Add a PWM example Andy Shevchenko
2021-06-07 12:24 ` [PATCH v3 2/6] pwm: core: Convert to use fwnode for matching Andy Shevchenko
2021-06-07 12:24 ` [PATCH v3 3/6] pwm: core: Reuse fwnode_to_pwmchip() in ACPI case Andy Shevchenko
2021-06-07 12:38   ` Rafael J. Wysocki
2021-06-07 12:24 ` [PATCH v3 4/6] pwm: core: Unify fwnode checks in the module Andy Shevchenko
2021-06-07 12:24 ` [PATCH v3 5/6] pwm: core: Remove unused devm_pwm_put() Andy Shevchenko
2021-06-07 12:24 ` [PATCH v3 6/6] pwm: core: Simplify some devm_*pwm*() functions Andy Shevchenko
2021-06-07 12:38 ` Rafael J. Wysocki [this message]
2021-06-07 14:36   ` [PATCH v3 1/6] docs: firmware-guide: ACPI: Add a PWM example Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJZ5v0jNWTzy37rX_V6LF7y7LOdy=KUokkVZ+25zj4+AZ244OQ@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=f.suligoi@asem.it \
    --cc=lee.jones@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.