Home
last modified time | relevance | path

Searched +full:pwm +full:- +full:active +full:- +full:state (Results 1 – 25 of 153) sorted by relevance

1234567

/Linux-v5.15/drivers/video/backlight/
Dpwm_bl.c1 // 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-v5.15/drivers/pwm/
Dpwm-jz4740.c1 // 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 …]
Dpwm-omap-dmtimer.c1 // 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 …]
Dpwm-renesas-tpu.c1 // 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 */
92 static void tpu_pwm_write(struct tpu_pwm_device *pwm, int reg_nr, u16 value) in tpu_pwm_write() argument
94 void __iomem *base = pwm->tpu->base + TPU_CHANNEL_OFFSET in tpu_pwm_write()
95 + pwm->channel * TPU_CHANNEL_SIZE; in tpu_pwm_write()
100 static void tpu_pwm_set_pin(struct tpu_pwm_device *pwm, in tpu_pwm_set_pin() argument
101 enum tpu_pin_state state) in tpu_pwm_set_pin() argument
[all …]
Dpwm-stm32.c1 // 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 …]
Dpwm-tiecap.c1 // 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 …]
Dpwm-atmel.c1 // 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
31 #include <linux/pwm.h>
34 /* The following is global registers for PWM controller */
42 /* The following register is PWM channel related registers */
[all …]
Dpwm-imx-tpm.c1 // 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 …]
/Linux-v5.15/Documentation/devicetree/bindings/hwmon/
Dadt7475.yaml1 # 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-v5.15/Documentation/driver-api/
Dpwm.rst2 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 …]
Dmiscellaneous.rst4 .. 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/serial_core.c
22 .. kernel-doc:: drivers/tty/serial/8250/8250_core.c
25 Pulse-Width Modulation (PWM)
28 Pulse-width modulation is a modulation technique primarily used to
31 The PWM framework provides an abstraction for providers and consumers of
32 PWM signals. A controller that provides one or more PWM signals is
[all …]
/Linux-v5.15/Documentation/devicetree/bindings/pwm/
Dnvidia,tegra20-pwm.txt4 - 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-v5.15/drivers/input/misc/
Dda7280.c1 // 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-v5.15/include/linux/
Dpwm.h1 /* SPDX-License-Identifier: GPL-2.0 */
15 * enum pwm_polarity - polarity of a PWM signal
16 * @PWM_POLARITY_NORMAL: a high signal for the duration of the duty-
19 * @PWM_POLARITY_INVERSED: a low signal for the duration of the duty-
29 * struct pwm_args - board-dependent PWM arguments
33 * This structure describes board-dependent arguments attached to a PWM
34 * device. These arguments are usually retrieved from the PWM lookup table or
37 * Do not confuse this with the PWM state: PWM arguments represent the initial
38 * configuration that users want to use on this PWM device rather than the
39 * current PWM hardware state.
[all …]
/Linux-v5.15/arch/arm64/boot/dts/amlogic/
Dmeson-sm1-odroid-hc4.dts1 // 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-v5.15/arch/arm/boot/dts/
Dsun5i-a13-pocketbook-touch-lux-3.dts1 // 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 …]
Dimx6qdl-nit6xlite.dtsi1 // 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 …]
Dimx6q-kp.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
7 /dts-v1/;
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/pwm/pwm.h>
13 #include <dt-bindings/sound/fsl-imx-audmux.h>
16 backlight_lcd: backlight-lcd {
17 compatible = "pwm-backlight";
19 brightness-levels = <0 255>;
20 num-interpolated-steps = <255>;
21 default-brightness-level = <250>;
[all …]
Dimx6qdl-nitrogen6_max.dtsi1 // 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 = "1P8V";
27 regulator-min-microvolt = <1800000>;
[all …]
/Linux-v5.15/arch/arm64/boot/dts/rockchip/
Drk3399-kobol-helios64.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
13 /dts-v1/;
15 #include "rk3399-opp.dtsi"
26 avdd_0v9_s0: avdd-0v9-s0 {
27 compatible = "regulator-fixed";
28 regulator-name = "avdd_0v9_s0";
29 regulator-always-on;
30 regulator-boot-on;
31 regulator-min-microvolt = <900000>;
32 regulator-max-microvolt = <900000>;
[all …]
Drk3399-khadas-edge.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
7 /dts-v1/;
8 #include <dt-bindings/input/linux-event-codes.h>
9 #include <dt-bindings/pwm/pwm.h>
11 #include "rk3399-opp.dtsi"
21 stdout-path = "serial2:1500000n8";
24 clkin_gmac: external-gmac-clock {
25 compatible = "fixed-clock";
26 clock-frequency = <125000000>;
27 clock-output-names = "clkin_gmac";
[all …]
Drk3399-roc-pc.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
6 /dts-v1/;
7 #include <dt-bindings/input/linux-event-codes.h>
8 #include <dt-bindings/pwm/pwm.h>
10 #include "rk3399-opp.dtsi"
13 model = "Firefly ROC-RK3399-PC Board";
14 compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
22 stdout-path = "serial2:1500000n8";
26 compatible = "pwm-backlight";
[all …]
Drk3399-rockpro64.dtsi1 // 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";
23 clkin_gmac: external-gmac-clock {
24 compatible = "fixed-clock";
25 clock-frequency = <125000000>;
26 clock-output-names = "clkin_gmac";
27 #clock-cells = <0>;
[all …]
/Linux-v5.15/drivers/leds/
Dleds-pwm.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/drivers/leds-pwm.c
5 * simple PWM based LED control
9 * based on leds-gpio.c by Raphael Assenat <raph@8d.com>
18 #include <linux/pwm.h>
31 struct pwm_device *pwm; member
46 unsigned int max = led_dat->cdev.max_brightness; in led_pwm_set()
47 unsigned long long duty = led_dat->pwmstate.period; in led_pwm_set()
52 if (led_dat->active_low) in led_pwm_set()
53 duty = led_dat->pwmstate.period - duty; in led_pwm_set()
[all …]
/Linux-v5.15/drivers/input/keyboard/
Dlm8323.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2007-2009 Nokia Corporation
36 #define LM8323_CMD_SET_ACTIVE 0x8b /* Set active time. */
45 #define LM8323_CMD_PWM_WRITE 0x95 /* Write PWM script. */
46 #define LM8323_CMD_START_PWM 0x96 /* Start PWM engine. */
47 #define LM8323_CMD_STOP_PWM 0x97 /* Stop PWM engine. */
87 /* Commands for PWM engine; feed in with PWM_WRITE. */
88 /* Load ramp counter from duty cycle field (range 0 - 0xff). */
126 /* pwm lock */
147 struct lm8323_pwm pwm[LM8323_NUM_PWMS]; member
[all …]

1234567