Home
last modified time | relevance | path

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

12345678910

/openbmc/linux/drivers/video/backlight/
H A 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
45 if (pb->enabled) in pwm_backlight_power_on()
48 if (pb->power_supply) { in pwm_backlight_power_on()
49 err = regulator_enable(pb->power_supply); in pwm_backlight_power_on()
51 dev_err(pb->dev, "failed to enable power supply\n"); in pwm_backlight_power_on()
54 if (pb->post_pwm_on_delay) in pwm_backlight_power_on()
[all …]
/openbmc/linux/drivers/pwm/
H A 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 …]
H A 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 …]
H A 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 */
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 …]
H A Dpwm-twl-led.c1 // 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
/openbmc/linux/arch/arm64/boot/dts/qcom/
H A Dmsm8916-samsung-gt510.dts1 // SPDX-License-Identifier: GPL-2.0-only
3 /dts-v1/;
5 #include "msm8916-samsung-gt5-common.dtsi"
10 chassis-type = "tablet";
12 clk_pwm: pwm {
13 compatible = "clk-pwm";
14 #pwm-cells = <2>;
18 pinctrl-0 = <&motor_pwm_default>;
19 pinctrl-names = "default";
22 reg_motor_vdd: regulator-motor-vdd {
[all …]
H A Dmsm8939-samsung-a7.dts1 // SPDX-License-Identifier: GPL-2.0-only
3 /dts-v1/;
5 #include "msm8939-pm8916.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/interrupt-controller/irq.h>
14 chassis-type = "handset";
23 stdout-path = "serial0";
26 reserved-memory {
28 tz-apps@85500000 {
[all …]
H A Dmsm8916-samsung-a2015-common.dtsi1 // SPDX-License-Identifier: GPL-2.0-only
3 #include "msm8916-pm8916.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/interrupt-controller/irq.h>
7 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
17 stdout-path = "serial0";
20 reserved-memory {
22 tz-apps@85500000 {
24 no-map;
[all …]
/openbmc/linux/Documentation/driver-api/
H A 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 …]
H A 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/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 …]
/openbmc/linux/Documentation/devicetree/bindings/hwmon/
H A 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 …]
/openbmc/linux/Documentation/devicetree/bindings/pwm/
H A Dnvidia,tegra20-pwm.yaml1 # 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 …]
/openbmc/linux/Documentation/devicetree/bindings/hwmon/pmbus/
H A Dmax31785.txt9 - compatible : One of "maxim,max31785" or "maxim,max31785a"
10 - reg : I2C address, one of 0x52, 0x53, 0x54, 0x55.
11 - #address-cells : Must be 1
12 - #size-cells : Must be 0
13 - #thermal-sensor-cells : Should be 1. The device supports:
14 - One internal sensor
15 - Four external I2C digital sensors
16 - Six external thermal diodes
19 - use-stored-presence : Do not treat the devicetree description as canon for
27 ----
[all …]
/openbmc/linux/drivers/leds/rgb/
H A Dleds-pwm-multicolor.c1 // 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 …]
/openbmc/phosphor-fan-presence/docs/control/fanctl/
H A DREADME.md4 control including the ability to manually set the fans to a desired RPM (or PWM
6 the phosphor-fan-presence repository set of fan applications (i.e. romulus,
15 fans, the resume operation re-enables and restarts the phosphor-fan-control
19 (YAML-based configurations are not reloadable).
21 Note: In the case where a system does not have an active fan control algorithm
28 fanctl - Manually control, get fan tachs, view status, reload config,
37 - RPM/PWM target to set the fans
39 - space-delimited list of target sensors to set
41 - Get the current fan target and feedback speeds for all rotors
43 - Get the full system status in regard to fans
[all …]
/openbmc/linux/drivers/input/misc/
H A 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 …]
/openbmc/linux/arch/arm64/boot/dts/mediatek/
H A Dmt7986a-bananapi-bpi-r3.dts1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
5 * Frank Wunderlich <frank-w@public-files.de>
9 /dts-v1/;
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/leds/common.h>
13 #include <dt-bindings/pinctrl/mt65xx.h>
18 model = "Bananapi BPI-R3";
19 chassis-type = "embedded";
20 compatible = "bananapi,bpi-r3", "mediatek,mt7986a";
[all …]
/openbmc/linux/include/linux/
H A Dpwm.h1 /* 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 …]
/openbmc/linux/drivers/hwmon/
H A Daspeed-g6-pwm-tach.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * PWM/TACH controller driver for Aspeed ast2600 SoCs.
9 * Q := (DIV_L + 1) << DIV_H / input-clk
10 * The length of a PWM period is (DUTY_CYCLE_PERIOD + 1) * Q.
15 * period the output is active until DUTY_CYCLE_FALLING_POINT * Q. Note
17 * always active.
20 * PIN_ENABLE: When it is unset the pwm controller will emit inactive level to the external.
21 * Use to determine whether the PWM channel is enabled or disabled
22 * CLK_ENABLE: When it is unset the pwm controller will assert the duty counter reset and
23 * emit inactive level to the PIN_ENABLE mux after that the driver can still change the pwm period
[all …]
/openbmc/linux/arch/arm64/boot/dts/rockchip/
H A 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";
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 …]
H A 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/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 …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dcore_thermal.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /* Copyright (c) 2016-2018 Mellanox Technologies. All rights reserved
42 { /* In range - 0-40% PWM */
48 /* In range - 40-100% PWM */
60 { /* In range - 0-40% PWM */
66 /* In range - 40-100% PWM */
95 #define MLXSW_THERMAL_TRIP_MASK (BIT(MLXSW_THERMAL_NUM_TRIPS) - 1)
114 bool active; member
128 static inline u8 mlxsw_state_to_duty(int state) in mlxsw_state_to_duty() argument
130 return DIV_ROUND_CLOSEST(state * MLXSW_THERMAL_MAX_DUTY, in mlxsw_state_to_duty()
[all …]

12345678910