/openbmc/linux/Documentation/devicetree/bindings/hwmon/ |
H A D | adi,ltc2947.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Nuno Sá <nuno.sa@analog.com> 15 https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf 20 - adi,ltc2947 33 adi,accumulator-ctl-pol: 41 $ref: /schemas/types.yaml#/definitions/uint32-array 48 adi,accumulation-deadband-microamp: 55 adi,gpio-out-pol: [all …]
|
/openbmc/linux/drivers/gpio/ |
H A D | gpio-xlp.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2003-2015 Broadcom Corporation 7 #include <linux/gpio/driver.h> 16 * XLP GPIO has multiple 32 bit registers for each feature where each register 17 * controls 32 pins. So, pins up to 64 require 2 32-bit registers and up to 96 18 * require 3 32-bit registers for each feature. 23 * offset = (gpio / XLP_GPIO_REGSZ) * 4; 26 * where addr is base address of the that feature register and gpio is the pin. 68 static int xlp_gpio_get_reg(void __iomem *addr, unsigned gpio) in xlp_gpio_get_reg() argument 72 pos = gpio % XLP_GPIO_REGSZ; in xlp_gpio_get_reg() [all …]
|
H A D | gpio-grgpio.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * This driver supports the GRGPIO GPIO core available in the GRLIB VHDL 13 * See "Documentation/devicetree/bindings/gpio/gpio-grgpio.txt" for 26 #include <linux/gpio/driver.h> 45 /* Structure for an irq of the core - called an underlying irq */ 48 u8 uirq; /* Underlying irq of the gpio driver */ 52 * Structure for an irq of a gpio line handed out by this driver. The index is 56 s8 index; /* Index into struct grgpio_priv's uirqs, or -1 */ 57 u8 irq; /* irq for the gpio line */ 68 * The grgpio core can have multiple "underlying" irqs. The gpio lines [all …]
|
H A D | gpio-dwapb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/gpio/driver.h> 25 #include "gpiolib-acpi.h" 47 #define DWAPB_DRIVER_NAME "gpio-dwapb" 83 /* Store GPIO context across system-wide suspend/resume transitions */ 105 struct dwapb_gpio *gpio; member 112 (container_of(_gc, struct dwapb_gpio_port, gc)->gpio) 142 static inline u32 gpio_reg_convert(struct dwapb_gpio *gpio, unsigned int offset) in gpio_reg_convert() argument 144 if ((gpio->flags & GPIO_REG_OFFSET_MASK) == GPIO_REG_OFFSET_V2) in gpio_reg_convert() 150 static inline u32 dwapb_read(struct dwapb_gpio *gpio, unsigned int offset) in dwapb_read() argument [all …]
|
/openbmc/linux/drivers/mfd/ |
H A D | wm8350-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * wm8350-core.c -- Device access for Wolfson WM8350 15 #include <linux/mfd/wm8350/gpio.h> 18 static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir) in gpio_set_dir() argument 26 1 << gpio); in gpio_set_dir() 30 1 << gpio); in gpio_set_dir() 35 static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db) in wm8350_gpio_set_debounce() argument 39 1 << gpio); in wm8350_gpio_set_debounce() 42 WM8350_GPIO_DEBOUNCE, 1 << gpio); in wm8350_gpio_set_debounce() 45 static int gpio_set_func(struct wm8350 *wm8350, int gpio, int func) in gpio_set_func() argument [all …]
|
H A D | arizona-spi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * arizona-spi.c -- Arizona SPI bus interface 12 #include <linux/gpio/consumer.h> 13 #include <linux/gpio/machine.h> 21 #include <uapi/linux/input-event-codes.h> 32 { "reset-gpios", &reset_gpios, 1, }, 33 { "wlf,ldoena-gpios", &ldoena_gpios, 1 }, 38 * The ACPI resources for the device only describe external GPIO-s. They do 39 * not provide mappings for the GPIO-s coming from the Arizona codec itself. 42 { "arizona", 2, "wlf,spkvdd-ena", 0, GPIO_ACTIVE_HIGH }, [all …]
|
/openbmc/u-boot/include/ |
H A D | smsc_sio1007.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 10 * The I/O base address of SIO1007 at power-up is determined by the SYSOPT0 58 /* Number of gpio pins supported */ 84 * Configure the direction/polority/type of a specified GPIO pin 87 * @gpio: GPIO number (0-7 for GP10-GP17, 8-15 for GP30-GP37) 89 * @pol: GPIO_POL_NO_INVERT or GPIO_POL_INVERT 92 void sio1007_gpio_config(int port, int gpio, int dir, int pol, int type); 95 * Get a GPIO pin value. 96 * This will work whether the GPIO is an input or an output. 99 * @gpio: GPIO number (0-7 for GP10-GP17, 8-15 for GP30-GP37) [all …]
|
/openbmc/u-boot/drivers/misc/ |
H A D | smsc_sio1007.c | 1 // SPDX-License-Identifier: GPL-2.0+ 67 void sio1007_gpio_config(int port, int gpio, int dir, int pol, int type) in sio1007_gpio_config() argument 71 if (gpio < 0 || gpio > SIO1007_GPIO_NUM) in sio1007_gpio_config() 73 if (gpio >= GPIO_NUM_PER_GROUP) { in sio1007_gpio_config() 75 gpio -= GPIO_NUM_PER_GROUP; in sio1007_gpio_config() 81 /* set gpio pin direction, polority and type */ in sio1007_gpio_config() 82 sio1007_clrsetbits(port, reg, 1 << gpio, dir << gpio); in sio1007_gpio_config() 83 sio1007_clrsetbits(port, reg + 1, 1 << gpio, pol << gpio); in sio1007_gpio_config() 84 sio1007_clrsetbits(port, reg + 2, 1 << gpio, type << gpio); in sio1007_gpio_config() 90 int sio1007_gpio_get_value(int port, int gpio) in sio1007_gpio_get_value() argument [all …]
|
/openbmc/linux/drivers/input/touchscreen/ |
H A D | wm97xx-core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * wm97xx-core.c -- Touch screen driver core for Wolfson WM9705, WM9712 15 * - supports WM9705, WM9712, WM9713 16 * - polling mode 17 * - continuous mode (arch-dependent) 18 * - adjustable rpu/dpp settings 19 * - adjustable pressure current 20 * - adjustable sample settle delay 21 * - 4 and 5 wire touchscreens (5 wire is WM9712 only) 22 * - pen down detection [all …]
|
/openbmc/linux/drivers/ssb/ |
H A D | driver_gpio.c | 3 * GPIO driver 6 * Copyright 2012, Hauke Mehrtens <hauke@hauke-m.de> 13 #include <linux/gpio/driver.h> 26 static int ssb_gpio_to_irq(struct gpio_chip *chip, unsigned int gpio) in ssb_gpio_to_irq() argument 30 if (bus->bustype == SSB_BUSTYPE_SSB) in ssb_gpio_to_irq() 31 return irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_to_irq() 33 return -EINVAL; in ssb_gpio_to_irq() 41 static int ssb_gpio_chipco_get_value(struct gpio_chip *chip, unsigned int gpio) in ssb_gpio_chipco_get_value() argument 45 return !!ssb_chipco_gpio_in(&bus->chipco, 1 << gpio); in ssb_gpio_chipco_get_value() 48 static void ssb_gpio_chipco_set_value(struct gpio_chip *chip, unsigned int gpio, in ssb_gpio_chipco_set_value() argument [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/extcon/ |
H A D | wlf,arizona.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - patches@opensource.cirrus.com 20 wlf,hpdet-channel: 30 wlf,use-jd2: 35 wlf,use-jd2-nopull: 40 wlf,jd-invert: 45 wlf,micd-software-compare: 50 wlf,micd-detect-debounce: [all …]
|
/openbmc/linux/drivers/bcma/ |
H A D | driver_gpio.c | 3 * GPIO driver 6 * Copyright 2012, Hauke Mehrtens <hauke@hauke-m.de> 11 #include <linux/gpio/driver.h> 22 static int bcma_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in bcma_gpio_get_value() argument 26 return !!bcma_chipco_gpio_in(cc, 1 << gpio); in bcma_gpio_get_value() 29 static void bcma_gpio_set_value(struct gpio_chip *chip, unsigned gpio, in bcma_gpio_set_value() argument 34 bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0); in bcma_gpio_set_value() 37 static int bcma_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) in bcma_gpio_direction_input() argument 41 bcma_chipco_gpio_outen(cc, 1 << gpio, 0); in bcma_gpio_direction_input() 45 static int bcma_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, in bcma_gpio_direction_output() argument [all …]
|
/openbmc/linux/drivers/net/ethernet/wangxun/txgbe/ |
H A D | txgbe_phy.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2015 - 2023 Beijing WangXun Technology Co., Ltd. */ 4 #include <linux/gpio/machine.h> 5 #include <linux/gpio/driver.h> 6 #include <linux/gpio/property.h> 7 #include <linux/clk-provider.h> 13 #include <linux/pcs/pcs-xpcs.h> 25 struct txgbe_nodes *nodes = &txgbe->nodes; in txgbe_swnodes_register() 26 struct pci_dev *pdev = txgbe->wx->pdev; in txgbe_swnodes_register() 32 snprintf(nodes->gpio_name, sizeof(nodes->gpio_name), "txgbe_gpio-%x", id); in txgbe_swnodes_register() [all …]
|
/openbmc/u-boot/board/BuR/common/ |
H A D | common.c | 1 // SPDX-License-Identifier: GPL-2.0+ 8 * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com 19 #include <asm/arch/gpio.h> 23 #include <asm/gpio.h> 28 #include "../../../drivers/video/am335x-fb.h" 32 /* --------------------------------------------------------------------------*/ 57 case 0: /* PMIC LED-Driver */ in lcdbacklight() 70 timerhw->tiocp_cfg = TCFG_RESET; in lcdbacklight() 72 while (timerhw->tiocp_cfg & TCFG_RESET) in lcdbacklight() 74 tmp = ~0UL-(V_OSCK/pwmfrq); /* bottom value */ in lcdbacklight() [all …]
|
/openbmc/linux/include/dt-bindings/sound/ |
H A D | cs35l45.h | 1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 3 * cs35l45.h -- CS35L45 ALSA SoC audio driver DT bindings header 12 * cirrus,asp-sdout-hiz-ctrl 14 * TX_HIZ_UNUSED: TX pin high-impedance during unused slots. 15 * TX_HIZ_DISABLED: TX pin high-impedance when all channels disabled. 21 * Optional GPIOX Sub-nodes: 22 * The cs35l45 node can have up to three "cirrus,gpio-ctrlX" ('X' = [1,2,3]) 23 * sub-nodes for configuring the GPIO pins. 25 * - gpio-dir : GPIO pin direction. Valid only when 'gpio-ctrl' 30 * - gpio-lvl : GPIO level. Valid only when 'gpio-ctrl' is 1 and 'gpio-dir' is 0. [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/sound/ |
H A D | cs35l36.txt | 5 - compatible : "cirrus,cs35l36" 7 - reg : the I2C address of the device for I2C 9 - VA-supply, VP-supply : power supplies for the device, 13 - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost 18 - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA. 24 - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value. 32 - cirrus,multi-amp-mode : Boolean to determine if there are more than 33 one amplifier in the system. If more than one it is best to Hi-Z the ASP 36 - cirrus,boost-ctl-select : Boost converter control source selection. 39 0x00 - Control Port Value [all …]
|
H A D | cirrus,cs35l45.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Ricardo Rivera-Matos <rriveram@opensource.cirrus.com> 11 - Richard Fitzgerald <rf@opensource.cirrus.com> 18 - $ref: dai-common.yaml# 23 - cirrus,cs35l45 28 '#sound-dai-cells': 31 reset-gpios: 34 vdd-a-supply: [all …]
|
/openbmc/u-boot/doc/device-tree-bindings/leds/ |
H A D | leds-bcm6358.txt | 5 which can either be controlled by software (exporting the 74x164 as spi-gpio. 6 See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or 10 - compatible : should be "brcm,bcm6358-leds". 11 - #address-cells : must be 1. 12 - #size-cells : must be 0. 13 - reg : BCM6358 LED controller address and size. 16 - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8. 18 - brcm,clk-dat-low : Boolean, makes clock and data signals active low. 21 Each LED is represented as a sub-node of the brcm,bcm6358-leds device. 23 LED sub-node required properties: [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/mfd/ |
H A D | wlf,arizona.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - patches@opensource.cirrus.com 17 - $ref: /schemas/spi/spi-peripheral-props.yaml 18 - $ref: /schemas/sound/wlf,arizona.yaml# 19 - $ref: /schemas/regulator/wlf,arizona.yaml# 20 - $ref: /schemas/extcon/wlf,arizona.yaml# 21 - if: 26 - cirrus,cs47l24 [all …]
|
/openbmc/linux/drivers/hwmon/ |
H A D | ltc2947-core.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include <linux/hwmon-sysfs.h> 65 #define VOLTAGE_MIN -300 76 #define CURRENT_MIN -30000 85 #define POWER_MIN -450000000 97 #define TEMP_MIN -40000 107 #define LTC2947_ALERTS_SIZE (LTC2947_REG_STATVDVCC - LTC2947_REG_STATUS) 125 * complete sequence select_page->read/write needs to be protected. 138 ret = regmap_bulk_read(st->map, reg, &__val, 2); in __ltc2947_val_read16() 153 ret = regmap_bulk_read(st->map, reg, &__val, 3); in __ltc2947_val_read24() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/leds/ |
H A D | leds-bcm6358.txt | 5 which can either be controlled by software (exporting the 74x164 as spi-gpio. 6 See Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or 10 - compatible : should be "brcm,bcm6358-leds". 11 - #address-cells : must be 1. 12 - #size-cells : must be 0. 13 - reg : BCM6358 LED controller address and size. 16 - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8. 18 - brcm,clk-dat-low : Boolean, makes clock and data signals active low. 21 Each LED is represented as a sub-node of the brcm,bcm6358-leds device. 23 LED sub-node required properties: [all …]
|
/openbmc/linux/include/linux/mfd/wm8350/ |
H A D | gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * gpio.h -- GPIO Driver for Wolfson WM8350 PMIC 14 * GPIO Registers. 30 * GPIO Functions 172 * R30 (0x1E) - GPIO Interrupt Status 190 * R128 (0x80) - GPIO Debounce 207 * R129 (0x81) - GPIO Pin pull up Control 224 * R130 (0x82) - GPIO Pull down Control 241 * R131 (0x83) - GPIO Interrupt Mode 258 * R133 (0x85) - GPIO Control [all …]
|
/openbmc/u-boot/board/teejet/mt_ventoux/ |
H A D | mt_ventoux.c | 1 // SPDX-License-Identifier: GPL-2.0+ 24 #include <asm/gpio.h> 27 #include <asm/ehci-omap.h> 65 .pol_freq = 0x00003000, /* Pol Freq */ 76 .pol_freq = 0x00004000, /* Pol Freq */ 143 debug("%s:%d: FPGA pre-configuration\n", __func__, __LINE__); in fpga_pre_config_fn() 168 debug("%s:%d: FPGA post-configuration\n", __func__, __LINE__); in fpga_post_config_fn() 211 enable_gpmc_cs_config(gpmc_fpga, &gpmc_cfg->cs[1], in mt_ventoux_init_fpga() 227 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); in board_init() 284 * Initializes on-chip ethernet controllers. [all …]
|
/openbmc/u-boot/board/htkw/mcx/ |
H A D | mcx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 #include <asm/mach-types.h> 15 #include <asm/gpio.h> 23 #include <asm/ehci-omap.h> 62 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); in board_init() 72 if (gpio_request(HOT_WATER_BUTTON, "hot-water-button") < 0) { in board_late_init() 73 puts("Failed to get hot-water-button pin\n"); in board_late_init() 74 return -ENODEV; in board_late_init() 79 * if hot-water-button is pressed in board_late_init() 105 return omap_mmc_init(0, 0, 0, -1, -1); in board_mmc_init() [all …]
|
/openbmc/linux/drivers/pinctrl/qcom/ |
H A D | pinctrl-msm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/gpio/driver.h> 24 #include <linux/pinctrl/pinconf-generic.h> 32 #include "../pinctrl-utils.h" 34 #include "pinctrl-msm.h" 41 * struct msm_pinctrl - state for a pinctrl-msm device 87 return readl(pctrl->regs[g->tile] + g->name##_reg); \ 92 writel(val, pctrl->regs[g->tile] + g->name##_reg); \ 104 u32 val = g->intr_ack_high ? BIT(g->intr_status_bit) : 0; in MSM_ACCESSOR() 113 return pctrl->soc->ngroups; in msm_get_groups_count() [all …]
|