Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Looking for addtional informations about Shutdown-Fragment example

Featured Replies

Hi,

 

I use a device tree fragment example for a shutdown button on my Orange Pi One.

 

/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";

	fragment@0 {
		target = <&pio>;
		__overlay__ {
			gpio_button_0: gpio_button_0 {
				pins = "PA20";
				function = "gpio_in";
				bias-pull-up;
			};
		};
	};

	fragment@1 {
		target-path = "/";
		__overlay__ {
			gpio-keys-user {
				compatible = "gpio-keys";
				pinctrl-names = "default";
				pinctrl-0 = <&gpio_button_0>;

				power_button {
					label = "Shutdown button";
					linux,code = <116>; /* KEY_POWER, see include/uapi/linux/input-event-codes.h */
					gpios = <&pio 0 20 1>;
				};
			};
		};
	};
};

 

And I try to understand how this fragment works. AS I understand it right now the fragment uses the existing infrastructure of the SW4. Which parts of the system (driver, etc.) handle the input of the push putton and where can I find some additional informations about it?

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.