| /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) 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 …]
|
| /linux/Documentation/devicetree/bindings/pwm/ |
| H A D | pwm-amlogic.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Amlogic PWM 10 - Heiner Kallweit <hkallweit1@gmail.com> 15 - enum: 16 - amlogic,meson8b-pwm 17 - amlogic,meson-gxbb-pwm 18 - amlogic,meson-gxbb-ao-pwm [all …]
|
| H A D | pwm.txt | 1 Specifying PWM information for devices 4 1) PWM user nodes 5 ----------------- 7 PWM users should specify a list of PWM devices that they want to use 8 with a property containing a 'pwm-list': 10 pwm-list ::= <single-pwm> [pwm-list] 11 single-pwm ::= <pwm-phandle> <pwm-specifier> 12 pwm-phandle : phandle to PWM controller node 13 pwm-specifier : array of #pwm-cells specifying the given PWM 16 PWM properties should be named "pwms". The exact meaning of each pwms [all …]
|
| H A D | renesas,pwm-rcar.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/pwm/renesas,pwm-rcar.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Renesas R-Car PWM Timer Controller 10 - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> 15 - enum: 16 - renesas,pwm-r8a7742 # RZ/G1H 17 - renesas,pwm-r8a7743 # RZ/G1M 18 - renesas,pwm-r8a7744 # RZ/G1N [all …]
|
| H A D | imx-pwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/imx-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Freescale i.MX PWM controller 10 - Philipp Zabel <p.zabel@pengutronix.de> 13 - $ref: pwm.yaml# 16 "#pwm-cells": 19 PWM_POLARITY_INVERTED. fsl,imx1-pwm does not support this flags. 24 - enum: [all …]
|
| H A D | allwinner,sun4i-a10-pwm.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/pwm/allwinner,sun4i-a10-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Allwinner A10 PWM 10 - Chen-Yu Tsai <wens@csie.org> 11 - Maxime Ripard <mripard@kernel.org> 14 "#pwm-cells": 19 - const: allwinner,sun4i-a10-pwm 20 - const: allwinner,sun5i-a10s-pwm [all …]
|
| H A D | mediatek,mt2712-pwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/mediatek,mt2712-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: MediaTek PWM Controller 10 - John Crispin <john@phrozen.org> 13 - $ref: pwm.yaml# 18 - enum: 19 - mediatek,mt2712-pwm 20 - mediatek,mt6795-pwm [all …]
|
| H A D | nvidia,tegra20-pwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/nvidia,tegra20-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Thierry Reding <thierry.reding@gmail.com> 11 - Jon Hunter <jonathanh@nvidia.com> 16 - enum: 17 - nvidia,tegra20-pwm 18 - nvidia,tegra186-pwm 20 - items: [all …]
|
| H A D | pwm-sifive.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/pwm/pwm-sifive.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: SiFive PWM controller 11 - Paul Walmsley <paul.walmsley@sifive.com> 14 Unlike most other PWM controllers, the SiFive PWM controller currently 15 only supports one period for all channels in the PWM. All PWMs need to 18 achievable period. PWM RTL that corresponds to the IP block version 19 numbers can be found here - [all …]
|
| H A D | mediatek,pwm-disp.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/mediatek,pwm-disp.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jitao Shi <jitao.shi@mediatek.com> 13 - $ref: pwm.yaml# 18 - enum: 19 - mediatek,mt2701-disp-pwm 20 - mediatek,mt6595-disp-pwm 21 - mediatek,mt8173-disp-pwm [all …]
|
| H A D | marvell,pxa-pwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/marvell,pxa-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Marvell PXA PWM 10 - Duje Mihanović <duje.mihanovic@skole.hr> 13 - $ref: pwm.yaml# 14 - if: 18 const: spacemit,k1-pwm 21 "#pwm-cells": [all …]
|
| H A D | atmel,at91sam-pwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/pwm/atmel,at91sam-pwm.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Atmel/Microchip PWM controller 11 - Claudiu Beznea <claudiu.beznea@microchip.com> 14 - $ref: pwm.yaml# 19 - items: 20 - enum: 21 - atmel,at91sam9rl-pwm [all …]
|
| /linux/Documentation/driver-api/ |
| H A D | pwm.rst | 2 Pulse Width Modulation (PWM) interface 5 This provides an overview about the Linux PWM interface 9 the Linux PWM API (although they could). However, PWMs are often 12 this kind of flexibility the generic PWM API exists. 15 ---------------- 17 Users of the legacy PWM API use unique IDs to refer to PWM devices. 19 Instead of referring to a PWM device via its unique ID, board setup code 20 should instead register a static mapping that can be used to match PWM 24 PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL, 36 ---------- [all …]
|
| /linux/drivers/pwm/ |
| H A D | pwm-twl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 #include <linux/pwm.h> 32 #define TWL4030_PWM_TOGGLE(pwm, x) ((x) << (pwm)) argument 46 #define TWL6030_PWM_TOGGLE(pwm, x) ((x) << (pwm * 3)) argument 59 static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl_pwm_config() argument 68 * On-cycle is set to 1 (the minimum allowed value) in twl_pwm_config() 70 * 0 -> off cycle = 2, in twl_pwm_config() 71 * 1 -> off cycle = 2, in twl_pwm_config() 72 * 2 -> off cycle = 3, in twl_pwm_config() 73 * 126 - > off cycle 127, in twl_pwm_config() [all …]
|
| H A D | pwm-vt8500.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/pwm/pwm-vt8500.c 16 #include <linux/pwm.h> 28 #define REG_CTRL(pwm) (((pwm) << 4) + 0x00) argument 29 #define REG_SCALAR(pwm) (((pwm) << 4) + 0x04) argument 30 #define REG_PERIOD(pwm) (((pwm) << 4) + 0x08) argument 31 #define REG_DUTY(pwm) (((pwm) << 4) + 0x0C) argument 64 while ((readl(vt8500->base + REG_STATUS) & mask) && --loops) in vt8500_pwm_busy_wait() 72 static int vt8500_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in vt8500_pwm_config() argument 81 err = clk_enable(vt8500->clk); in vt8500_pwm_config() [all …]
|
| H A D | pwm-twl-led.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * This driver is a complete rewrite of the former pwm-twl6030.c authorded by: 15 * - The twl6030 hardware only supports two period lengths (128 clock ticks and 17 * - The hardware doesn't support ON = 0, so the active part of a period doesn't 19 * - The hardware could support inverted polarity (with a similar limitation as 21 * - The hardware emits a constant low output when disabled. 22 * - A request for .duty_cycle = 0 results in an output wave with one active 24 * - The driver only implements setting the relative duty cycle. 25 * - The driver doesn't implement .get_state(). 31 #include <linux/pwm.h> [all …]
|
| H A D | pwm-samsung.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org> 9 * PWM driver for Samsung SoCs 21 #include <linux/pwm.h> 59 * struct samsung_pwm_channel - private data of PWM channel 71 * struct samsung_pwm_chip - private data of PWM chip 73 * @inverter_mask: inverter status for all channels - one bit per channel 74 * @disabled_mask: disabled status for all channels - one bit per channel 75 * @base: base address of mapped PWM registers 95 * PWM block is shared between pwm-samsung and samsung_pwm_timer drivers [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-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 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 27 * - period for current cycle = current_period + new period 28 * - duty_cycle for current period = current period + new duty_cycle. [all …]
|
| H A D | pwm-atmel.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * Links to reference manuals for the supported PWM chips can be found in 12 * - Periods start with the inactive level. 13 * - Hardware has to be stopped in general to update settings. 16 * - When atmel_pwm_apply() is called with state->enabled=false a change in 17 * state->polarity isn't honored. 18 * - Instead of sleeping to wait for a completed period, the interrupt 29 #include <linux/pwm.h> 32 /* The following is global registers for PWM controller */ 40 /* The following register is PWM channel related registers */ [all …]
|
| H A D | pwm-hibvt.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * PWM Controller Driver for HiSilicon BVT SoCs 15 #include <linux/pwm.h> 82 static void hibvt_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in hibvt_pwm_enable() argument 86 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), in hibvt_pwm_enable() 90 static void hibvt_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) in hibvt_pwm_disable() argument 94 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), in hibvt_pwm_disable() 98 static void hibvt_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in hibvt_pwm_config() argument 104 freq = div_u64(clk_get_rate(hi_pwm_chip->clk), 1000000); in hibvt_pwm_config() 109 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CFG0_ADDR(pwm->hwpwm), in hibvt_pwm_config() [all …]
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-class-pwm | 1 What: /sys/class/pwm/ 6 The pwm/ class sub-directory belongs to the Generic PWM 7 Framework and provides a sysfs interface for using PWM 10 What: /sys/class/pwm/pwmchip<N>/ 15 A /sys/class/pwm/pwmchipN directory is created for each 16 probed PWM controller/chip where N is the base of the 17 PWM chip. 19 What: /sys/class/pwm/pwmchip<N>/npwm 24 The number of PWM channels supported by the PWM chip. 26 What: /sys/class/pwm/pwmchip<N>/export [all …]
|
| /linux/arch/loongarch/boot/dts/ |
| H A D | loongson-2k0500.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/clock/loongson,ls2k-clk.h> 12 #address-cells = <2>; 13 #size-cells = <2>; 16 #address-cells = <1>; 17 #size-cells = <0>; 27 ref_100m: clock-ref-100m { 28 compatible = "fixed-clock"; [all …]
|
| /linux/Documentation/hwmon/ |
| H A D | adt7470.rst | 17 ----------- 22 The ADT7470 uses the 2-wire interface compatible with the SMBus 2.0 24 external temperatures. It has four (4) 16-bit counters for measuring fan speed. 25 There are four (4) PWM outputs that can be used to control fan speed. 27 A sophisticated control system for the PWM outputs is designed into the ADT7470 29 temperature sensors. Each PWM output is individually adjustable and 30 programmable. Once configured, the ADT7470 will adjust the PWM outputs in 32 feature can also be disabled for manual control of the PWM's. 40 automatic fan pwm control to set the fan speed. The driver will not read the 45 ---------------- [all …]
|
| H A D | dme1737.rst | 18 Addresses scanned: none, address read from Super-I/O config space 34 Addresses scanned: none, address read from Super-I/O config space 43 ----------------- 47 and PWM output control functions. Using this parameter 52 Include non-standard LPC addresses 0x162e and 0x164e 55 - VIA EPIA SN18000 59 ----------- 63 and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors 64 temp[1-3] (2 remote diodes and 1 internal), 8 voltages in[0-7] (7 external and 65 1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement [all …]
|