Home
last modified time | relevance | path

Searched +full:pwm +full:- +full:enable (Results 1 – 25 of 1035) sorted by relevance

12345678910>>...42

/kernel/linux/linux-6.6/Documentation/hwmon/
Dpwm-fan.rst1 Kernel driver pwm-fan
4 This driver enables the use of a PWM module to drive a fan. It uses the
5 generic PWM interface thus it is hardware independent. It can be used on
6 many SoCs, as long as the SoC supplies a PWM line driver that exposes
7 the generic PWM API.
12 -----------
15 a PWM output. It uses the generic PWM interface, thus it can be used with
26 pwm1_enable rw keep enable mode, defines behaviour when pwm1=0
27 0 -> disable pwm and regulator
28 1 -> enable pwm; if pwm==0, disable pwm, keep regulator enabled
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/input/
Dpwm-vibrator.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/input/pwm-vibrator.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: PWM vibrator
10 - Sebastian Reichel <sre@kernel.org>
13 Registers a PWM device as vibrator. It is expected, that the vibrator's
14 strength increases based on the duty cycle of the enable PWM channel
17 The binding supports an optional direction PWM channel, that can be
23 const: pwm-vibrator
[all …]
Ddlg,da7280.txt4 - compatible: Should be "dlg,da7280".
5 - reg: Specifies the I2C slave address.
7 - interrupt-parent : Specifies the phandle of the interrupt controller to
10 - dlg,actuator-type: Set Actuator type. it should be one of:
11 "LRA" - Linear Resonance Actuator type.
12 "ERM-bar" - Bar type Eccentric Rotating Mass.
13 "ERM-coin" - Coin type Eccentric Rotating Mass.
15 - dlg,const-op-mode: Haptic operation mode for FF_CONSTANT.
17 1 - Direct register override(DRO) mode triggered by i2c(default),
18 2 - PWM data source mode controlled by PWM duty,
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/input/
Dpwm-vibrator.txt1 * PWM vibrator device tree bindings
3 Registers a PWM device as vibrator. It is expected, that the vibrator's
4 strength increases based on the duty cycle of the enable PWM channel
7 The binding supports an optional direction PWM channel, that can be
12 - compatible: should contain "pwm-vibrator"
13 - pwm-names: Should contain "enable" and optionally "direction"
14 - pwms: Should contain a PWM handle for each entry in pwm-names
17 - vcc-supply: Phandle for the regulator supplying power
18 - direction-duty-cycle-ns: Duty cycle of the direction PWM channel in
26 pinctrl-single,pins = <
[all …]
/kernel/linux/linux-5.10/drivers/pwm/
Dpwm-twl.c1 // 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
60 static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl_pwm_config() argument
69 * On-cycle is set to 1 (the minimum allowed value) in twl_pwm_config()
71 * 0 -> off cycle = 2, in twl_pwm_config()
72 * 1 -> off cycle = 2, in twl_pwm_config()
73 * 2 -> off cycle = 3, in twl_pwm_config()
74 * 126 - > off cycle 127, in twl_pwm_config()
[all …]
Dpwm-berlin.c2 * Marvell Berlin PWM driver
6 * Author: Antoine Tenart <antoine.tenart@free-electrons.com>
18 #include <linux/pwm.h>
42 u32 enable; member
62 return readl_relaxed(chip->base + channel * 0x10 + offset); in berlin_pwm_readl()
69 writel_relaxed(value, chip->base + channel * 0x10 + offset); in berlin_pwm_writel()
72 static int berlin_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_request() argument
78 return -ENOMEM; in berlin_pwm_request()
80 return pwm_set_chip_data(pwm, channel); in berlin_pwm_request()
83 static void berlin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_free() argument
[all …]
Dpwm-sifive.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2017-2018 SiFive
4 * For SiFive's PWM IP block documentation please refer Chapter 14 of
5 * Reference Manual : https://static.dev.sifive.com/FU540-C000-v1.0.pdf
8 * - When changing both duty cycle and period, we cannot prevent in
11 * - The hardware cannot generate a 100% duty cycle.
12 * - The hardware generates only inverted output.
18 #include <linux/pwm.h>
59 static int pwm_sifive_request(struct pwm_chip *chip, struct pwm_device *pwm) in pwm_sifive_request() argument
63 mutex_lock(&ddata->lock); in pwm_sifive_request()
[all …]
Dpwm-sti.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * PWM device driver for ST SoCs
5 * Copyright (C) 2013-2016 STMicroelectronics (R&D) Limited
18 #include <linux/pwm.h>
30 #define STI_INT_EN 0x54 /* Interrupt Enable/Disable register */
59 * Each capture input can be programmed to detect rising-edge, falling-edge,
101 struct mutex sti_pwm_lock; /* To sync between enable/disable calls */
126 struct sti_pwm_compat_data *cdata = pc->cdata; in sti_pwm_get_prescale()
131 clk_rate = clk_get_rate(pc->pwm_clk); in sti_pwm_get_prescale()
133 dev_err(pc->dev, "failed to get clock rate\n"); in sti_pwm_get_prescale()
[all …]
Dpwm-sprd.c1 // SPDX-License-Identifier: GPL-2.0
12 #include <linux/pwm.h>
43 * The list of clocks required by PWM channels, and each channel has 2 clocks:
44 * enable clock and pwm clock.
57 return readl_relaxed(spc->base + offset); in sprd_pwm_read()
65 writel_relaxed(val, spc->base + offset); in sprd_pwm_write()
68 static void sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, in sprd_pwm_get_state() argument
73 struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; in sprd_pwm_get_state()
79 * The clocks to PWM channel has to be enabled first before in sprd_pwm_get_state()
82 ret = clk_bulk_prepare_enable(SPRD_PWM_CHN_CLKS_NUM, chn->clks); in sprd_pwm_get_state()
[all …]
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 #include <linux/pwm.h>
20 * This driver handles the PWM driven LED terminals of TWL4030 and TWL6030.
22 * - LEDA uses PWMA
23 * - LEDB uses PWMB
58 static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl4030_pwmled_config() argument
67 * On-cycle is set to 1 (the minimum allowed value) in twl4030_pwmled_config()
69 * 0 -> off cycle = 2, in twl4030_pwmled_config()
70 * 1 -> off cycle = 2, in twl4030_pwmled_config()
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/leds/backlight/
Dmediatek,mt6370-backlight.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/leds/backlight/mediatek,mt6370-backlight.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - ChiaEn Wu <chiaen_wu@richtek.com>
21 - $ref: common.yaml#
26 - mediatek,mt6370-backlight
27 - mediatek,mt6372-backlight
29 default-brightness:
32 max-brightness:
[all …]
Dpwm-backlight.yaml1 # SPDX-License-Identifier: GPL-2.0-only
3 ---
4 $id: http://devicetree.org/schemas/leds/backlight/pwm-backlight.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: pwm-backlight
10 - Lee Jones <lee@kernel.org>
11 - Daniel Thompson <daniel.thompson@linaro.org>
12 - Jingoo Han <jingoohan1@gmail.com>
16 const: pwm-backlight
21 pwm-names: true
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/regulator/
Dpwm-regulator.txt1 Bindings for the Generic PWM Regulator
7 predefined voltage <=> duty-cycle values must be
10 Intermediary duty-cycle values which would normally
13 the user if the assumptions made in continuous-voltage
18 regulator-{min,max}-microvolt properties to calculate
19 appropriate duty-cycle values. This allows for a much
21 voltage-table mode above. This solution does make an
22 assumption that a %50 duty-cycle value will cause the
27 --------------------
28 - compatible: Should be "pwm-regulator"
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/leds/backlight/
Dpwm-backlight.yaml1 # SPDX-License-Identifier: GPL-2.0-only
3 ---
4 $id: http://devicetree.org/schemas/leds/backlight/pwm-backlight.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: pwm-backlight bindings
10 - Lee Jones <lee.jones@linaro.org>
11 - Daniel Thompson <daniel.thompson@linaro.org>
12 - Jingoo Han <jingoohan1@gmail.com>
16 const: pwm-backlight
21 pwm-names: true
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/regulator/
Dpwm-regulator.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/regulator/pwm-regulator.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Generic PWM Regulator
10 - Brian Norris <briannorris@chromium.org>
11 - Lee Jones <lee@kernel.org>
12 - Alexandre Courbot <acourbot@nvidia.com>
19 duty-cycle values must be provided via DT. Limitations are that the
21 Intermediary duty-cycle values which would normally allow finer grained
[all …]
/kernel/linux/linux-5.10/Documentation/ABI/testing/
Dsysfs-class-pwm1 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/pwmchipN/
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/pwmchipN/npwm
24 The number of PWM channels supported by the PWM chip.
26 What: /sys/class/pwm/pwmchipN/export
[all …]
/kernel/linux/linux-6.6/Documentation/ABI/testing/
Dsysfs-class-pwm1 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 …]
/kernel/linux/linux-6.6/drivers/input/misc/
Dpwm-vibra.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * PWM vibrator driver
10 * Based on PWM beeper driver:
11 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
21 #include <linux/pwm.h>
28 struct pwm_device *pwm; member
40 struct device *pdev = vibrator->input->dev.parent; in pwm_vibrator_start()
44 if (!vibrator->vcc_on) { in pwm_vibrator_start()
45 err = regulator_enable(vibrator->vcc); in pwm_vibrator_start()
47 dev_err(pdev, "failed to enable regulator: %d\n", err); in pwm_vibrator_start()
[all …]
/kernel/linux/linux-6.6/drivers/pwm/
Dpwm-sti.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * PWM device driver for ST SoCs
5 * Copyright (C) 2013-2016 STMicroelectronics (R&D) Limited
18 #include <linux/pwm.h>
30 #define STI_INT_EN 0x54 /* Interrupt Enable/Disable register */
59 * Each capture input can be programmed to detect rising-edge, falling-edge,
101 struct mutex sti_pwm_lock; /* To sync between enable/disable calls */
126 struct sti_pwm_compat_data *cdata = pc->cdata; in sti_pwm_get_prescale()
131 clk_rate = clk_get_rate(pc->pwm_clk); in sti_pwm_get_prescale()
133 dev_err(pc->dev, "failed to get clock rate\n"); in sti_pwm_get_prescale()
[all …]
Dpwm-sprd.c1 // SPDX-License-Identifier: GPL-2.0
13 #include <linux/pwm.h>
44 * The list of clocks required by PWM channels, and each channel has 2 clocks:
45 * enable clock and pwm clock.
58 return readl_relaxed(spc->base + offset); in sprd_pwm_read()
66 writel_relaxed(val, spc->base + offset); in sprd_pwm_write()
69 static int sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, in sprd_pwm_get_state() argument
74 struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; in sprd_pwm_get_state()
80 * The clocks to PWM channel has to be enabled first before in sprd_pwm_get_state()
83 ret = clk_bulk_prepare_enable(SPRD_PWM_CHN_CLKS_NUM, chn->clks); in sprd_pwm_get_state()
[all …]
/kernel/linux/linux-5.10/drivers/regulator/
Dpwm-regulator.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Regulator driver for PWM Regulators
5 * Copyright (C) 2014 - STMicroelectronics Inc.
18 #include <linux/pwm.h>
29 struct pwm_device *pwm; member
42 /* Enable GPIO */
52 * Voltage table call-backs
61 pwm_get_state(drvdata->pwm, &pwm_state); in pwm_regulator_init_state()
64 for (i = 0; i < rdev->desc->n_voltages; i++) { in pwm_regulator_init_state()
65 if (dutycycle == drvdata->duty_cycle_table[i].dutycycle) { in pwm_regulator_init_state()
[all …]
/kernel/linux/linux-5.10/drivers/video/backlight/
Dlp855x_bl.c1 // SPDX-License-Identifier: GPL-2.0-only
16 #include <linux/pwm.h>
39 #define DEFAULT_BL_NAME "lcd-backlight"
72 struct pwm_device *pwm; member
74 struct regulator *enable; /* regulator for EN/VDDIO input */ member
79 return i2c_smbus_write_byte_data(lp->client, reg, data); in lp855x_write_byte()
87 ret = i2c_smbus_read_byte_data(lp->client, reg); in lp855x_update_bit()
89 dev_err(lp->dev, "failed to read 0x%.2x\n", reg); in lp855x_update_bit()
104 switch (lp->chip_id) { in lp855x_is_valid_rom_area()
171 struct lp855x_platform_data *pd = lp->pdata; in lp855x_configure()
[all …]
/kernel/linux/linux-6.6/drivers/regulator/
Dpwm-regulator.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Regulator driver for PWM Regulators
5 * Copyright (C) 2014 - STMicroelectronics Inc.
18 #include <linux/pwm.h>
29 struct pwm_device *pwm; member
42 /* Enable GPIO */
52 * Voltage table call-backs
61 pwm_get_state(drvdata->pwm, &pwm_state); in pwm_regulator_init_state()
64 for (i = 0; i < rdev->desc->n_voltages; i++) { in pwm_regulator_init_state()
65 if (dutycycle == drvdata->duty_cycle_table[i].dutycycle) { in pwm_regulator_init_state()
[all …]

12345678910>>...42