/linux-6.12.1/drivers/pwm/ |
D | pwm-omap-dmtimer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * Also based on pwm-samsung.c 13 * PWM driver / controller, using the OMAP's dual-mode timers 14 * with a timer counter that goes up. When it overflows it gets 15 * reloaded with the load value and the pwm output goes up. 20 * - When PWM is stopped, timer counter gets stopped immediately. This 21 * doesn't allow the current PWM period to complete and stops abruptly. 22 * - When PWM is running and changing both duty cycle and period, 25 * is updated while the pwm pin is high, current pwm period/duty_cycle 26 * can get updated as below based on the current timer counter: [all …]
|
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 2 menuconfig PWM config 3 bool "Pulse-Width Modulation (PWM) Support" 5 Generic Pulse-Width Modulation (PWM) support. 7 In Pulse-Width Modulation, a variation of the width of pulses 14 This framework provides a generic interface to PWM devices 16 to register and unregister a PWM chip, an abstraction of a PWM 17 controller, that supports one or more PWM devices. Client 18 drivers can request PWM devices and use the generic framework 21 This generic framework replaces the legacy PWM framework which [all …]
|
D | pwm-renesas-tpu.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Mobile TPU PWM driver 17 #include <linux/pwm.h> 23 #define TPU_TSTR 0x00 /* Timer start register (shared) */ 25 #define TPU_TCRn 0x00 /* Timer control register */ 34 #define TPU_TMDRn 0x04 /* Timer mode register */ 40 #define TPU_TIORn 0x08 /* Timer I/O control register */ 49 #define TPU_TIERn 0x0c /* Timer interrupt enable register */ 50 #define TPU_TSRn 0x10 /* Timer status register */ 51 #define TPU_TCNTn 0x14 /* Timer counter */ [all …]
|
D | pwm-dwc-core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * DesignWare PWM Controller driver core 5 * Copyright (C) 2018-2020 Intel Corporation 20 #include <linux/pwm.h> 22 #include "pwm-dwc.h" 24 static void __dwc_pwm_set_enable(struct dwc_pwm *dwc, int pwm, int enabled) in __dwc_pwm_set_enable() argument 28 reg = dwc_pwm_readl(dwc, DWC_TIM_CTRL(pwm)); in __dwc_pwm_set_enable() 35 dwc_pwm_writel(dwc, reg, DWC_TIM_CTRL(pwm)); in __dwc_pwm_set_enable() 39 struct pwm_device *pwm, in __dwc_pwm_configure_timer() argument 52 tmp = DIV_ROUND_CLOSEST_ULL(state->duty_cycle, dwc->clk_ns); in __dwc_pwm_configure_timer() [all …]
|
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> 30 /* STM32 Low-Power Timer is preceded by a configurable power-of-2 prescaler */ 33 static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm, in stm32_pwm_lp_apply() argument 43 pwm_get_state(pwm, &cstate); in stm32_pwm_lp_apply() 46 if (!state->enabled) { in stm32_pwm_lp_apply() 48 /* Disable LP timer */ in stm32_pwm_lp_apply() [all …]
|
D | pwm-xilinx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * - When changing both duty cycle and period, we may end up with one cycle 13 * - Cannot produce 100% duty cycle by configuring the TLRs. This might be 16 * - Only produces "normal" output. 17 * - Always produces low output if disabled. 20 #include <clocksource/timer-xilinx.h> 22 #include <linux/clk-provider.h> 27 #include <linux/pwm.h> 37 WARN_ON(cycles < 2 || cycles - 2 > priv->max); in xilinx_timer_tlr_cycles() 40 return cycles - 2; in xilinx_timer_tlr_cycles() [all …]
|
D | pwm-atmel-tcb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 21 #include <linux/pwm.h> 36 unsigned div; /* PWM clock divider */ 37 unsigned duty; /* PWM duty expressed in clk cycles */ 38 unsigned period; /* PWM period expressed in clk cycles */ 69 struct pwm_device *pwm) in atmel_tcb_pwm_request() argument 72 struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm]; in atmel_tcb_pwm_request() 76 ret = clk_prepare_enable(tcbpwmc->clk); in atmel_tcb_pwm_request() 80 tcbpwm->duty = 0; in atmel_tcb_pwm_request() 81 tcbpwm->period = 0; in atmel_tcb_pwm_request() [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/soc/microchip/ |
D | atmel,at91rm9200-tcb.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/soc/microchip/atmel,at91rm9200-tcb.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Atmel Timer Counter Block 10 - Alexandre Belloni <alexandre.belloni@bootlin.com> 13 The Atmel (now Microchip) SoCs have timers named Timer Counter Block. Each 14 timer has three channels with two counters each. 19 - enum: 20 - atmel,at91rm9200-tcb [all …]
|
/linux-6.12.1/drivers/media/rc/ |
D | pwm-ir-tx.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/pwm.h> 15 #include <media/rc-core.h> 17 #define DRIVER_NAME "pwm-ir-tx" 18 #define DEVICE_NAME "PWM IR Transmitter" 21 struct pwm_device *pwm; member 22 struct hrtimer timer; member 33 { .compatible = "pwm-ir-tx", }, 34 { .compatible = "nokia,n900-ir" }, 41 struct pwm_ir *pwm_ir = dev->priv; in pwm_ir_set_duty_cycle() [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/pwm/ |
D | ti,omap-dmtimer-pwm.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/pwm/ti,omap-dmtimer-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI dual mode timer PWM controller 10 - Tony Lindgren <tony@atomide.com> 13 TI dual mode timer instances have an IO pin for PWM capability 16 - $ref: pwm.yaml# 20 const: ti,omap-dmtimer-pwm 22 "#pwm-cells": [all …]
|
D | pwm-samsung.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/pwm/pwm-samsung.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Samsung SoC PWM timers 10 - Thierry Reding <thierry.reding@gmail.com> 11 - Krzysztof Kozlowski <krzk@kernel.org> 14 Samsung SoCs contain PWM timer blocks which can be used for system clock source 15 and clock event timers, as well as to drive SoC outputs with PWM signal. Each 16 PWM timer block provides 5 PWM channels (not all of them can drive physical [all …]
|
D | snps,dw-apb-timers-pwm2.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/pwm/snps,dw-apb-timers-pwm2.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Synopsys DW-APB timers PWM controller 11 - Ben Dooks <ben.dooks@sifive.com> 14 This describes the DesignWare APB timers module when used in the PWM 24 - $ref: pwm.yaml# 28 const: snps,dw-apb-timers-pwm2 33 "#pwm-cells": [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/mfd/ |
D | st,stm32-timers.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mfd/st,stm32-timers.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 This hardware block provides 3 types of timer along with PWM functionality: 11 - advanced-control timers consist of a 16-bit auto-reload counter driven 12 by a programmable prescaler, break input feature, PWM outputs and 13 complementary PWM outputs channels. 14 - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter 15 driven by a programmable prescaler and PWM outputs. [all …]
|
D | st,stm32-lptimer.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mfd/st,stm32-lptimer.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: STMicroelectronics STM32 Low-Power Timers 10 The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several 12 - PWM output (with programmable prescaler, configurable polarity) 13 - Trigger source for STM32 ADC/DAC (LPTIM_OUT) 14 - Several counter modes: 15 - quadrature encoder to detect angular position and direction of rotary [all …]
|
/linux-6.12.1/arch/arm/boot/dts/st/ |
D | stm32f746.dtsi | 2 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 * This file is dual-licensed: you can use it either under the terms 43 #include "../armv7-m.dtsi" 44 #include <dt-bindings/clock/stm32fx-clock.h> 45 #include <dt-bindings/mfd/stm32f7-rcc.h> 48 #address-cells = <1>; 49 #size-cells = <1>; 52 clk_hse: clk-hse { 53 #clock-cells = <0>; 54 compatible = "fixed-clock"; [all …]
|
D | stm32mp131.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 3 * Copyright (C) STMicroelectronics 2021 - All Rights Reserved 6 #include <dt-bindings/interrupt-controller/arm-gic.h> 7 #include <dt-bindings/clock/stm32mp13-clks.h> 8 #include <dt-bindings/reset/stm32mp13-resets.h> 11 #address-cells = <1>; 12 #size-cells = <1>; 15 #address-cells = <1>; 16 #size-cells = <0>; 19 compatible = "arm,cortex-a7"; [all …]
|
D | stm32f429.dtsi | 2 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 * This file is dual-licensed: you can use it either under the terms 22 * MA 02110-1301 USA 48 #include "../armv7-m.dtsi" 49 #include <dt-bindings/clock/stm32fx-clock.h> 50 #include <dt-bindings/mfd/stm32f4-rcc.h> 53 #address-cells = <1>; 54 #size-cells = <1>; 57 clk_hse: clk-hse { 58 #clock-cells = <0>; [all …]
|
D | stm32mp151.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved 6 #include <dt-bindings/interrupt-controller/arm-gic.h> 7 #include <dt-bindings/clock/stm32mp1-clks.h> 8 #include <dt-bindings/reset/stm32mp1-resets.h> 11 #address-cells = <1>; 12 #size-cells = <1>; 15 #address-cells = <1>; 16 #size-cells = <0>; 19 compatible = "arm,cortex-a7"; [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/timer/ |
D | renesas,rz-mtu3.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/timer/renesas,rz-mtu3.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Renesas RZ/G2L Multi-Function Timer Pulse Unit 3 (MTU3a) 10 - Biju Das <biju.das.jz@bp.renesas.com> 13 This hardware block consists of eight 16-bit timer channels and one 14 32-bit timer channel. It supports the following specifications: 15 - Pulse input/output: 28 lines max 16 - Pulse input 3 lines [all …]
|
D | ingenic,tcu.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/timer/ingenic,tcu.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Ingenic SoCs Timer/Counter Unit (TCU) 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 [all …]
|
D | cdns,ttc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/timer/cdns,ttc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Cadence TTC - Triple Timer Counter 10 - Michal Simek <michal.simek@amd.com> 22 A list of 3 interrupts; one per timer channel. 27 power-domains: 30 timer-width: 33 Bit width of the timer, necessary if not 16. [all …]
|
D | ti,timer-dm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/timer/ti,timer-dm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI dual-mode timer 10 - Tony Lindgren <tony@atomide.com> 13 The TI dual-mode timer is a general purpose timer with PWM capabilities. 18 - items: 19 - enum: 20 - ti,am335x-timer [all …]
|
D | xlnx,xps-timer.yaml | 1 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/timer/xlnx,xps-timer.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Xilinx LogiCORE IP AXI Timer 10 - Sean Anderson <sean.anderson@seco.com> 15 const: xlnx,xps-timer-1.00.a 20 clock-names: 29 '#pwm-cells': true 31 xlnx,count-width: [all …]
|
/linux-6.12.1/arch/arm/boot/dts/microchip/ |
D | at91-kizbox.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * at91-kizbox.dts - Device Tree file for Overkiz Kizbox board 5 * Copyright (C) 2012-2014 Boris BREZILLON <b.brezillon@overkiz.com> 6 * 2014-2015 Gaël PORTAY <g.portay@overkiz.com> 8 /dts-v1/; 10 #include <dt-bindings/pwm/pwm.h> 18 stdout-path = &dbgu; 27 clock-frequency = <18432000>; 31 gpio-keys { 32 compatible = "gpio-keys"; [all …]
|
/linux-6.12.1/drivers/clocksource/ |
D | samsung_pwm_timer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * samsung - Common hr-timer support (s3c and s5p) 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() 114 writel(reg, pwm.base + REG_TCFG1); in samsung_timer_set_divisor() 129 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_stop() [all …]
|