| /linux/drivers/pwm/ | 
| H A D | pwm-atmel.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8  * Links to reference manuals for the supported PWM chips can be found in 12  * - Periods start with the inactive level. 13  * - Hardware has to be stopped in general to update settings. 16  * - When atmel_pwm_apply() is called with state->enabled=false a change in 17  *   state->polarity isn't honored. 18  * - Instead of sleeping to wait for a completed period, the interrupt 29 #include <linux/pwm.h> 32 /* The following is global registers for PWM controller */ 40 /* The following register is PWM channel related registers */ [all …] 
 | 
| H A D | pwm-pxa.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3  * drivers/pwm/pwm-pxa.c 5  * simple driver for PWM (Pulse Width Modulator) controller 7  * 2008-02-13	initial version 10  * Links to reference manuals for some of the supported PWM chips can be found 14  * - When PWM is stopped, the current PWM period stops abruptly at the next 26 #include <linux/pwm.h> 35 	/*   PWM    has_secondary_pwm? */ 36 	{ "pxa25x-pwm", 0 }, 37 	{ "pxa27x-pwm", HAS_SECONDARY_PWM }, [all …] 
 | 
| H A D | pwm-lp3943.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3  * TI/National Semiconductor LP3943 PWM driver 15 #include <linux/pwm.h> 36 	struct lp3943_platform_data *pdata = lp3943_pwm->pdata;  in lp3943_pwm_request_map() 37 	struct lp3943 *lp3943 = lp3943_pwm->lp3943;  in lp3943_pwm_request_map() 38 	struct lp3943_pwm_map *pwm_map = &lp3943_pwm->pwm_map[hwpwm];  in lp3943_pwm_request_map() 39 	int i, offset;  in lp3943_pwm_request_map()  local 41 	pwm_map->output = pdata->pwms[hwpwm]->output;  in lp3943_pwm_request_map() 42 	pwm_map->num_outputs = pdata->pwms[hwpwm]->num_outputs;  in lp3943_pwm_request_map() 44 	for (i = 0; i < pwm_map->num_outputs; i++) {  in lp3943_pwm_request_map() [all …] 
 | 
| H A D | pwm-brcmstb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3  * Broadcom BCM7038 PWM driver 19 #include <linux/pwm.h> 41  * Maximum control word value allowed when variable-frequency PWM is used as a 42  * clock for the constant-frequency PMW. 60 				    unsigned int offset)  in brcmstb_pwm_readl()  argument 63 		return __raw_readl(p->base + offset);  in brcmstb_pwm_readl() 65 		return readl_relaxed(p->base + offset);  in brcmstb_pwm_readl() 69 				      unsigned int offset)  in brcmstb_pwm_writel()  argument 72 		__raw_writel(value, p->base + offset);  in brcmstb_pwm_writel() [all …] 
 | 
| H A D | pwm-spear.c | 21 #include <linux/pwm.h> 27 /* PWM registers and bits definitions */ 47  * struct spear_pwm_chip - struct representing pwm chip 49  * @mmio_base: base address of pwm chip 50  * @clk: pointer to clk structure of pwm chip 63 				  unsigned long offset)  in spear_pwm_readl()  argument 65 	return readl_relaxed(chip->mmio_base + (num << 4) + offset);  in spear_pwm_readl() 69 				    unsigned int num, unsigned long offset,  in spear_pwm_writel()  argument 72 	writel_relaxed(val, chip->mmio_base + (num << 4) + offset);  in spear_pwm_writel() 75 static int spear_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,  in spear_pwm_config()  argument [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. 58 	u32 offset = reg + (hwid << SPRD_PWM_REGS_SHIFT);  in sprd_pwm_read()  local 60 	return readl_relaxed(spc->base + offset);  in sprd_pwm_read() 66 	u32 offset = reg + (hwid << SPRD_PWM_REGS_SHIFT);  in sprd_pwm_write()  local 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() [all …] 
 | 
| H A D | pwm-keembay.c | 1 // SPDX-License-Identifier: GPL-2.0 3  * Intel Keem Bay PWM driver 10  * - Upon disabling a channel, the currently running 22 #include <linux/pwm.h> 34 /* PWM Register offset */ 71 					   u32 val, u32 offset)  in keembay_pwm_update_bits()  argument 73 	u32 buff = readl(priv->base + offset);  in keembay_pwm_update_bits() 76 	writel(buff, priv->base + offset);  in keembay_pwm_update_bits() 91 static int keembay_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,  in keembay_pwm_get_state()  argument 99 	clk_rate = clk_get_rate(priv->clk);  in keembay_pwm_get_state() [all …] 
 | 
| H A D | pwm-rcar.c | 1 // SPDX-License-Identifier: GPL-2.0 3  * R-Car PWM Timer driver 8  * - The hardware cannot generate a 0% duty cycle. 21 #include <linux/pwm.h> 52 			   unsigned int offset)  in rcar_pwm_write()  argument 54 	writel(data, rp->base + offset);  in rcar_pwm_write() 57 static u32 rcar_pwm_read(struct rcar_pwm_chip *rp, unsigned int offset)  in rcar_pwm_read()  argument 59 	return readl(rp->base + offset);  in rcar_pwm_read() 63 			    unsigned int offset)  in rcar_pwm_update()  argument 67 	value = rcar_pwm_read(rp, offset);  in rcar_pwm_update() [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 | pwm-sun4i.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5  * Copyright (C) 2014 Alexandre Belloni <alexandre.belloni@free-electrons.com> 8  * - When outputing the source clock directly, the PWM logic will be bypassed 21 #include <linux/pwm.h> 46 #define PWM_PRD(prd)		(((prd) - 1) << 16) 96 				  unsigned long offset)  in sun4i_pwm_readl()  argument 98 	return readl(sun4ichip->base + offset);  in sun4i_pwm_readl() 102 				    u32 val, unsigned long offset)  in sun4i_pwm_writel()  argument 104 	writel(val, sun4ichip->base + offset);  in sun4i_pwm_writel() 108 			       struct pwm_device *pwm,  in sun4i_pwm_get_state()  argument [all …] 
 | 
| H A D | pwm-sl28cpld.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3  * sl28cpld PWM driver 7  * There is no public datasheet available for this PWM core. But it is easy 8  * enough to be briefly explained. It consists of one 8-bit counter. The PWM 15  * +-----------+--------+--------------+-----------+---------------+ 17  * +-----------+--------+--------------+-----------+---------------+ 22  * +-----------+--------+--------------+-----------+---------------+ 25  * - The hardware cannot generate a 100% duty cycle if the prescaler is 0. 26  * - The hardware cannot atomically set the prescaler and the counter value, 28  * - The counter is not reset if you switch the prescaler which leads [all …] 
 | 
| H A D | pwm-hibvt.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3  * PWM Controller Driver for HiSilicon BVT SoCs 15 #include <linux/pwm.h> 70 static void hibvt_pwm_set_bits(void __iomem *base, u32 offset,  in hibvt_pwm_set_bits()  argument 73 	void __iomem *address = base + offset;  in hibvt_pwm_set_bits() 82 static void hibvt_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)  in hibvt_pwm_enable()  argument 86 	hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm),  in hibvt_pwm_enable() 90 static void hibvt_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)  in hibvt_pwm_disable()  argument 94 	hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm),  in hibvt_pwm_disable() 98 static void hibvt_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,  in hibvt_pwm_config()  argument [all …] 
 | 
| /linux/drivers/leds/ | 
| H A D | leds-pca9532.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3  * pca9532.c - 16-bit Led dimmer 18 #include <linux/leds-pca9532.h> 54 	u8 pwm[2];  member 108 		.name = "leds-pca953x", 116 /* We have two pwm/blinkers, but 16 possible leds to drive. Additionally, 117  * the clever Thecus people are using one pwm to drive the beeper. So, 118  * as a compromise we average one pwm to the values requested by all 121 static int pca9532_calcpwm(struct i2c_client *client, int pwm, int blink,  in pca9532_calcpwm()  argument 126 	for (i = 0; i < data->chip_info->num_leds; i++) {  in pca9532_calcpwm() [all …] 
 | 
| /linux/Documentation/hwmon/ | 
| H A D | lm85.rst | 79        - Philip Pokorny <ppokorny@penguincomputing.com>, 80        - Frodo Looijaard <frodol@dds.nl>, 81        - Richard Barrington <rich_b_nz@clear.net.nz>, 82        - Margit Schubert-While <margitsw@t-online.de>, 83        - Justin Thiessen <jthiessen@penguincomputing.com> 86 ----------- 92 The LM85 uses the 2-wire interface compatible with the SMBUS 2.0 94 temperatures and five (5) voltages. It has four (4) 16-bit counters for 96 VID signals from the processor to the VRM. Lastly, there are three (3) PWM 110 A sophisticated control system for the PWM outputs is designed into the [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 …] 
 | 
| H A D | vt1211.rst | 10     Addresses scanned: none, address read from Super-I/O config space 24 ----------------- 29 			configuration for channels 1-5. 30 			Legal values are in the range of 0-31. Bit 0 maps to 47 ----------- 49 The VIA VT1211 Super-I/O chip includes complete hardware monitoring 52 implements 5 universal input channels (UCH1-5) that can be individually 60 connected to the PWM outputs of the VT1211 :-(). 80 ------------------ 82 Voltages are sampled by an 8-bit ADC with a LSB of ~10mV. The supported input [all …] 
 | 
| H A D | asc7621.rst | 20 Andigilog has both the PECI and pre-PECI versions of the Heceta-6, as 21 Intel calls them. Heceta-6e has high frequency PWM and Heceta-6p has 23 Heceta-6e part and aSC7621 is the Heceta-6p part. They are both in 28 have used registers below 20h for vendor-specific functions in addition 29 to those in the Intel-specified vendor range. 32 The fan speed control uses this finer value to produce a "step-less" fan 33 PWM output. These two bytes are "read-locked" to guarantee that once a 34 high or low byte is read, the other byte is locked-in until after the 37 sheet says 10-bits of resolution, although you may find the lower bits 42 data sheet. Our temperature reports and fan PWM outputs are very smooth [all …] 
 | 
| /linux/Documentation/devicetree/bindings/reset/ | 
| H A D | intel,rcu-gw.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/reset/intel,rcu-gw.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10   - Dilip Kota <eswara.kota@linux.intel.com> 15       - intel,rcu-lgm 16       - intel,rcu-xrx200 22   intel,global-reset: 23     description: Global reset register offset and bit offset. 24     $ref: /schemas/types.yaml#/definitions/uint32-array [all …] 
 | 
| /linux/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ | 
| H A D | pptable_v1_0.h | 173 	USHORT usVddgfxOffset;	/* Offset relative to Vddc voltage */ 187 	USHORT usVddcOffset;										/* Offset relative to base voltage */ 191 …UCHAR  ucCKSVOffsetandDisable;							  /* Bits 0~6: Voltage offset for CKS, Bit 7: Disable/enable … 202 	USHORT usVddcOffset;										/* Offset relative to base voltage */ 206 …UCHAR  ucCKSVOffsetandDisable;			/* Bits 0~6: Voltage offset for CKS, Bit 7: Disable/enable for th… 244 	USHORT  usVddgfxOffset;									  /* Offset relative to VDDC voltage */ 245 	ULONG  ulDClk;												/* UVD D-clock */ 246 	ULONG  ulVClk;												/* UVD V-clock */ 274 …sTMin; 						 /* The temperature, in 0.01 centigrades, below which we just run at a minimal PWM. */ 277 	USHORT  usPWMMin;						 /* The minimum PWM value in percent (0.01% increments). */ [all …] 
 | 
| /linux/drivers/hwmon/ | 
| H A D | mlxreg-fan.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 27  * FAN datasheet defines the formula for RPM calculations as RPM = 15/t-high. 28  * The logic in a programmable device measures the time t-high by sampling the 29  * tachometer every t-sample (with the default value 11.32 uS) and increment 31  * RPM = 15 / (t-sample * (K + Regval)), where: 33  *  - 0xff - represents tachometer fault; 34  *  - 0xfe - represents tachometer minimum value , which is 4444 RPM; 35  *  - 0x00 - represents tachometer maximum value , which is 300000 RPM; 39  * used: RPM = 15 / ((Regval + K) * 11.32) * 10^(-6)), which in  the 42  * - for Regval 0x00, RPM will be 15000000 * 100 / (44 * 1132) = 30115; [all …] 
 | 
| H A D | asb100.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3  * asb100.c - Part of lm_sensors, Linux kernel modules for hardware 10  * Copyright (C) 1998 - 2003  Frodo Looijaard <frodol@dds.nl>, 17  * ASB100-A "BACH". 19  * ASB100-A supports pwm1, while plain ASB100 does not.  There is no known 22  * Chip		#vin	#fanin	#pwm	#temp	wchipid	vendid	i2c	ISA 32 #include <linux/hwmon-sysfs.h> 33 #include <linux/hwmon-vid.h> 48 /* Voltage IN registers 0-6 */ 53 /* FAN IN registers 1-3 */ [all …] 
 | 
| /linux/Documentation/devicetree/bindings/display/ | 
| H A D | solomon,ssd1307fb.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10   - Maxime Ripard <mripard@kernel.org> 11   - Javier Martinez Canillas <javierm@redhat.com> 17       - enum: 18           - solomon,ssd1305fb-i2c 19           - solomon,ssd1306fb-i2c 20           - solomon,ssd1307fb-i2c 21           - solomon,ssd1309fb-i2c [all …] 
 | 
| /linux/arch/arm64/boot/dts/nvidia/ | 
| H A D | tegra186.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 2 #include <dt-bindings/clock/tegra186-clock.h> 3 #include <dt-bindings/gpio/tegra186-gpio.h> 4 #include <dt-bindings/interrupt-controller/arm-gic.h> 5 #include <dt-bindings/mailbox/tegra186-hsp.h> 6 #include <dt-bindings/memory/tegra186-mc.h> 7 #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h> 8 #include <dt-bindings/power/tegra186-powergate.h> 9 #include <dt-bindings/reset/tegra186-reset.h> 10 #include <dt-bindings/thermal/tegra186-bpmp-thermal.h> [all …] 
 | 
| /linux/arch/loongarch/boot/dts/ | 
| H A D | loongson-2k0500.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/clock/loongson,ls2k-clk.h> 12 	#address-cells = <2>; 13 	#size-cells = <2>; 16 		#address-cells = <1>; 17 		#size-cells = <0>; 27 	ref_100m: clock-ref-100m { 28 		compatible = "fixed-clock"; [all …] 
 | 
| /linux/include/uapi/linux/ | 
| H A D | pwm.h | 1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 10  * struct pwmchip_waveform - Describe a PWM waveform for a pwm_chip's PWM channel 11  * @hwpwm: per-chip relative index of the PWM device 14  *    A value of 0 represents a disabled PWM. 16  * @duty_offset_ns: offset of the rising edge from a period's start 47  * Program the PWM to emit exactly the passed waveform, subject only to rounding 48  * down each value less than 1 ns. Returns 0 on success, -EDOM if the waveform
  |