Home
last modified time | relevance | path

Searched +full:pin +full:- +full:val (Results 1 – 25 of 1073) sorted by relevance

12345678910>>...43

/Linux-v6.1/drivers/pinctrl/qcom/
Dpinctrl-ssbi-gpio.c1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/pinctrl/pinconf-generic.h>
20 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
23 #include "../pinctrl-utils.h"
57 * struct pm8xxx_pin_data - dynamic configuration for a pin
61 * @mode: operating mode for the pin (input/output)
62 * @open_drain: output buffer configured as open-drain (vs push-pull)
67 * @output_strength: selector of output-strength
68 * @disable: pin disabled / configured as tristate
70 * @inverted: pin logic is inverted
[all …]
Dpinctrl-spmi-mpp.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
10 #include <linux/pinctrl/pinconf-generic.h>
18 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
21 #include "../pinctrl-utils.h"
26 * Pull Up Values - it indicates whether a pull-up should be
97 /* Qualcomm specific pin configurations */
104 * struct pmic_mpp_pad - keep current MPP settings
107 * @out_value: Cached pin output value.
110 * @paired: Pin operates in paired mode
[all …]
Dpinctrl-lpass-lpi.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
11 #include <linux/pinctrl/pinconf-generic.h>
14 #include "../pinctrl-utils.h"
15 #include "pinctrl-lpass-lpi.h"
31 static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin, in lpi_gpio_read() argument
34 return ioread32(state->tlmm_base + LPI_TLMM_REG_OFFSET * pin + addr); in lpi_gpio_read()
37 static int lpi_gpio_write(struct lpi_pinctrl *state, unsigned int pin, in lpi_gpio_write() argument
38 unsigned int addr, unsigned int val) in lpi_gpio_write() argument
40 iowrite32(val, state->tlmm_base + LPI_TLMM_REG_OFFSET * pin + addr); in lpi_gpio_write()
[all …]
Dpinctrl-spmi-gpio.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2012-2014, 2016-2021 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
12 #include <linux/pinctrl/pinconf-generic.h>
21 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
24 #include "../pinctrl-utils.h"
97 * Output type - indicates pin should be configured as push-pull,
115 /* Qualcomm specific pin configurations */
137 * struct pmic_gpio_pad - keep current GPIO settings
140 * @out_value: Cached pin output value
[all …]
/Linux-v6.1/drivers/net/dsa/mv88e6xxx/
Dglobal2_scratch.c1 // SPDX-License-Identifier: GPL-2.0-or-later
45 * mv88e6xxx_g2_scratch_get_bit - get a bit
57 u8 val; in mv88e6xxx_g2_scratch_get_bit() local
60 err = mv88e6xxx_g2_scratch_read(chip, reg, &val); in mv88e6xxx_g2_scratch_get_bit()
64 *set = !!(mask & val); in mv88e6xxx_g2_scratch_get_bit()
70 * mv88e6xxx_g2_scratch_set_bit - set (or clear) a bit
84 u8 val; in mv88e6xxx_g2_scratch_set_bit() local
87 err = mv88e6xxx_g2_scratch_read(chip, reg, &val); in mv88e6xxx_g2_scratch_set_bit()
92 val |= mask; in mv88e6xxx_g2_scratch_set_bit()
94 val &= ~mask; in mv88e6xxx_g2_scratch_set_bit()
[all …]
/Linux-v6.1/drivers/gpio/
Dgpio-zevio.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Author: Fabian Vogt <fabian@ritter-vogt.de>
23 …* http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#90000000_-_General_Purpose_I.…
25 * 0x00-0x3F: Section 0
26 * +0x00: Masked interrupt status (read-only)
29 * +0x0C: W: Unmask interrupt (write-only)
32 * +0x18: Input (read-only)
34 * 0x40-0x7F: Section 1
35 * 0x80-0xBF: Section 2
36 * 0xC0-0xFF: Section 3
[all …]
Dgpio-sama5d2-piobu.c1 // SPDX-License-Identifier: GPL-2.0
53 * sama5d2_piobu_setup_pin() - prepares a pin for set_direction call
55 * Do not consider pin for tamper detection (normal and backup modes)
56 * Do not consider pin as tamper wakeup interrupt source
58 static int sama5d2_piobu_setup_pin(struct gpio_chip *chip, unsigned int pin) in sama5d2_piobu_setup_pin() argument
63 unsigned int mask = BIT(PIOBU_DET_OFFSET + pin); in sama5d2_piobu_setup_pin()
65 ret = regmap_update_bits(piobu->regmap, PIOBU_BMPR, mask, 0); in sama5d2_piobu_setup_pin()
69 ret = regmap_update_bits(piobu->regmap, PIOBU_NMPR, mask, 0); in sama5d2_piobu_setup_pin()
73 return regmap_update_bits(piobu->regmap, PIOBU_WKPR, mask, 0); in sama5d2_piobu_setup_pin()
77 * sama5d2_piobu_write_value() - writes value & mask at the pin's PIOBU register
[all …]
/Linux-v6.1/drivers/pinctrl/sprd/
Dpinctrl-sprd.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Spreadtrum pin controller driver
4 * Copyright (C) 2017 Spreadtrum - http://www.spreadtrum.com
18 #include <linux/pinctrl/pinconf-generic.h>
26 #include "../pinctrl-utils.h"
27 #include "pinctrl-sprd.h"
97 * struct sprd_pin: represent one pin's description
98 * @name: pin name
99 * @number: pin number
100 * @type: pin type, can be GLOBAL_CTRL_PIN/COMMON_PIN/MISC_PIN
[all …]
/Linux-v6.1/drivers/pinctrl/pxa/
Dpinctrl-pxa2xx.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Marvell PXA2xx family pin control
15 #include <linux/pinctrl/pinconf-generic.h>
21 #include "../pinctrl-utils.h"
22 #include "pinctrl-pxa2xx.h"
28 return pctl->ngroups; in pxa2xx_pctrl_get_groups_count()
35 struct pxa_pinctrl_group *group = pctl->groups + tgroup; in pxa2xx_pctrl_get_group_name()
37 return group->name; in pxa2xx_pctrl_get_group_name()
46 struct pxa_pinctrl_group *group = pctl->groups + tgroup; in pxa2xx_pctrl_get_group_pins()
48 *pins = (unsigned *)&group->pin; in pxa2xx_pctrl_get_group_pins()
[all …]
/Linux-v6.1/drivers/usb/misc/
Dbrcmstb-usb-pinmap.c1 // SPDX-License-Identifier: GPL-2.0
44 u32 val; in pinmap_set() local
46 val = readl(reg); in pinmap_set()
47 val |= mask; in pinmap_set()
48 writel(val, reg); in pinmap_set()
53 u32 val; in pinmap_unset() local
55 val = readl(reg); in pinmap_unset()
56 val &= ~mask; in pinmap_unset()
57 writel(val, reg); in pinmap_unset()
60 static void sync_in_pin(struct in_pin *pin) in sync_in_pin() argument
[all …]
/Linux-v6.1/drivers/pinctrl/visconti/
Dpinctrl-common.c1 // SPDX-License-Identifier: GPL-2.0
15 #include <linux/pinctrl/pinconf-generic.h>
16 #include "pinctrl-common.h"
19 #include "../pinctrl-utils.h"
42 const struct visconti_desc_pin *pin = &priv->devdata->pins[_pin]; in visconti_pin_config_set() local
46 unsigned int val, set_val, pude_val; in visconti_pin_config_set() local
49 dev_dbg(priv->dev, "%s: pin = %d (%s)\n", __func__, _pin, pin->pin.name); in visconti_pin_config_set()
51 spin_lock_irqsave(&priv->lock, flags); in visconti_pin_config_set()
64 val = readl(priv->base + pin->pudsel_offset); in visconti_pin_config_set()
65 val &= ~BIT(pin->pud_shift); in visconti_pin_config_set()
[all …]
/Linux-v6.1/drivers/pinctrl/
Dpinctrl-keembay.c1 // SPDX-License-Identifier: GPL-2.0
12 #include <linux/pinctrl/pinconf-generic.h>
58 #define KEEMBAY_GPIO_REG_OFFSET(pin) ((pin) * 4) argument
61 * struct keembay_mux_desc - Mux properties of each GPIO pin
62 * @mode: Pin mode when operating in this function
63 * @name: Pin function name
83 * struct keembay_gpio_irq - Config of each GPIO Interrupt sources
84 * @source: Interrupt source number (0 - 7)
99 * struct keembay_pinctrl - Intel Keembay pinctrl structure
100 * @pctrl: Pointer to the pin controller device
[all …]
Dpinctrl-pistachio.c1 // SPDX-License-Identifier: GPL-2.0-only
15 #include <linux/pinctrl/pinconf-generic.h>
23 #include "pinctrl-utils.h"
26 #define PADS_SCHMITT_EN_REG(pin) (PADS_SCHMITT_EN0 + 0x4 * ((pin) / 32)) argument
27 #define PADS_SCHMITT_EN_BIT(pin) BIT((pin) % 32) argument
30 #define PADS_PU_PD_REG(pin) (PADS_PU_PD0 + 0x4 * ((pin) / 16)) argument
31 #define PADS_PU_PD_SHIFT(pin) (2 * ((pin) % 16)) argument
44 #define PADS_SLEW_RATE_REG(pin) (PADS_SLEW_RATE0 + 0x4 * ((pin) / 32)) argument
45 #define PADS_SLEW_RATE_BIT(pin) BIT((pin) % 32) argument
48 #define PADS_DRIVE_STRENGTH_REG(pin) \ argument
[all …]
Dpinctrl-max77620.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * MAX77620 pin control driver.
20 #include <linux/pinctrl/pinconf-generic.h>
26 #include "pinctrl-utils.h"
52 .property = "maxim,active-fps-source",
55 .property = "maxim,active-fps-power-up-slot",
58 .property = "maxim,active-fps-power-down-slot",
61 .property = "maxim,suspend-fps-source",
64 .property = "maxim,suspend-fps-power-up-slot",
67 .property = "maxim,suspend-fps-power-down-slot",
[all …]
/Linux-v6.1/sound/pci/lola/
Dlola_mixer.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Support for Digigram Lola PCI-e boards
18 static int lola_init_pin(struct lola *chip, struct lola_pin *pin, in lola_init_pin() argument
21 unsigned int val; in lola_init_pin() local
24 pin->nid = nid; in lola_init_pin()
25 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_pin()
27 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); in lola_init_pin()
30 val &= 0x00f00fff; /* test TYPE and bits 0..11 */ in lola_init_pin()
31 if (val == 0x00400200) /* Type = 4, Digital = 1 */ in lola_init_pin()
32 pin->is_analog = false; in lola_init_pin()
[all …]
/Linux-v6.1/drivers/pinctrl/stm32/
Dpinctrl-stm32.c1 // SPDX-License-Identifier: GPL-2.0
23 #include <linux/pinctrl/pinconf-generic.h>
34 #include "../pinctrl-utils.h"
35 #include "pinctrl-stm32.h"
49 /* custom bitfield to backup pin status */
83 unsigned pin; member
148 return function - 1; in stm32_gpio_get_alt()
159 bank->pin_backup[offset] &= ~BIT(STM32_GPIO_BKP_VAL); in stm32_gpio_backup_value()
160 bank->pin_backup[offset] |= value << STM32_GPIO_BKP_VAL; in stm32_gpio_backup_value()
166 bank->pin_backup[offset] &= ~(STM32_GPIO_BKP_MODE_MASK | in stm32_gpio_backup_mode()
[all …]
/Linux-v6.1/drivers/pinctrl/sunxi/
Dpinctrl-sunxi.c6 * Maxime Ripard <maxime.ripard@free-electrons.com>
28 #include <linux/pinctrl/pinconf-generic.h>
34 #include <dt-bindings/pinctrl/sun4i-a10.h>
37 #include "pinctrl-sunxi.h"
52 * - Mux config
53 * - Data value
54 * - Drive level
55 * - Pull direction
60 * They take a pin number which is relative to the start of the current device.
63 u32 pin, u32 *reg, u32 *shift, u32 *mask) in sunxi_mux_reg() argument
[all …]
/Linux-v6.1/drivers/leds/
Dleds-bcm6328.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for BCM6328 memory-mapped LEDs, based on leds-syscon.c
59 * struct bcm6328_led - state container for bcm6328 based LEDs
63 * @pin: LED pin number
72 unsigned long pin; member
98 * bits [31:0] -> LEDs 8-23
99 * bits [47:32] -> LEDs 0-7
100 * bits [63:48] -> unused
102 static unsigned long bcm6328_pin2shift(unsigned long pin) in bcm6328_pin2shift() argument
104 if (pin < 8) in bcm6328_pin2shift()
[all …]
/Linux-v6.1/drivers/pinctrl/meson/
Dpinctrl-meson.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Pin controller and GPIO driver for Amlogic Meson SoCs
14 * The AO bank is special because it belongs to the Always-On power
18 * For each pin controller there are 4 different register ranges that
20 * 1) pin muxing
47 #include <linux/pinctrl/pinconf-generic.h>
57 #include "../pinctrl-utils.h"
58 #include "pinctrl-meson.h"
65 * meson_get_bank() - find the bank containing a given pin
68 * @pin: the pin number
[all …]
/Linux-v6.1/drivers/pinctrl/spear/
Dpinctrl-plgpio.c27 #define PIN_OFFSET(pin) (pin % MAX_GPIO_PER_REG) argument
28 #define REG_OFFSET(base, reg, pin) (base + reg + (pin / MAX_GPIO_PER_REG) \ argument
59 * p2o: function ptr for pin to offset conversion. This is required only for
60 * machines where mapping b/w pin and offset is not 1-to-1.
61 * o2p: function ptr for offset to pin conversion. This is required only for
62 * machines where mapping b/w pin and offset is not 1-to-1.
72 int (*p2o)(int pin); /* pin_to_offset */
82 static inline u32 is_plgpio_set(struct regmap *regmap, u32 pin, u32 reg) in is_plgpio_set() argument
84 u32 offset = PIN_OFFSET(pin); in is_plgpio_set()
85 u32 reg_off = REG_OFFSET(0, reg, pin); in is_plgpio_set()
[all …]
/Linux-v6.1/drivers/pinctrl/uniphier/
Dpinctrl-uniphier-core.c1 // SPDX-License-Identifier: GPL-2.0+
3 // Copyright (C) 2015-2017 Socionext Inc.
10 #include <linux/pinctrl/pinconf-generic.h>
17 #include "../pinctrl-utils.h"
18 #include "pinctrl-uniphier.h"
47 return priv->socdata->groups_count; in uniphier_pctl_get_groups_count()
55 return priv->socdata->groups[selector].name; in uniphier_pctl_get_group_name()
65 *pins = priv->socdata->groups[selector].pins; in uniphier_pctl_get_group_pins()
66 *num_pins = priv->socdata->groups[selector].num_pins; in uniphier_pctl_get_group_pins()
78 switch (uniphier_pin_get_pull_dir(desc->drv_data)) { in uniphier_pctl_pin_dbg_show()
[all …]
/Linux-v6.1/drivers/pinctrl/freescale/
Dpinctrl-scu.c1 // SPDX-License-Identifier: GPL-2.0+
4 * Copyright 2017-2018 NXP
16 #include "pinctrl-imx.h"
25 u32 val; member
36 u32 val; member
55 hdr->ver = IMX_SC_RPC_VERSION; in imx_pinconf_get_scu()
56 hdr->svc = IMX_SC_RPC_SVC_PAD; in imx_pinconf_get_scu()
57 hdr->func = IMX_SC_PAD_FUNC_GET; in imx_pinconf_get_scu()
58 hdr->size = 2; in imx_pinconf_get_scu()
67 *config = resp->val; in imx_pinconf_get_scu()
[all …]
/Linux-v6.1/drivers/pinctrl/bcm/
Dpinctrl-ns2-mux.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * corresponding mfio pin group is selected as gpio.
13 #include <linux/pinctrl/pinconf-generic.h>
20 #include "../pinctrl-utils.h"
85 * Northstar2 mux function and supported pin groups
131 * Pin configuration info
137 * @pull_shift: pull-up/pull-down control bit shift in the register
150 * Description of a pin in Northstar2
152 * @pin: pin number
153 * @name: pin name
[all …]
/Linux-v6.1/drivers/media/usb/dvb-usb-v2/
Dmxl111sf-gpio.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * mxl111sf-gpio.c - driver for the MaxLinear MXL111SF
5 * Copyright (C) 2010-2014 Michael Krufky <mkrufky@linuxtv.org>
8 #include "mxl111sf-gpio.h"
9 #include "mxl111sf-i2c.h"
12 /* ------------------------------------------------------------------------- */
22 static int mxl111sf_set_gpo_state(struct mxl111sf_state *state, u8 pin, u8 val) in mxl111sf_set_gpo_state() argument
27 mxl_debug_adv("(%d, %d)", pin, val); in mxl111sf_set_gpo_state()
29 if ((pin > 0) && (pin < 8)) { in mxl111sf_set_gpo_state()
33 tmp &= ~(1 << (pin - 1)); in mxl111sf_set_gpo_state()
[all …]
/Linux-v6.1/sound/pci/hda/
Dhda_generic.c1 // SPDX-License-Identifier: GPL-2.0-or-later
32 * snd_hda_gen_spec_init - initialize hda_gen_spec struct
39 snd_array_init(&spec->kctls, sizeof(struct snd_kcontrol_new), 32); in snd_hda_gen_spec_init()
40 snd_array_init(&spec->paths, sizeof(struct nid_path), 8); in snd_hda_gen_spec_init()
41 snd_array_init(&spec->loopback_list, sizeof(struct hda_amp_list), 8); in snd_hda_gen_spec_init()
42 mutex_init(&spec->pcm_mutex); in snd_hda_gen_spec_init()
48 * snd_hda_gen_add_kctl - Add a new kctl_new struct from the template
62 struct snd_kcontrol_new *knew = snd_array_new(&spec->kctls); in snd_hda_gen_add_kctl()
67 knew->name = kstrdup(name, GFP_KERNEL); in snd_hda_gen_add_kctl()
68 else if (knew->name) in snd_hda_gen_add_kctl()
[all …]

12345678910>>...43