/linux/drivers/pwm/ |
H A D | pwm-omap-dmtimer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Heavily based on earlier code which is: 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 26 * can get updated as below based on the current timer counter: [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 …]
|
H A D | pwm-clk.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Clock based PWM controller 7 * This is an "adapter" driver that allows PWM consumers to use 8 * system clocks with duty cycle control as PWM outputs. 11 * - Due to the fact that exact behavior depends on the underlying 13 * - Underlying clock may not be able to give 0% or 100% duty cycle 15 * - When the PWM is disabled, the clock will be disabled as well, 17 * - The clk API doesn't expose the necessary calls to implement 28 #include <linux/pwm.h> 40 static int pwm_clk_apply(struct pwm_chip *chip, struct pwm_device *pwm, in pwm_clk_apply() argument [all …]
|
H A D | pwm-tegra.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * drivers/pwm/pwm-tegra.c 5 * Tegra pulse-width-modulation controller driver 7 * Copyright (c) 2010-2020, NVIDIA Corporation. 8 * Based on arch/arm/plat-mxc/pwm.c by Sascha Hauer <s.hauer@pengutronix.de> 11 * 1. 13-bit: Frequency division (SCALE) 12 * 2. 8-bit : Pulse division (DUTY) 13 * 3. 1-bit : Enable bit 15 * The PWM clock frequency is divided by 256 before subdividing it based 17 * frequency for PWM output. The maximum output frequency that can be [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 2 menuconfig PWM config 3 bool "Pulse-Width Modulation (PWM) Support" 5 Generic Pulse-Width Modulation (PWM) support. 7 In Pulse-Width Modulation, a variation of the width of pulses 14 This framework provides a generic interface to PWM devices 16 to register and unregister a PWM chip, an abstraction of a PWM 17 controller, that supports one or more PWM devices. Client 18 drivers can request PWM devices and use the generic framework 21 This generic framework replaces the legacy PWM framework which [all …]
|
/linux/drivers/video/backlight/ |
H A D | Kconfig | 1 # 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 62 If you have a panel based on the ILI9221/9222 controller 69 If you have a panel based on the ILI9320 controller chip 84 If you have a VGG2432A4 panel based on the ILI9320 controller chip 90 This driver provides a platform-device registered LCD power 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 D | lp855x_bl.c | 1 // 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 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() 175 if (lp->cfg->pre_init_device) { in lp855x_configure() [all …]
|
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/Documentation/hwmon/ |
H A D | max31760.rst | 1 .. SPDX-License-Identifier: GPL-2.0-or-later 19 ----------- 21 The MAX31760 integrates temperature sensing along with precision PWM fan 23 temperature of a discrete diode-connected transistor, such as a 2N3906, 27 I2C-compatible interface. Fan speed is controlled based on the temperature 28 reading as an index to a 48-byte lookup table (LUT) containing 29 user-programmed PWM values. The flexible LUT-based architecture enables 35 remote high-temperature threshold has been exceeded. 37 Temperature measurement range: from -55°C to 125°C 41 Please refer how to instantiate this driver: Documentation/i2c/instantiating-devices.rst [all …]
|
H A D | tc654.rst | 13 - Chris Packham <chris.packham@alliedtelesis.co.nz> 14 - Masahiko Iwamoto <iwamoto@allied-telesis.co.jp> 17 ----------- 20 The TC654 uses the 2-wire interface compatible with the SMBUS 2.0 22 one (1) PWM output which can be used for fan control. 25 ------------------- 26 Ordinarily the pwm1_mode ABI is used for controlling the pwm output 27 mode. However, for this chip the output is always pwm, and the 28 pwm1_mode determines if the pwm output is controlled via the pwm1 value 32 Setting pwm1_mode to 1 will cause the pwm output to be driven based on [all …]
|
H A D | emc2305.rst | 1 .. SPDX-License-Identifier: GPL-2.0 12 https://www.microchip.com/en-us/product/EMC2305 15 ------------ 16 This driver implements support for Microchip EMC2301/2/3/5 RPM-based PWM Fan Controller. 17 The EMC2305 Fan Controller supports up to 5 independently controlled PWM fan drives. 19 The driver supports the RPM-based PWM control to keep a fan at the desired speed. 20 The driver provides the possibility to have one common PWM interface for all FANs 26 fan[1-5]_fault RO files for tachometers TACH1-TACH5 fault indication 27 fan[1-5]_input RO files for tachometers TACH1-TACH5 input (in RPM) 28 pwm[1-5] RW file for fan[1-5] target duty cycle (0..255)
|
H A D | adt7470.rst | 17 ----------- 22 The ADT7470 uses the 2-wire interface compatible with the SMBus 2.0 24 external temperatures. It has four (4) 16-bit counters for measuring fan speed. 25 There are four (4) PWM outputs that can be used to control fan speed. 27 A sophisticated control system for the PWM outputs is designed into the ADT7470 28 that allows fan speed to be adjusted automatically based on any of the ten 29 temperature sensors. Each PWM output is individually adjustable and 30 programmable. Once configured, the ADT7470 will adjust the PWM outputs in 32 feature can also be disabled for manual control of the PWM's. 40 automatic fan pwm control to set the fan speed. The driver will not read the [all …]
|
H A D | adt7462.rst | 17 ----------- 27 A sophisticated control system for the PWM outputs is designed into the ADT7462 28 that allows fan speed to be adjusted automatically based on any of the three 29 temperature sensors. Each PWM output is individually adjustable and 30 programmable. Once configured, the ADT7462 will adjust the PWM outputs in 32 feature can also be disabled for manual control of the PWM's. 43 ---------------- 45 The ADT7462 have a 10-bit ADC and can therefore measure temperatures 49 determining an optimal configuration for the automatic PWM control. 55 ------------------- [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 …]
|
/linux/drivers/leds/ |
H A D | leds-pwm.c | 1 // 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> 30 struct pwm_device *pwm; member 45 unsigned int max = led_dat->cdev.max_brightness; in led_pwm_set() 46 unsigned long long duty = led_dat->pwmstate.period; in led_pwm_set() 51 if (led_dat->active_low) in led_pwm_set() 52 duty = led_dat->pwmstate.period - duty; in led_pwm_set() [all …]
|
/linux/Documentation/devicetree/bindings/pwm/ |
H A D | pwm.txt | 1 Specifying PWM information for devices 4 1) PWM user nodes 5 ----------------- 7 PWM users should specify a list of PWM devices that they want to use 8 with a property containing a 'pwm-list': 10 pwm-list ::= <single-pwm> [pwm-list] 11 single-pwm ::= <pwm-phandle> <pwm-specifier> 12 pwm-phandle : phandle to PWM controller node 13 pwm-specifier : array of #pwm-cells specifying the given PWM 16 PWM properties should be named "pwms". The exact meaning of each pwms [all …]
|
H A D | clk-pwm.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/pwm/clk-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Clock based PWM controller 10 - Nikita Travkin <nikita@trvn.ru> 15 It's often possible to control duty-cycle of such clocks which makes them 16 suitable for generating PWM signal. 19 - $ref: pwm.yaml# 23 const: clk-pwm [all …]
|
H A D | pwm-tiehrpwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/pwm-tiehrpwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI SOC EHRPWM based PWM controller 10 - Vignesh R <vigneshr@ti.com> 13 - $ref: pwm.yaml# 18 - const: ti,am3352-ehrpwm 19 - items: 20 - enum: [all …]
|
H A D | pwm-tiecap.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/pwm/pwm-tiecap.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI SOC ECAP based APWM controller 10 - Vignesh R <vigneshr@ti.com> 13 - $ref: pwm.yaml# 18 - const: ti,am3352-ecap 19 - items: 20 - enum: [all …]
|
/linux/drivers/input/misc/ |
H A D | pwm-vibra.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * PWM vibrator driver 7 * Based on previous work from: 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() [all …]
|
/linux/Documentation/driver-api/backlight/ |
H A D | lp855x-driver.rst | 15 ----------- 19 Brightness can be controlled by the pwm input or the i2c command. 28 Value: pwm based or register based 37 ------------------------ 48 Platform specific PWM period value. unit is nano. 49 Only valid when brightness is pwm input mode. 68 .name = "lcd-bl", 75 2) lp8556 platform data: pwm input mode with default rom data::
|
/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos4412-odroidu3.dts | 1 // SPDX-License-Identifier: GPL-2.0 3 * Hardkernel's Exynos4412 based ODROID-U3 board device tree source 7 * Device tree source file for Hardkernel's ODROID-U3 board which is based 11 /dts-v1/; 12 #include <dt-bindings/leds/common.h> 13 #include "exynos4412-odroid-common.dtsi" 14 #include "exynos4412-prime.dtsi" 17 model = "Hardkernel ODROID-U3 board based on Exynos4412"; 18 compatible = "hardkernel,odroid-u3", "samsung,exynos4412", "samsung,exynos4"; 29 vbus_otg_reg: regulator-1 { [all …]
|
H A D | exynos4412-itop-elite.dts | 1 // SPDX-License-Identifier: GPL-2.0 3 * TOPEET's Exynos4412 based itop board device tree source 10 * which is based on Samsung's Exynos4412 SoC. 13 /dts-v1/; 14 #include <dt-bindings/leds/common.h> 15 #include <dt-bindings/pwm/pwm.h> 16 #include <dt-bindings/sound/samsung-i2s.h> 17 #include "exynos4412-itop-scp-core.dtsi" 20 model = "TOPEET iTop 4412 Elite board based on Exynos4412"; 21 compatible = "topeet,itop4412-elite", "samsung,exynos4412", "samsung,exynos4"; [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/Documentation/devicetree/bindings/pinctrl/ |
H A D | brcm,nsp-pinmux.txt | 3 The NSP IOMUX controller supports group based mux configuration. In 7 - compatible: 8 Must be "brcm,nsp-pinmux" 10 - reg: 15 - function: 18 - groups: 22 Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt 27 compatible = "brcm,nsp-pinmux"; 32 pinctrl-names = "default"; 33 pinctrl-0 = <&pwm>, <&gpio_b>, <&nand_sel>; [all …]
|