| /linux/Documentation/hwmon/ |
| H A D | pwm-fan.rst | 1 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 D | dme1737.rst | 18 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 …]
|
| H A D | sysfs-interface.rst | 5 through the sysfs interface. Since lm-sensors 3.0.0, libsensors is 6 completely chip-independent. It assumes that all the kernel drivers 10 This is a major improvement compared to lm-sensors 2. 22 For this reason, even if we aim at a chip-independent libsensors, it will 37 Up to lm-sensors 3.0.0, libsensors looks for hardware monitoring attributes 38 in the "physical" device directory. Since lm-sensors 3.0.1, attributes found 61 to cause an alarm) is chip-dependent. 69 ---------------- 76 ------------------------------------------------------------------------- 79 `[0-*]` denotes any positive number starting from 0 [all …]
|
| H A D | lm93.rst | 10 Addresses scanned: I2C 0x2c-0x2e 18 Addresses scanned: I2C 0x2c-0x2e 24 - Mark M. Hoffman <mhoffman@lightlink.com> 25 - Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com> 26 - Adapted to 2.6.20 by Carsten Emde <ce@osadl.org> 27 - Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de> 30 ----------------- 33 Set to non-zero to force some initializations (default is 0). 38 Configures in7 and in8 limit type, where 0 means absolute and non-zero 54 -------------------- [all …]
|
| /linux/Documentation/driver-api/ |
| H A 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 …]
|
| /linux/Documentation/devicetree/bindings/input/ |
| H A D | pwm-vibrator.yaml | 1 # 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 …]
|
| /linux/drivers/pwm/ |
| H A D | pwm-stm32-lp.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * STM32 Low-Power Timer PWM driver 9 * Inspired by Gerald Baeza's pwm-stm32 driver 13 #include <linux/mfd/stm32-lptimer.h> 18 #include <linux/pwm.h> 31 /* STM32 Low-Power Timer is preceded by a configurable power-of-2 prescaler */ 40 /* Only one PWM on this LPTIMER: enable, prescaler and reload value can be changed */ in stm32_pwm_lp_update_allowed() 41 if (!priv->num_cc_chans) in stm32_pwm_lp_update_allowed() 44 ret = regmap_read(priv->regmap, STM32_LPTIM_CCMR1, &ccmr1); in stm32_pwm_lp_update_allowed() 49 /* More than one channel enabled: enable, prescaler or ARR value can't be changed */ in stm32_pwm_lp_update_allowed() [all …]
|
| H A D | pwm-sprd.c | 1 // 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 D | pwm-sti.c | 1 // 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, 123 clk_rate = clk_get_rate(pc->pwm_clk); in sti_pwm_get_prescale() 125 dev_err(pc->dev, "failed to get clock rate\n"); in sti_pwm_get_prescale() 126 return -EINVAL; in sti_pwm_get_prescale() 130 * prescale = ((period_ns * clk_rate) / (10^9 * (max_pwm_cnt + 1)) - 1 in sti_pwm_get_prescale() [all …]
|
| H A D | pwm-rockchip.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * PWM driver for Rockchip SoCs 17 #include <linux/pwm.h> 62 struct pwm_device *pwm, in rockchip_pwm_get_state() argument 66 u64 prescaled_ns = (u64)pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state() 67 u32 enable_conf = pc->data->enable_conf; in rockchip_pwm_get_state() 73 ret = clk_enable(pc->pclk); in rockchip_pwm_get_state() 77 ret = clk_enable(pc->clk); in rockchip_pwm_get_state() 81 clk_rate = clk_get_rate(pc->clk); in rockchip_pwm_get_state() 83 tmp = readl_relaxed(pc->base + pc->data->regs.period); in rockchip_pwm_get_state() [all …]
|
| H A D | pwm-twl.c | 1 // 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 D | pwm-sifive.c | 1 // 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 7 * PWM output inversion: According to the SiFive Reference manual 12 * hard-tied to 0 (XNOR), which effectively inverts the comparison so that 21 * **active-high** PWM interface. 25 * - When changing both duty cycle and period, we cannot prevent in 28 * - The hardware cannot generate a 0% duty cycle. 29 * - The hardware generates only inverted output. [all …]
|
| H A D | pwm-dwc-core.c | 1 // 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/leds/backlight/ |
| H A D | pwm-backlight.yaml | 1 # 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 D | mediatek,mt6370-backlight.yaml | 1 # 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/Documentation/devicetree/bindings/regulator/ |
| H A D | pwm-regulator.yaml | 1 # 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 D | tps51632-regulator.txt | 4 - 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 D | pwm-vibra.c | 1 // 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 D | sysfs-class-pwm | 1 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 D | pwm-regulator.c | 1 // 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 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 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 …]
|
| /linux/drivers/leds/ |
| H A D | leds-lm3530.c | 1 // 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 …]
|
| /linux/arch/arm/boot/dts/nxp/imx/ |
| H A D | imx7-colibri-iris.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 12 * The Atmel maxtouch controller uses SODIMM 28/30, also used for PWM<B>, PWM<C>, aka pwm2, pwm3. 13 * So if you enable following capacitive touch controller, disable pwm2/pwm3 first. 16 interrupt-parent = <&gpio1>; 18 pinctrl-0 = <&pinctrl_atmel_adapter>; 19 reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; /* SODIMM 30 / RST */ 38 uart25-tx-on-hog { 39 gpio-hog; 41 output-high; 46 uart1-tx-on-hog { [all …]
|
| H A D | imx7-colibri-eval-v3.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 3 * Copyright 2016-2022 Toradex 9 compatible = "fixed-clock"; 10 #clock-cells = <0>; 11 clock-frequency = <16000000>; 21 * The Atmel maxtouch controller uses SODIMM 28/30, also used for PWM<B>, PWM<C>, aka pwm2, pwm3. 22 * So if you enable following capacitive touch controller, disable pwm2/pwm3 first. 25 interrupt-parent = <&gpio1>; 27 pinctrl-0 = <&pinctrl_atmel_adapter>; 28 reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; /* SODIMM 30 / RST */ [all …]
|
| /linux/arch/arm64/boot/dts/qcom/ |
| H A D | msm8916-samsung-gt510.dts | 1 // SPDX-License-Identifier: GPL-2.0-only 3 /dts-v1/; 5 #include "msm8916-samsung-gt5-common.dtsi" 10 chassis-type = "tablet"; 12 speaker_codec: audio-codec { 14 sdmode-gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>; 15 #sound-dai-cells = <0>; 16 pinctrl-0 = <&audio_sdmode_default>; 17 pinctrl-names = "default"; 20 clk_pwm: pwm { [all …]
|