/linux/Documentation/devicetree/bindings/power/reset/ |
H A D | gpio-restart.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/power/reset/gpio-restart.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO controlled reset 10 - Sebastian Reichel <sre@kernel.org> 13 Drive a GPIO line that can be used to restart the system from a restart handler. 16 request the given gpio line and install a restart handler. If the optional properties 17 'open-source' is not found, the GPIO line will be driven in the inactive state. Otherwise its 18 not driven until the restart is initiated. [all …]
|
H A D | gpio-poweroff.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/power/reset/gpio-poweroff.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO controlled power off 10 - Sebastian Reichel <sre@kernel.org> 13 System power off support via a GPIO line. When a shutdown is 14 executed the operating system is expected to switch the GPIO 15 from inactive to active. After a delay (active-delay-ms) it 17 delay (inactive-delay-ms) it is configured as active again. [all …]
|
/linux/Documentation/driver-api/gpio/ |
H A D | drivers-on-gpio.rst | 2 Subsystem drivers using GPIO 5 Note that standard kernel drivers exist for common GPIO tasks and will provide 6 the right in-kernel and userspace APIs/ABIs for the job, and that these 10 - leds-gpio: drivers/leds/leds-gpio.c will handle LEDs connected to GPIO 13 - ledtrig-gpio: drivers/leds/trigger/ledtrig-gpio.c will provide a LED trigger, 14 i.e. a LED will turn on/off in response to a GPIO line going high or low 15 (and that LED may in turn use the leds-gpio as per above). 17 - gpio-keys: drivers/input/keyboard/gpio_keys.c is used when your GPIO line 20 - gpio-keys-polled: drivers/input/keyboard/gpio_keys_polled.c is used when your 21 GPIO line cannot generate interrupts, so it needs to be periodically polled [all …]
|
/linux/drivers/power/reset/ |
H A D | gpio-restart.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Toggles a GPIO pin to restart a device 7 * Based on the gpio-poweroff driver. 14 #include <linux/gpio/consumer.h> 27 struct gpio_restart *gpio_restart = data->cb_data; in gpio_restart_notify() 29 /* drive it active, also inactive->active edge */ in gpio_restart_notify() 30 gpiod_direction_output(gpio_restart->reset_gpio, 1); in gpio_restart_notify() 31 mdelay(gpio_restart->active_delay_ms); in gpio_restart_notify() 33 /* drive inactive, also active->inactive edge */ in gpio_restart_notify() 34 gpiod_set_value(gpio_restart->reset_gpio, 0); in gpio_restart_notify() [all …]
|
H A D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 2 obj-$(CONFIG_POWER_RESET_AS3722) += as3722-poweroff.o 3 obj-$(CONFIG_POWER_RESET_AT91_POWEROFF) += at91-poweroff.o 4 obj-$(CONFIG_POWER_RESET_AT91_RESET) += at91-reset.o 5 obj-$(CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC) += at91-sama5d2_shdwc.o 6 obj-$(CONFIG_POWER_RESET_ATC260X) += atc260x-poweroff.o 7 obj-$(CONFIG_POWER_RESET_AXXIA) += axxia-reset.o 8 obj-$(CONFIG_POWER_RESET_BRCMKONA) += brcm-kona-reset.o 9 obj-$(CONFIG_POWER_RESET_BRCMSTB) += brcmstb-reboot.o 10 obj-$(CONFIG_POWER_RESET_EP93XX) += ep93xx-restart.o [all …]
|
H A D | xgene-reboot.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * AppliedMicro X-Gene SoC Reboot Driver 9 * This driver provides system reboot functionality for APM X-Gene SoC. 11 * implements GPIO shutdown, use the gpio-poweroff.c driver. 31 struct xgene_reboot_context *ctx = data->cb_data; in xgene_restart_handler() 34 writel(ctx->mask, ctx->csr); in xgene_restart_handler() 38 dev_emerg(ctx->dev, "Unable to restart system\n"); in xgene_restart_handler() 46 struct device *dev = &pdev->dev; in xgene_reboot_probe() 51 return -ENOMEM; in xgene_reboot_probe() 53 ctx->csr = devm_platform_ioremap_resource(pdev, 0); in xgene_reboot_probe() [all …]
|
/linux/arch/arm/mach-omap1/ |
H A D | ams-delta-fiq-handler.S | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * linux/arch/arm/mach-omap1/ams-delta-fiq-handler.S 14 #include <linux/platform_data/ams-delta-fiq.h> 15 #include <linux/platform_data/gpio-omap.h> 16 #include <linux/soc/ti/omap1-io.h> 22 #include "ams-delta-fiq.h" 23 #include "board-ams-delta.h" 27 * OMAP1510 GPIO related symbol copied from arch/arm/mach-omap1/gpio15xx.c. 32 /* GPIO register bitmasks */ 79 * r8 - temporary [all …]
|
/linux/arch/arm64/boot/dts/qcom/ |
H A D | msm8916-ufi.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 3 #include "msm8916-pm8916.dtsi" 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/leds/common.h> 9 chassis-type = "embedded"; 17 stdout-path = "serial0"; 20 gpio-keys { 21 compatible = "gpio-keys"; 23 pinctrl-0 = <&button_default>; 24 pinctrl-names = "default"; [all …]
|
/linux/drivers/net/can/dev/ |
H A D | dev.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (C) 2005 Marc Kleine-Budde, Pengutronix 4 * Copyright (C) 2008-2009 Wolfgang Grandegger <wg@grandegger.com> 13 #include <linux/can/can-ml.h> 16 #include <linux/gpio/consumer.h> 24 if (new_state <= priv->state) in can_update_state_error_stats() 29 priv->can_stats.error_warning++; in can_update_state_error_stats() 32 priv->can_stats.error_passive++; in can_update_state_error_stats() 35 priv->can_stats.bus_off++; in can_update_state_error_stats() 108 *tx_state = can_state_err_to_state(bec->txerr); in can_state_get_by_berr_counter() [all …]
|
/linux/arch/riscv/boot/dts/starfive/ |
H A D | jh7100-starfive-visionfive-v1.dts | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 7 /dts-v1/; 8 #include "jh7100-common.dtsi" 12 compatible = "starfive,visionfive-v1", "starfive,jh7100"; 14 gpio-restart { 15 compatible = "gpio-restart"; 16 gpios = <&gpio 63 GPIO_ACTIVE_HIGH>; 22 phy-handle = <&phy>; 26 * The board uses a Motorcomm YT8521 PHY supporting RGMII-ID, but requires 36 phy: ethernet-phy@0 { [all …]
|
/linux/arch/arm/boot/dts/microchip/ |
H A D | lan966x-pcb8291.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * lan966x_pcb8291.dts - Device Tree file for PCB8291 5 /dts-v1/; 7 #include "dt-bindings/phy/phy-lan966x-serdes.h" 10 model = "Microchip EVB - LAN9662"; 11 compatible = "microchip,lan9662-pcb8291", "microchip,lan9662", "microchip,lan966"; 14 stdout-path = "serial0:115200n8"; 21 gpio-restart { 22 compatible = "gpio-restart"; 23 gpios = <&gpio 56 GPIO_ACTIVE_LOW>; [all …]
|
H A D | lan966x-kontron-kswitch-d10-mmt.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include "dt-bindings/phy/phy-lan966x-serdes.h" 16 stdout-path = "serial0:115200n8"; 19 gpio-restart { 20 compatible = "gpio-restart"; 21 pinctrl-0 = <&reset_pins>; 22 pinctrl-names = "default"; 23 gpios = <&gpio 56 GPIO_ACTIVE_LOW>; 29 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>; [all …]
|
H A D | lan966x-pcb8290.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * lan966x-pcb8290.dts - Device Tree file for LAN966X-PCB8290 board 9 /dts-v1/; 11 #include "dt-bindings/phy/phy-lan966x-serdes.h" 15 compatible = "microchip,lan9668-pcb8290", "microchip,lan9668", "microchip,lan966"; 17 gpio-restart { 18 compatible = "gpio-restart"; 19 gpios = <&gpio 56 GPIO_ACTIVE_LOW>; 28 &gpio { 29 miim_a_pins: mdio-pins { [all …]
|
H A D | lan966x-pcb8309.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * lan966x_pcb8309.dts - Device Tree file for PCB8309 5 /dts-v1/; 7 #include "dt-bindings/phy/phy-lan966x-serdes.h" 10 model = "Microchip EVB - LAN9662"; 11 compatible = "microchip,lan9662-pcb8309", "microchip,lan9662", "microchip,lan966"; 20 stdout-path = "serial0:115200n8"; 23 gpio-restart { 24 compatible = "gpio-restart"; 25 gpios = <&gpio 56 GPIO_ACTIVE_LOW>; [all …]
|
/linux/arch/powerpc/platforms/embedded6xx/ |
H A D | wii.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Nintendo Wii board-specific support 6 * Copyright (C) 2008-2009 The GameCube Linux Team 24 #include "flipper-pic.h" 25 #include "hlwd-pic.h" 29 #define HW_CTRL_COMPATIBLE "nintendo,hollywood-control" 34 /* gpio */ 35 #define HW_GPIO_COMPATIBLE "nintendo,hollywood-gpio" 62 int error = -ENODEV; in wii_ioremap_hw_regs() 120 /* make sure that the poweroff GPIO is configured as output */ in wii_power_off() [all …]
|
/linux/arch/arm/boot/dts/synaptics/ |
H A D | berlin2cd-valve-steamlink.dts | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 5 /dts-v1/; 8 #include <dt-bindings/gpio/gpio.h> 19 gpio-restart { 20 compatible = "gpio-restart"; 22 active-delay = <100>; 23 inactive-delay = <10>; 24 wait-delay = <100>; 30 cpu-supply = <&vcpu>; 31 operating-points = < [all …]
|
/linux/arch/riscv/boot/dts/sifive/ |
H A D | hifive-unleashed-a00.dts | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 /* Copyright (c) 2018-2019 SiFive, Inc */ 4 #include "fu540-c000.dtsi" 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/leds/common.h> 7 #include <dt-bindings/pwm/pwm.h> 14 compatible = "sifive,hifive-unleashed-a00", "sifive,fu540-c000", 18 stdout-path = "serial0"; 22 timebase-frequency = <RTCCLK_FREQ>; 31 #clock-cells = <0>; [all …]
|
/linux/include/linux/mfd/ |
H A D | max8998.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * max8998.h - Voltage regulator driver for the Maxim 8998 5 * Copyright (C) 2009-2010 Samsung Electrnoics 46 * max8998_regulator_data - regulator data 49 * @reg_node: DT node of regulator (unused on non-DT platforms) 58 * struct max8998_board - packages regulator init data 68 * @buck1_default_idx: Default for BUCK1 gpio pin 1, 2 69 * @buck2_default_idx: Default for BUCK2 gpio pin. 76 * @restart: Restart Level in mV: 100, 150, 200, and -1 for disable. 79 * @timeout: Full Timeout in hours: 5, 6, 7, and -1 for disable. [all …]
|
/linux/arch/arm/boot/dts/nxp/imx/ |
H A D | imx7d-flex-concentrator.dts | 1 // SPDX-License-Identifier: GPL-2.0 9 /dts-v1/; 11 #include "imx7d-tqma7.dtsi" 14 /delete-node/ &ds1339; 18 compatible = "kam,imx7d-flex-concentrator", "fsl,imx7d"; 22 /* 1024 MB - TQMa7D board configuration */ 26 reg_usb_otg2_vbus: regulator-usb-otg2-vbus { 27 compatible = "regulator-fixed"; 28 regulator-name = "VBUS_USBOTG2"; 29 regulator-min-microvolt = <5000000>; [all …]
|
/linux/drivers/watchdog/ |
H A D | ibmasr.c | 1 // SPDX-License-Identifier: GPL-1.0+ 3 * IBM Automatic Server Restart driver. 8 * Copyright (c) IBM Corporation, 1998-2004. 154 /* SELECT AND READ THE HIGH-NIBBLE OF THE GPIO BASE ADDRESS */ in asr_get_base_address() 158 /* SELECT AND READ THE LOW-NIBBLE OF THE GPIO BASE ADDRESS */ in asr_get_base_address() 176 return -ENODEV; in asr_get_base_address() 237 return -EBUSY; in asr_get_base_address() 259 return -EFAULT; in asr_write() 282 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; in asr_ioctl() 288 int new_options, retval = -EINVAL; in asr_ioctl() [all …]
|
/linux/arch/powerpc/platforms/52xx/ |
H A D | mpc52xx_common.c | 25 { .compatible = "fsl,mpc5200-xlb", }, 26 { .compatible = "mpc5200-xlb", }, 30 { .compatible = "fsl,mpc5200-immr", }, 31 { .compatible = "fsl,mpc5200b-immr", }, 32 { .compatible = "simple-bus", }, 71 out_be32(&xlb->master_pri_enable, 0xff); in mpc5200_setup_xlb_arbiter() 72 out_be32(&xlb->master_priority, 0x11111111); in mpc5200_setup_xlb_arbiter() 77 * transaction and re-enable it afterwards ...) in mpc5200_setup_xlb_arbiter() 81 out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS); in mpc5200_setup_xlb_arbiter() 110 { .compatible = "fsl,mpc5200-gpt", }, [all …]
|
/linux/arch/arm/boot/dts/broadcom/ |
H A D | bcm47189-luxul-xap-1440.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 6 /dts-v1/; 11 compatible = "luxul,xap-1440-v1", "brcm,bcm47189", "brcm,bcm53573"; 12 model = "Luxul XAP-1440 V1"; 24 compatible = "gpio-leds"; 26 led-wlan { 31 led-system { 34 linux,default-trigger = "timer"; 38 gpio-keys { 39 compatible = "gpio-keys"; [all …]
|
H A D | bcm47189-luxul-xap-810.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 6 /dts-v1/; 11 compatible = "luxul,xap-810-v1", "brcm,bcm47189", "brcm,bcm53573"; 12 model = "Luxul XAP-810 V1"; 23 leds-0 { 24 compatible = "gpio-leds"; 26 led-5ghz { 31 led-system { 34 linux,default-trigger = "timer"; 38 leds-1 { [all …]
|
H A D | bcm4709-netgear-r7000.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 9 /dts-v1/; 12 #include "bcm5301x-nand-cs0-bch8.dtsi" 29 compatible = "gpio-leds"; 31 led-power-white { 34 linux,default-trigger = "default-on"; 37 led-power-amber { 42 led-5ghz { 47 led-2ghz { 52 led-wps { [all …]
|
H A D | bcm947189acdbmr.dts | 8 /dts-v1/; 26 compatible = "gpio-leds"; 28 led-wps { 33 led-5ghz { 38 led-2ghz { 44 gpio-keys { 45 compatible = "gpio-keys"; 47 button-restart { 53 button-wps { 61 compatible = "spi-gpio"; [all …]
|