All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Mark Hasemeyer <markhas@chromium.org>
Cc: Rob Herring <robh@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Raul Rangel <rrangel@chromium.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Frank Rowand <frowand.list@gmail.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v1 3/6] of: irq: add wake capable bit to of_irq_resource()
Date: Mon, 18 Dec 2023 10:49:43 +0000	[thread overview]
Message-ID: <ZYAjxxHcCOgDVMTQ@bogus> (raw)
In-Reply-To: <CANg-bXDfOp4e6WDx9JF5XyxjSvh-ctNsM1TTgr8N1NzfDvzpgw@mail.gmail.com>

On Fri, Dec 15, 2023 at 01:56:47PM -0700, Mark Hasemeyer wrote:
> On Fri, Dec 15, 2023 at 8:30 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Thu, Dec 14, 2023 at 02:05:16PM -0700, Mark Hasemeyer wrote:
> > > > If a device has multiple interrupts, but none named "wakeup" you are
> > > > saying all the interrupts are wakeup capable. That's not right though.
> > > > Only the device knows which interrupts are wakeup capable. You need:
> > > >

Agreed.

> > > > return wakeindex >= 0 && wakeindex == index;
> > >
> > > I was assuming logic described in the DT bindings:
> > > https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-source.txt
> > > "Also, if device is marked as a wakeup source, then all the primary
> > > interrupt(s) can be used as wakeup interrupt(s)."

At the time it was written, the intention was not to fix any particular
interrupt as wakeup but leave those details to the device. Also this was
just to consolidate various variation of similar bindings/support for the
same wake feature. It didn't enforce any rules as what can be or can't be
wakeup interrupt.

> >
> > Also not the best wording I think.
> >
> > Which interrupts are primary interrupts?
> >
> > If we can't determine which interrupt, then we should just leave it up
> > to the device.
> >

Again I agree with this.

> +Sudeep who authored the documentation and Rob Ack'd: a68eee4c748c
> ("Documentation: devicetree: standardize/consolidate on "wakeup-source"
> property")
>
> I think what Rob is suggesting more closely matches what ACPI supports: where
> interrupt resources are individually marked as wake capable.  The binding
> documentation should be updated though.
>
> Something like:
> ```
> If the device is marked as a wakeup-source, interrupt wake capability depends
> on the device specific "interrupt-names" property. If no interrupts are labeled
> as wake capable, then it is up to the device to determine which interrupts can
> wake the system.
>
> However if a device has a dedicated interrupt as the wakeup source, then it
> needs to specify/identify it using a device specific interrupt name. In such
> cases only that interrupt can be used as a wakeup interrupt.
>
> While various legacy interrupt names exist, new devices should use "wakeup" as
> the canonical interrupt name.
> ```
>
> Parts of the kernel (I2C, bluetooth, MMC) assume "wakeup" as the
> interrupt-name. I added some wording to clarify the assumption.
>
> Thoughts?

Above wordings sounds good to me.

--
Regards,
Sudeep

  reply	other threads:[~2023-12-18 10:49 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 18:00 [PATCH v1 1/6] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by to use resource Mark Hasemeyer
2023-12-13 18:00 ` [PATCH v1 2/6] arm: arm64: dts: Enable cros-ec-spi as wake source Mark Hasemeyer
2023-12-13 18:00   ` Mark Hasemeyer
2023-12-13 18:00   ` Mark Hasemeyer
2023-12-13 18:08   ` Krzysztof Kozlowski
2023-12-13 18:08     ` Krzysztof Kozlowski
2023-12-13 18:08     ` Krzysztof Kozlowski
2023-12-13 22:11   ` Rob Herring
2023-12-13 22:11     ` Rob Herring
2023-12-13 22:11     ` Rob Herring
2023-12-14 21:04     ` Mark Hasemeyer
2023-12-14 21:04       ` Mark Hasemeyer
2023-12-14 21:04       ` Mark Hasemeyer
2023-12-14 22:20       ` Rob Herring
2023-12-14 22:20         ` Rob Herring
2023-12-14 22:20         ` Rob Herring
2023-12-14 10:55   ` AngeloGioacchino Del Regno
2023-12-14 10:55     ` AngeloGioacchino Del Regno
2023-12-14 10:55     ` AngeloGioacchino Del Regno
2023-12-14 11:53     ` Konrad Dybcio
2023-12-14 11:53       ` Konrad Dybcio
2023-12-14 11:53       ` Konrad Dybcio
2023-12-13 18:00 ` [PATCH v1 3/6] of: irq: add wake capable bit to of_irq_resource() Mark Hasemeyer
2023-12-13 19:44   ` Andy Shevchenko
2023-12-13 22:19   ` Rob Herring
2023-12-14 21:05     ` Mark Hasemeyer
2023-12-15 15:30       ` Rob Herring
2023-12-15 20:56         ` Mark Hasemeyer
2023-12-18 10:49           ` Sudeep Holla [this message]
2023-12-13 18:00 ` [PATCH v1 4/6] of: irq: Add default implementation for of_irq_to_resource() Mark Hasemeyer
2023-12-13 19:45   ` Andy Shevchenko
2023-12-13 18:00 ` [PATCH v1 5/6] platform: Modify platform_get_irq_optional() to use resource Mark Hasemeyer
2023-12-13 19:52   ` Andy Shevchenko
2023-12-18 20:23     ` Mark Hasemeyer
2023-12-19 14:58       ` Andy Shevchenko
2023-12-13 22:04   ` Rob Herring
2023-12-13 18:00 ` [PATCH v1 6/6] platform/chrome: cros_ec: Use PM subsystem to manage wakeirq Mark Hasemeyer
2023-12-14  3:09   ` Tzung-Bi Shih
2023-12-15 21:02     ` Mark Hasemeyer
2023-12-13 19:34 ` [PATCH v1 1/6] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by to use resource Andy Shevchenko
2023-12-14 20:56   ` Mark Hasemeyer
2023-12-13 19:40 ` 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=ZYAjxxHcCOgDVMTQ@bogus \
    --to=sudeep.holla@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markhas@chromium.org \
    --cc=robh@kernel.org \
    --cc=rrangel@chromium.org \
    /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.