Skip to content

Commit 53f594e

Browse files
committed
style(pm_wakeup_sources): Reword MCU GPIO section
Reword the MCU GPIO section to match the wording in WKUP GPIO section. Signed-off-by: Kendall Willis <[email protected]>
1 parent 0bf5e90 commit 53f594e

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

source/linux/Foundational_Components/Power_Management/pm_wakeup_sources.rst

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -331,62 +331,64 @@ MCU GPIO
331331
running on MCU core is responsible for configuring MCU GPIOs as a wakeup
332332
source. However, if the application design doesn't rely on the MCU firmware
333333
then Linux can be used to configure the MCU GPIOs as a wakeup source. Refer
334-
to the mcu_gpio_key node in
334+
to the ``mcu_gpio_key`` node in
335335
`k3-am62x-sk-lpm-wkup-sources.dtso <https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-lpm-wkup-sources.dtso?h=11.01.05>`__
336336
to use as a template to configure the desired MCU GPIO as a wakeup capable
337337
GPIO.
338338

339339
A brief guide to configuring an MCU GPIO as wakeup:
340340

341-
First, add gpio-keys as a compatible string, refer to
342-
`gpio_keys kernel documentation <https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt>`__
343-
for details.
341+
1. Add "gpio-keys" as a compatible string, refer to
342+
`gpio_keys kernel documentation <https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt>`__
343+
for details.
344344

345-
.. code-block:: dts
345+
.. code-block:: dts
346346
347-
compatible = "gpio-keys";
347+
compatible = "gpio-keys";
348348
349349
350-
Set the desired pinctrl,
350+
2. Set the desired pinctrl.
351351

352-
.. code-block:: dts
352+
.. code-block:: dts
353353
354-
pinctrl-names = "default";
355-
pinctrl-0 = <&wake_mcugpio1_pins_default>;
354+
pinctrl-names = "default";
355+
pinctrl-0 = <&wake_mcugpio1_pins_default>;
356356
357-
Setup the interrupt parent and interrupt as MCU_GPIO0,
357+
3. Setup the interrupt parent as MCU_GPIO0, then setup the interrupt.
358358

359-
.. code-block:: dts
359+
.. code-block:: dts
360360
361-
interrupt-parent = <&mcu_gpio0>;
362-
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
361+
interrupt-parent = <&mcu_gpio0>;
362+
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
363363
364-
Now, under the switch node, add the following:
364+
4. Create following child node as a ``switch`` node:
365365

366-
.. code-block:: dts
366+
.. code-block:: dts
367367
368-
switch {
368+
switch {
369369
label = "MCUGPIO";
370370
linux,code = <143>;
371371
gpios = <&mcu_gpio0 4 GPIO_ACTIVE_LOW>;
372372
wakeup-source;
373-
};
373+
};
374374
375-
#. label: Descriptive name of the switch node. If the MCU GPIO node is setup
376-
correctly, the label will appear under /proc/interrupts:
375+
* label: Descriptive name of the switch node. If the MCU GPIO node is setup
376+
correctly, the label will appear under :file:`/proc/interrupts`.
377+
* linux,code: Keycode to emit.
378+
* gpios: The GPIO required to be used as the gpio-key.
379+
* wakeup-source:
380+
`wakeup-source <https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-source.txt>`__
381+
property describes devices which have wakeup capability.
377382

378-
.. code-block:: console
383+
5. To confirm that gpio_keys can wakeup the system from Deep Sleep or MCU
384+
Only mode, check :file:`/proc/interrupts` for the label:
379385

380-
root@<machine>:~# cat /proc/interrupts | grep "MCUGPIO"
381-
273: 0 0 0 0 GPIO 4 Edge -davinci_gpio MCUGPIO
386+
.. code-block:: console
382387
383-
#. linux,code: Keycode to emit.
384-
#. gpios: the gpio required to be used as the gpio-key.
385-
#. wakeup-source:
386-
`wakeup-source <https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-source.txt>`__
387-
property describes devices which have wakeup capability.
388+
root@<machine>:~# cat /proc/interrupts | grep "MCUGPIO"
389+
273: 0 0 0 0 GPIO 4 Edge -davinci_gpio MCUGPIO
388390
389-
This indicates that gpio_keys can wake-up the system from Deep Sleep or MCU Only mode.
391+
This indicates that gpio_keys can wake-up the system from Deep Sleep or MCU Only mode.
390392

391393
The MCU GPIOs can be used to wakeup the system from Deep Sleep because MCU
392394
GPIOs are in a power domain that stays ON even when the SoC is in Deep Sleep.

0 commit comments

Comments
 (0)