Home
last modified time | relevance | path

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

12345678910>>...33

/linux/Documentation/hwmon/
H A 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 …]
H A Ddme1737.rst18 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 …]
/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 …]
/linux/Documentation/devicetree/bindings/input/
H A 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 …]
H A 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 …]
/linux/Documentation/devicetree/bindings/leds/backlight/
H A 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>
15 - $ref: common.yaml#
19 const: pwm-backlight
[all …]
H A 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 …]
/linux/drivers/pwm/
H A 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,
95 struct mutex sti_pwm_lock; /* To sync between enable/disable calls */
124 clk_rate = clk_get_rate(pc->pwm_clk); in sti_pwm_get_prescale()
126 dev_err(pc->dev, "failed to get clock rate\n"); in sti_pwm_get_prescale()
127 return -EINVAL; in sti_pwm_get_prescale()
[all …]
H A Dpwm-sprd.c1 // SPDX-License-Identifier: GPL-2.0
13 #include <linux/pwm.h>
46 * The list of clocks required by PWM channels, and each channel has 2 clocks:
47 * enable clock and pwm clock.
60 return readl_relaxed(spc->base + offset); in sprd_pwm_read()
68 writel_relaxed(val, spc->base + offset); in sprd_pwm_write()
71 static int sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, in sprd_pwm_get_state() argument
75 struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; in sprd_pwm_get_state()
81 * The clocks to PWM channel has to be enabled first before in sprd_pwm_get_state()
84 ret = clk_bulk_prepare_enable(SPRD_PWM_CHN_CLKS_NUM, chn->clks); in sprd_pwm_get_state()
[all …]
H A Dpwm-rockchip.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * PWM driver for Rockchip SoCs
15 #include <linux/pwm.h>
60 struct pwm_device *pwm, in rockchip_pwm_get_state() argument
64 u32 enable_conf = pc->data->enable_conf; in rockchip_pwm_get_state()
70 ret = clk_enable(pc->pclk); in rockchip_pwm_get_state()
74 ret = clk_enable(pc->clk); in rockchip_pwm_get_state()
78 clk_rate = clk_get_rate(pc->clk); in rockchip_pwm_get_state()
80 tmp = readl_relaxed(pc->base + pc->data->regs.period); in rockchip_pwm_get_state()
81 tmp *= pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state()
[all …]
H A 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
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 Dpwm-berlin.c2 * Marvell Berlin PWM driver
6 * Author: Antoine Tenart <antoine.tenart@free-electrons.com>
19 #include <linux/pwm.h>
45 u32 enable; member
65 return readl_relaxed(bpc->base + channel * 0x10 + offset); in berlin_pwm_readl()
72 writel_relaxed(value, bpc->base + channel * 0x10 + offset); in berlin_pwm_writel()
75 static int berlin_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in berlin_pwm_config() argument
83 cycles = clk_get_rate(bpc->clk); in berlin_pwm_config()
92 return -ERANGE; in berlin_pwm_config()
100 value = berlin_pwm_readl(bpc, pwm->hwpwm, BERLIN_PWM_CONTROL); in berlin_pwm_config()
[all …]
H A 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.
19 #include <linux/pwm.h>
60 static int pwm_sifive_request(struct pwm_chip *chip, struct pwm_device *pwm) in pwm_sifive_request() argument
64 mutex_lock(&ddata->lock); in pwm_sifive_request()
[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>
49 static int ecap_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in ecap_pwm_config() argument
57 c = pc->clk_rate; in ecap_pwm_config()
66 c = pc->clk_rate; in ecap_pwm_config()
74 value = readw(pc->mmio_base + ECCTL2); in ecap_pwm_config()
79 writew(value, pc->mmio_base + ECCTL2); in ecap_pwm_config()
83 writel(duty_cycles, pc->mmio_base + CAP2); in ecap_pwm_config()
[all …]
H A Dpwm-dwc-core.c1 // SPDX-License-Identifier: GPL-2.0
3 * DesignWare PWM Controller driver core
5 * Copyright (C) 2018-2020 Intel Corporation
20 #include <linux/pwm.h>
22 #include "pwm-dwc.h"
24 static void __dwc_pwm_set_enable(struct dwc_pwm *dwc, int pwm, int enabled) in __dwc_pwm_set_enable() argument
28 reg = dwc_pwm_readl(dwc, DWC_TIM_CTRL(pwm)); in __dwc_pwm_set_enable()
35 dwc_pwm_writel(dwc, reg, DWC_TIM_CTRL(pwm)); in __dwc_pwm_set_enable()
39 struct pwm_device *pwm, in __dwc_pwm_configure_timer() argument
52 tmp = DIV_ROUND_CLOSEST_ULL(state->duty_cycle, dwc->clk_ns); in __dwc_pwm_configure_timer()
[all …]
/linux/Documentation/devicetree/bindings/regulator/
H A 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 …]
H A Dtps51632-regulator.txt4 - compatible: Must be "ti,tps51632"
5 - reg: I2C slave address
8 - ti,enable-pwm-dvfs: Enable the DVFS voltage control through the PWM interface.
9 - ti,dvfs-step-20mV: The 20mV step voltage when PWM DVFS enabled. Missing this
10 will set 10mV step voltage in PWM DVFS mode. In normal mode, the voltage
21 regulator-name = "tps51632-vout";
22 regulator-min-microvolt = <500000>;
23 regulator-max-microvolt = <1500000>;
24 regulator-boot-on;
25 ti,enable-pwm-dvfs;
[all …]
/linux/drivers/input/misc/
H A 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 …]
/linux/Documentation/ABI/testing/
H A 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 …]
/linux/drivers/regulator/
H A 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 …]
/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
16 #include <linux/pwm.h>
22 struct pwm_device *pwm; member
43 if (pb->enabled) in pwm_backlight_power_on()
46 if (pb->power_supply) { in pwm_backlight_power_on()
47 err = regulator_enable(pb->power_supply); in pwm_backlight_power_on()
49 dev_err(pb->dev, "failed to enable power supply\n"); in pwm_backlight_power_on()
52 if (pb->post_pwm_on_delay) in pwm_backlight_power_on()
[all …]
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
14 This framework adds support for low-level control of LCD.
15 Some framebuffer devices connect to platform-specific LCD modules
16 in order to have a platform-specific way to control the flat panel
90 This driver provides a platform-device registered LCD power
99 say Y to enable LCD control driver.
106 If you have an AMS369FG06 AMOLED Panel, say Y to enable its
114 If you have an LMS501KF03 LCD Panel, say Y to enable its
118 tristate "Himax HX-8357 LCD Driver"
121 If you have a HX-8357 LCD panel, say Y to enable its LCD control
[all …]
H A Dlp855x_bl.c1 // SPDX-License-Identifier: GPL-2.0-only
17 #include <linux/pwm.h>
40 #define DEFAULT_BL_NAME "lcd-backlight"
73 struct pwm_device *pwm; member
76 struct regulator *enable; /* regulator for EN/VDDIO input */ member
81 return i2c_smbus_write_byte_data(lp->client, reg, data); in lp855x_write_byte()
89 ret = i2c_smbus_read_byte_data(lp->client, reg); in lp855x_update_bit()
91 dev_err(lp->dev, "failed to read 0x%.2x\n", reg); in lp855x_update_bit()
106 switch (lp->chip_id) { in lp855x_is_valid_rom_area()
173 struct lp855x_platform_data *pd = lp->pdata; in lp855x_configure()
[all …]
H A Dmp3309c.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * This driver support both analog (by I2C commands) and PWM dimming control
20 #include <linux/pwm.h>
92 /* I2C register #0 - Device enable */ in mp3309c_enable_device()
93 ret = regmap_update_bits(chip->regmap, REG_I2C_0, REG_I2C_0_EN, in mp3309c_enable_device()
99 * I2C register #1 - Set working mode: in mp3309c_enable_device()
100 * - enable/disable synchronous mode in mp3309c_enable_device()
101 * - set overvoltage protection (OVP) in mp3309c_enable_device()
104 if (chip->pdata->sync_mode) in mp3309c_enable_device()
106 reg_val |= chip->pdata->over_voltage_protection; in mp3309c_enable_device()
[all …]
/linux/drivers/leds/
H A Dleds-lm3530.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2011 ST-Ericsson SA.
9 * based on leds-lm3530.c by Dan Murphy <D.Murphy@motorola.com>
17 #include <linux/led-lm3530.h>
22 #define LM3530_LED_DEV "lcd-backlight"
23 #define LM3530_NAME "lm3530-led"
92 { "pwm", LM3530_BL_MODE_PWM },
100 * @mode: mode of operation - manual, ALS, PWM
103 * @enable: regulator is enabled
112 bool enable; member
[all …]

12345678910>>...33