/Linux-v6.1/drivers/video/backlight/ |
D | pwm_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Simple PWM based backlight control, board code has to setup 4 * 1) pin configuration so PWM waveforms can output 17 #include <linux/pwm.h> 23 struct pwm_device *pwm; member 44 struct pwm_state state; in pwm_backlight_power_on() local 47 pwm_get_state(pb->pwm, &state); in pwm_backlight_power_on() 48 if (pb->enabled) in pwm_backlight_power_on() 51 err = regulator_enable(pb->power_supply); in pwm_backlight_power_on() 53 dev_err(pb->dev, "failed to enable power supply\n"); in pwm_backlight_power_on() [all …]
|
/Linux-v6.1/drivers/pwm/ |
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> 40 /* Enable all TCU channels for PWM use by default except channels 0/1 */ in jz4740_pwm_can_use_chn() 41 u32 pwm_channels_mask = GENMASK(jz->chip.npwm - 1, 2); in jz4740_pwm_can_use_chn() 43 device_property_read_u32(jz->chip.dev->parent, in jz4740_pwm_can_use_chn() 44 "ingenic,pwm-channels-mask", in jz4740_pwm_can_use_chn() [all …]
|
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 …]
|
D | pwm-renesas-tpu.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Mobile TPU PWM driver 18 #include <linux/pwm.h> 63 TPU_PIN_PWM, /* Pin is driven by PWM */ 64 TPU_PIN_ACTIVE, /* Pin is driven active */ 94 void __iomem *base = tpd->tpu->base + TPU_CHANNEL_OFFSET in tpu_pwm_write() 95 + tpd->channel * TPU_CHANNEL_SIZE; in tpu_pwm_write() 101 enum tpu_pin_state state) in tpu_pwm_set_pin() argument 103 static const char * const states[] = { "inactive", "PWM", "active" }; in tpu_pwm_set_pin() 105 dev_dbg(&tpd->tpu->pdev->dev, "%u: configuring pin as %s\n", in tpu_pwm_set_pin() [all …]
|
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 23 * clock tick per period. This should better use the disabled state. 24 * - The driver only implements setting the relative duty cycle. 25 * - The driver doesn't implement .get_state(). [all …]
|
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() 59 return regmap_write(dev->regmap, TIM_CCR1, value); in write_ccrx() 61 return regmap_write(dev->regmap, TIM_CCR2, value); in write_ccrx() 63 return regmap_write(dev->regmap, TIM_CCR3, value); in write_ccrx() [all …]
|
D | pwm-tiecap.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ECAP PWM driver 5 * Copyright (C) 2012 Texas Instruments, Inc. - https://www.ti.com/ 14 #include <linux/pwm.h> 50 static int ecap_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in ecap_pwm_config() argument 58 c = pc->clk_rate; in ecap_pwm_config() 67 c = pc->clk_rate; in ecap_pwm_config() 73 pm_runtime_get_sync(pc->chip.dev); in ecap_pwm_config() 75 value = readw(pc->mmio_base + ECCTL2); in ecap_pwm_config() 80 writew(value, pc->mmio_base + ECCTL2); in ecap_pwm_config() [all …]
|
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 30 #include <linux/pwm.h> 33 /* The following is global registers for PWM controller */ 41 /* The following register is PWM channel related registers */ [all …]
|
D | pwm-imx-tpm.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright 2018-2019 NXP. 6 * - The TPM counter and period counter are shared between 9 * - Changes to polarity cannot be latched at the time of the 11 * - Changing period and duty cycle together isn't atomic, 24 #include <linux/pwm.h> 49 * together as a 2-bit field here. 57 #define PWM_IMX_TPM_MOD_MOD GENMASK(PWM_IMX_TPM_MOD_WIDTH - 1, 0) 82 * This function determines for a given pwm_state *state that a consumer 90 const struct pwm_state *state) in pwm_imx_tpm_round_state() argument [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 …]
|
/Linux-v6.1/Documentation/driver-api/ |
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 …]
|
D | miscellaneous.rst | 4 .. kernel-doc:: include/linux/parport.h 7 .. kernel-doc:: drivers/parport/ieee1284.c 10 .. kernel-doc:: drivers/parport/share.c 13 .. kernel-doc:: drivers/parport/daisy.c 19 .. kernel-doc:: drivers/tty/serial/8250/8250_core.c 24 Pulse-Width Modulation (PWM) 27 Pulse-width modulation is a modulation technique primarily used to 30 The PWM framework provides an abstraction for providers and consumers of 31 PWM signals. A controller that provides one or more PWM signals is 33 are expected to embed this structure in a driver-specific structure. [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/hwmon/ |
D | adt7475.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jean Delvare <jdelvare@suse.com> 23 https://www.onsemi.com/pub/Collateral/ADT7473-D.PDF 24 https://www.onsemi.com/pub/Collateral/ADT7475-D.PDF 25 https://www.onsemi.com/pub/Collateral/ADT7476-D.PDF 26 https://www.onsemi.com/pub/Collateral/ADT7490-D.PDF 34 - adi,adt7473 35 - adi,adt7475 [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/pwm/ |
D | nvidia,tegra20-pwm.txt | 4 - compatible: Must be: 5 - "nvidia,tegra20-pwm": for Tegra20 6 - "nvidia,tegra30-pwm", "nvidia,tegra20-pwm": for Tegra30 7 - "nvidia,tegra114-pwm", "nvidia,tegra20-pwm": for Tegra114 8 - "nvidia,tegra124-pwm", "nvidia,tegra20-pwm": for Tegra124 9 - "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132 10 - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210 11 - "nvidia,tegra186-pwm": for Tegra186 12 - "nvidia,tegra194-pwm": for Tegra194 13 - reg: physical base address and length of the controller's registers [all …]
|
/Linux-v6.1/drivers/leds/rgb/ |
D | leds-pwm-multicolor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * PWM-based multi-color LED control 5 * Copyright 2022 Sven Schwermer <sven.schwermer@disruptive-technologies.com> 10 #include <linux/led-class-multicolor.h> 17 #include <linux/pwm.h> 20 struct pwm_device *pwm; member 21 struct pwm_state state; member 42 mutex_lock(&priv->lock); in led_pwm_mc_set() 44 for (i = 0; i < mc_cdev->num_colors; i++) { in led_pwm_mc_set() 45 duty = priv->leds[i].state.period; in led_pwm_mc_set() [all …]
|
/Linux-v6.1/drivers/input/misc/ |
D | da7280.c | 1 // SPDX-License-Identifier: GPL-2.0+ 16 #include <linux/pwm.h> 181 /* Maximum gain is 0x7fff for PWM mode */ 259 bool active; member 290 error = regmap_read(haptics->regmap, DA7280_IRQ_STATUS1, &val); in da7280_haptic_mem_update() 294 dev_warn(haptics->dev, in da7280_haptic_mem_update() 296 return -EBUSY; in da7280_haptic_mem_update() 301 error = regmap_read(haptics->regmap, DA7280_MEM_CTL2, &val); in da7280_haptic_mem_update() 305 dev_warn(haptics->dev, "Please unlock the bit first\n"); in da7280_haptic_mem_update() 306 return -EACCES; in da7280_haptic_mem_update() [all …]
|
/Linux-v6.1/arch/arm64/boot/dts/rockchip/ |
D | rk3399-rockpro64.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 #include <dt-bindings/input/linux-event-codes.h> 8 #include <dt-bindings/pwm/pwm.h> 10 #include "rk3399-opp.dtsi" 20 stdout-path = "serial2:1500000n8"; 25 compatible = "pwm-backlight"; 26 brightness-levels = <0 4 8 16 32 64 128 255>; 27 default-brightness-level = <5>; 32 clkin_gmac: external-gmac-clock { 33 compatible = "fixed-clock"; [all …]
|
D | rk3399-khadas-edge.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 /dts-v1/; 8 #include <dt-bindings/input/linux-event-codes.h> 9 #include <dt-bindings/interrupt-controller/irq.h> 10 #include <dt-bindings/pwm/pwm.h> 12 #include "rk3399-opp.dtsi" 22 stdout-path = "serial2:1500000n8"; 25 clkin_gmac: external-gmac-clock { 26 compatible = "fixed-clock"; 27 clock-frequency = <125000000>; [all …]
|
D | rk3399-sapphire.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 #include "dt-bindings/pwm/pwm.h" 7 #include "dt-bindings/input/input.h" 9 #include "rk3399-opp.dtsi" 12 compatible = "rockchip,rk3399-sapphire", "rockchip,rk3399"; 20 stdout-path = "serial2:1500000n8"; 23 clkin_gmac: external-gmac-clock { 24 compatible = "fixed-clock"; 25 clock-frequency = <125000000>; 26 clock-output-names = "clkin_gmac"; [all …]
|
D | rk3399-kobol-helios64.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 13 /dts-v1/; 15 #include "rk3399-opp.dtsi" 29 avdd_0v9_s0: avdd-0v9-s0 { 30 compatible = "regulator-fixed"; 31 regulator-name = "avdd_0v9_s0"; 32 regulator-always-on; 33 regulator-boot-on; 34 regulator-min-microvolt = <900000>; 35 regulator-max-microvolt = <900000>; [all …]
|
/Linux-v6.1/include/linux/ |
D | pwm.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 * enum pwm_polarity - polarity of a PWM signal 13 * @PWM_POLARITY_NORMAL: a high signal for the duration of the duty- 16 * @PWM_POLARITY_INVERSED: a low signal for the duration of the duty- 26 * struct pwm_args - board-dependent PWM arguments 30 * This structure describes board-dependent arguments attached to a PWM 31 * device. These arguments are usually retrieved from the PWM lookup table or 34 * Do not confuse this with the PWM state: PWM arguments represent the initial 35 * configuration that users want to use on this PWM device rather than the 36 * current PWM hardware state. [all …]
|
/Linux-v6.1/arch/arm64/boot/dts/amlogic/ |
D | meson-sm1-odroid-hc4.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include "meson-sm1-odroid.dtsi" 11 compatible = "hardkernel,odroid-hc4", "amlogic,sm1"; 12 model = "Hardkernel ODROID-HC4"; 19 fan0: pwm-fan { 20 compatible = "pwm-fan"; 21 #cooling-cells = <2>; 22 cooling-min-state = <0>; 23 cooling-max-state = <3>; [all …]
|
/Linux-v6.1/include/linux/platform_data/ |
D | emc2305.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 * struct emc2305_platform_data - EMC2305 driver platform data 10 * @max_state: maximum cooling state of the cooling device; 11 * @pwm_num: number of active channels; 12 * @pwm_separate: separate PWM settings for every channel; 13 * @pwm_min: array of minimum PWM per channel;
|
/Linux-v6.1/arch/arm/boot/dts/ |
D | sun5i-a13-pocketbook-touch-lux-3.dts | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 6 /dts-v1/; 7 #include "sun5i-a13.dtsi" 8 #include "sunxi-common-regulators.dtsi" 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/interrupt-controller/irq.h> 12 #include <dt-bindings/pwm/pwm.h> 16 compatible = "pocketbook,touch-lux-3", "allwinner,sun5i-a13"; 26 compatible = "pwm-backlight"; [all …]
|
D | imx6qdl-nit6xlite.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 OR X11 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/input/input.h> 10 stdout-path = &uart2; 19 compatible = "simple-bus"; 20 #address-cells = <1>; 21 #size-cells = <0>; 24 compatible = "regulator-fixed"; 26 regulator-name = "2P5V"; 27 regulator-min-microvolt = <2500000>; [all …]
|