| /linux/Documentation/devicetree/bindings/pwm/ |
| H A D | microchip,corepwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/pwm/microchip,corepwm.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Conor Dooley <conor.dooley@microchip.com> 16 https://www.microsemi.com/existing-parts/parts/152118 19 - $ref: pwm.yaml# 24 - const: microchip,corepwm-rtl-v4 32 "#pwm-cells": 37 microchip,sync-update-mask: [all …]
|
| /linux/drivers/pwm/ |
| H A D | pwm-stm32.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Inspired by timer-stm32.c from Maxime Coquelin 8 * pwm-atmel.c from Bo Shen 12 #include <linux/mfd/stm32-timers.h> 17 #include <linux/pwm.h> 31 struct mutex lock; /* protect pwm config/enable */ 50 regmap_read(dev->regmap, TIM_CCER, &ccer); in active_channels() 63 struct pwm_device *pwm, in stm32_pwm_round_waveform_tohw() argument 69 unsigned int ch = pwm->hwpwm; in stm32_pwm_round_waveform_tohw() 74 if (wf->period_length_ns == 0) { in stm32_pwm_round_waveform_tohw() [all …]
|
| H A D | pwm-stm32-lp.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * STM32 Low-Power Timer PWM driver 9 * Inspired by Gerald Baeza's pwm-stm32 driver 13 #include <linux/mfd/stm32-lptimer.h> 18 #include <linux/pwm.h> 31 /* STM32 Low-Power Timer is preceded by a configurable power-of-2 prescaler */ 40 /* Only one PWM on this LPTIMER: enable, prescaler and reload value can be changed */ in stm32_pwm_lp_update_allowed() 41 if (!priv->num_cc_chans) in stm32_pwm_lp_update_allowed() 44 ret = regmap_read(priv->regmap, STM32_LPTIM_CCMR1, &ccmr1); in stm32_pwm_lp_update_allowed() 66 u32 ccmr1, val, mask; in stm32_pwm_lp_compare_channel_apply() local [all …]
|
| H A D | pwm-jz4740.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> 4 * JZ4740 platform PWM support 7 * - The .apply callback doesn't complete the currently running period before 15 #include <linux/mfd/ingenic-tcu.h> 20 #include <linux/pwm.h> 39 /* Enable all TCU channels for PWM use by default except channels 0/1 */ in jz4740_pwm_can_use_chn() 40 u32 pwm_channels_mask = GENMASK(chip->npwm - 1, 2); in jz4740_pwm_can_use_chn() 42 device_property_read_u32(pwmchip_parent(chip)->parent, in jz4740_pwm_can_use_chn() 43 "ingenic,pwm-channels-mask", in jz4740_pwm_can_use_chn() [all …]
|
| H A D | pwm-meson.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 * PWM controller driver for Amlogic Meson SoCs. 5 * This PWM is only a set of Gates, Dividers and Counters: 6 * PWM output is achieved by calculating a clock that permits calculating 13 * Setting the duty cycle will disable and re-enable the PWM output. 14 * Disabling the PWM stops the output immediately (without waiting for the 17 * The public S912 (GXM) datasheet contains some documentation for this PWM 19 * https://dl.khadas.com/Hardware/VIM2/Datasheet/S912_Datasheet_V0.220170314publicversion-Wesion.pdf 23 * https://dn.odroid.com/S922X/ODROID-N2/Datasheet/S922X_Public_Datasheet_V0.2.pdf 33 #include <linux/clk-provider.h> [all …]
|
| H A D | pwm-microchip-core.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (c) 2021-2023 Microchip Corporation. All rights reserved. 8 * https://www.microsemi.com/document-portal/doc_download/1245275-corepwm-hb 11 * - If the IP block is configured without "shadow registers", all register 16 * will take effective immediately, even for those channels. 19 * - The IP block has no concept of a duty cycle, only rising/falling edges of 28 * - The PWM period is set for the whole IP block not per channel. The driver 29 * will only change the period if no other PWM output is enabled. 41 #include <linux/pwm.h> 68 static void mchp_core_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm, in mchp_core_pwm_enable() argument [all …]
|
| /linux/drivers/mfd/ |
| H A D | lp3943.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * LP3943 is an integrated device capable of driving 16 output channels. 11 * It can be used for a GPIO expander and PWM generators. 16 * LP3943 MFD ---- GPIO expander leds-gpio eg) HW enable pin 18 * --- PWM generator leds-pwm eg) PWM input 20 * Internal two PWM channels are used for LED dimming effect. 23 * LEDs can be controlled with legacy leds-gpio(static brightness) or 24 * leds-pwm drivers(dynamic brightness control). 25 * Alternatively, it can be used for generic GPIO and PWM controller. 27 * A PWM is input pin of a backlight device. [all …]
|
| /linux/drivers/clocksource/ |
| H A D | samsung_pwm_timer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * samsung - Common hr-timer support (s3c and s5p) 45 * bits (one channel) after channel 0, so channels have different numbering 49 * in its set of bits is 2 as opposed to 3 for other channels. 79 static struct samsung_pwm_clocksource pwm; variable 92 reg = readl(pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 94 reg |= (prescale - 1) << shift; in samsung_timer_set_prescale() 95 writel(reg, pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 107 bits = (fls(divisor) - 1) - pwm.variant.div_base; in samsung_timer_set_divisor() 111 reg = readl(pwm.base + REG_TCFG1); in samsung_timer_set_divisor() [all …]
|
| H A D | ingenic-timer.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <linux/mfd/ingenic-tcu.h> 23 #include <dt-bindings/clock/ingenic,tcu.h> 56 regmap_read(tcu->map, TCU_REG_TCNTc(tcu->cs_channel), &count); in ingenic_tcu_timer_read() 69 return container_of(timer, struct ingenic_tcu, timers[timer->cpu]); in to_ingenic_tcu() 83 regmap_write(tcu->map, TCU_REG_TECR, BIT(timer->channel)); in ingenic_tcu_cevt_set_state_shutdown() 95 return -EINVAL; in ingenic_tcu_cevt_set_next() 97 regmap_write(tcu->map, TCU_REG_TDFRc(timer->channel), next); in ingenic_tcu_cevt_set_next() 98 regmap_write(tcu->map, TCU_REG_TCNTc(timer->channel), 0); in ingenic_tcu_cevt_set_next() 99 regmap_write(tcu->map, TCU_REG_TESR, BIT(timer->channel)); in ingenic_tcu_cevt_set_next() [all …]
|
| /linux/Documentation/devicetree/bindings/timer/ |
| H A D | ingenic,tcu.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 Documentation/arch/mips/ingenic-tcu.rst. 14 - Paul Cercueil <paul@crapouillou.net> 21 - ingenic,jz4740-tcu 22 - ingenic,jz4725b-tcu 23 - ingenic,jz4760-tcu 24 - ingenic,jz4760b-tcu 25 - ingenic,jz4770-tcu [all …]
|
| /linux/arch/arm64/boot/dts/amlogic/ |
| H A D | meson-g12a-sei510.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include "meson-g12a.dtsi" 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/gpio/meson-g12a-gpio.h> 12 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 19 compatible = "adc-keys"; 20 io-channels = <&saradc 0>; 21 io-channel-names = "buttons"; [all …]
|
| H A D | meson-g12b-bananapi.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 8 #include <dt-bindings/input/input.h> 9 #include <dt-bindings/leds/common.h> 10 #include <dt-bindings/gpio/meson-g12a-gpio.h> 11 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 21 stdout-path = "serial0:115200n8"; 29 adc-keys { 30 compatible = "adc-keys"; 31 io-channels = <&saradc 2>; 32 io-channel-names = "buttons"; [all …]
|
| H A D | meson-sm1-sei610.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include "meson-sm1.dtsi" 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/gpio/meson-g12a-gpio.h> 12 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 23 mono_dac: audio-codec-0 { 25 #sound-dai-cells = <0>; 26 sound-name-prefix = "U16"; [all …]
|
| /linux/arch/arm/boot/dts/intel/pxa/ |
| H A D | pxa3xx.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 7 (gpio <= 26) ? (0x027c + 4 * (gpio - 3)) : \ 8 (gpio <= 98) ? (0x0400 + 4 * (gpio - 27)) : \ 9 (gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \ 18 (gpio <= 26) ? (0x027c + 4 * (gpio - 3)) : \ 19 (gpio <= 29) ? (0x0400 + 4 * (gpio - 27)) : \ 20 (gpio <= 98) ? (0x0418 + 4 * (gpio - 30)) : \ 21 (gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \ 23 (gpio <= 268) ? (0x052c + 4 * (gpio - 263)) : \ 33 (gpio <= 9) ? (0x028c + 4 * (gpio - 5)) : \ [all …]
|
| /linux/include/linux/fsl/ |
| H A D | ftm.h | 1 // SPDX-License-Identifier: GPL-2.0 13 #define FTM_OUTINIT 0x5C /* Initial State For Channels Output */ 14 #define FTM_OUTMASK 0x60 /* Output Mask */ 15 #define FTM_COMBINE 0x64 /* Function For Linked Channels */ 18 #define FTM_POL 0x70 /* Channels Polarity */ 28 #define FTM_PWMLOAD 0x98 /* FTM PWM Load */ 57 * https://community.nxp.com/thread/467648#comment-1010319
|
| /linux/include/soc/at91/ |
| H A D | atmel_tcb.h | 17 * Many 32-bit Atmel SOCs include one or more TC blocks, each of which holds 18 * three general-purpose 16-bit timers. These timers share one register bank. 23 * clocks or clock gates, and per-timer TIOA and TIOB signals used for PWM 37 * struct atmel_tcb_config - SoC data for a Timer/Counter Block 50 * struct atmel_tc - information about a Timer/Counter Block 55 * @irq: irq for each of the three channels 56 * @clk: internal clock source for each of the three channels 61 * while on others, all TC channels share the same clock and IRQ. 80 /* platform-specific ATMEL_TC_TIMER_CLOCKx divisors (0 means 32KiHz) */ 85 * Two registers have block-wide controls. These are: configuring the three [all …]
|
| /linux/drivers/iio/adc/ |
| H A D | ad7606.c | 1 // SPDX-License-Identifier: GPL-2.0 18 #include <linux/pwm.h> 103 -128, 1, 127, 107 -512, 4, 508, 135 .name = "ad7605-4", 144 .name = "ad7606-8", 155 .name = "ad7606-6", 167 .name = "ad7606-4", 278 if (st->gpio_reset) { in ad7606_reset() 279 gpiod_set_value(st->gpio_reset, 1); in ad7606_reset() [all …]
|
| H A D | ad4695.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 #include <linux/iio/buffer-dmaengine.h> 30 #include <linux/pwm.h> 38 #include <dt-bindings/iio/adc/adi,ad4695.h> 107 /* Max number of voltage input channels. */ 139 /* currently PWM CNV only supported with SPI offload use */ 145 /* voltages channels plus temperature and timestamp */ 208 .name = "ad4695-8", 237 .name = "ad4695-16", 254 .tx_buf = st->regmap_bus_data, in ad4695_regmap_bus_reg_write() [all …]
|
| /linux/arch/arm/boot/dts/ti/omap/ |
| H A D | omap2.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/ 8 #include <dt-bindings/bus/ti-sysc.h> 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/pinctrl/omap.h> 15 interrupt-parent = <&intc>; 16 #address-cells = <1>; 17 #size-cells = <1>; 29 #address-cells = <0>; [all …]
|
| /linux/drivers/leds/ |
| H A D | leds-lp5562.c | 1 // SPDX-License-Identifier: GPL-2.0-only 18 #include <linux/platform_data/leds-lp55xx.h> 21 #include "leds-lp55xx-common.h" 32 #define LP5562_LOGARITHMIC_PWM 0x80 /* Logarithmic PWM adjustment */ 108 led->led_current = led_current; in lp5562_set_led_current() 109 lp55xx_write(led->chip, addr[led->chan_nr], led_current); in lp5562_set_led_current() 152 /* Initialize all channels PWM to zero -> leds off */ in lp5562_post_init_device() 158 /* Set LED map as register PWM by default */ in lp5562_post_init_device() 166 struct lp55xx_chip *chip = led->chip; in lp5562_multicolor_brightness() 176 guard(mutex)(&chip->lock); in lp5562_multicolor_brightness() [all …]
|
| H A D | leds-lp55xx-common.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 9 * Derived from leds-lp5521.c, leds-lp5523.c 15 #include <linux/led-class-multicolor.h> 103 * @val : Register value (can also used as mask or shift) 109 u8 mask; member 122 * @reg_led_pwm_base : Chip specific base reg address for LED PWM conf 128 * @max_channel : Maximum number of channels 140 const struct lp55xx_reg engine_busy; /* addr, mask */ 187 * @lock : Lock for user-space interface 197 struct mutex lock; /* lock for user-space interface */ [all …]
|
| /linux/arch/arm/boot/dts/renesas/ |
| H A D | r8a7790.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Device Tree Source for the R-Car H2 (R8A77900) SoC 6 * Copyright (C) 2013-2014 Renesas Solutions Corp. 10 #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 11 #include <dt-bindings/interrupt-controller/arm-gic.h> 12 #include <dt-bindings/interrupt-controller/irq.h> 13 #include <dt-bindings/power/r8a7790-sysc.h> 17 #address-cells = <2>; 18 #size-cells = <2>; 46 compatible = "fixed-clock"; [all …]
|
| H A D | r8a7791.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Device Tree Source for the R-Car M2-W (R8A77910) SoC 5 * Copyright (C) 2013-2015 Renesas Electronics Corporation 6 * Copyright (C) 2013-2014 Renesas Solutions Corp. 10 #include <dt-bindings/clock/r8a7791-cpg-mssr.h> 11 #include <dt-bindings/interrupt-controller/arm-gic.h> 12 #include <dt-bindings/interrupt-controller/irq.h> 13 #include <dt-bindings/power/r8a7791-sysc.h> 17 #address-cells = <2>; 18 #size-cells = <2>; [all …]
|
| /linux/arch/arm64/boot/dts/freescale/ |
| H A D | fsl-ls1028a.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * Device Tree Include file for NXP Layerscape-1028A family SoC. 5 * Copyright 2018-2020 NXP 11 #include <dt-bindings/clock/fsl,qoriq-clockgen.h> 12 #include <dt-bindings/interrupt-controller/arm-gic.h> 13 #include <dt-bindings/thermal/thermal.h> 17 interrupt-parent = <&gic>; 18 #address-cells = <2>; 19 #size-cells = <2>; 22 #address-cells = <1>; [all …]
|
| /linux/arch/riscv/boot/dts/sophgo/ |
| H A D | sg2044.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 6 #include <dt-bindings/clock/sophgo,sg2044-pll.h> 7 #include <dt-bindings/clock/sophgo,sg2044-clk.h> 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/pinctrl/pinctrl-sg2044.h> 12 #include "sg2044-cpus.dtsi" 13 #include "sg2044-reset.h" 24 compatible = "fixed-clock"; 25 clock-output-names = "osc"; [all …]
|