/linux/Documentation/devicetree/bindings/arm/bcm/ |
H A D | raspberrypi,bcm2835-firmware.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Eric Anholt <eric@anholt.net> 11 - Stefan Wahren <wahrenst@gmx.net> 17 const: raspberrypi,bcm2835-firmware 20 - compatible 25 - const: raspberrypi,bcm2835-firmware 26 - const: simple-mfd [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 | pwm-fan.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * pwm-fan.c - Hwmon driver for fans connected to PWM lines. 18 #include <linux/pwm.h> 43 struct pwm_device *pwm; member 74 atomic_inc(&tach->pulses); in pulse_handler() 82 unsigned int delta = ktime_ms_delta(ktime_get(), ctx->sample_start); in sample_timer() 86 for (i = 0; i < ctx->tach_count; i++) { in sample_timer() 87 struct pwm_fan_tach *tach = &ctx->tachs[i]; in sample_timer() 90 pulses = atomic_read(&tach->pulses); in sample_timer() 91 atomic_sub(pulses, &tach->pulses); in sample_timer() [all …]
|
H A D | nzxt-smart2.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Reverse-engineered NZXT RGB & Fan Controller/Smart Device v2 driver. 77 * a 2-byte output report { 0x60, 0x03 }. 85 /* Fan type as detected by the device. See FAN_TYPE_* enum. */ 90 * The device sends these reports at a fixed interval (update interval) - 91 * one report with type = FAN_STATUS_REPORT_SPEED, and one report with type = 98 u8 type; member 100 /* Fan type as detected by the device. See FAN_TYPE_* enum. */ 104 /* When type == FAN_STATUS_REPORT_SPEED */ 112 * Fan duty cycle, in percent. Non-zero even for [all …]
|
H A D | aspeed-pwm-tacho.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 #include <linux/hwmon-sysfs.h> 22 /* ASPEED PWM & FAN Tach Register Definition */ 47 /* ASPEED_PTCR_CTRL : 0x00 - General Control Register */ 74 /* ASPEED_PTCR_CLK_CTRL : 0x04 - Clock Control Register */ 75 /* TYPE N */ 80 /* TYPE M */ 87 * ASPEED_PTCR_DUTY_CTRL/1/2/3 : 0x08/0x0C/0x48/0x4C - PWM-FAN duty control 97 /* ASPEED_PTCR_TYPEM_CTRL : 0x10/0x18/0x50 - Type M/N/O Ctrl 0 Register */ 105 /* ASPEED_PTCR_TACH_SOURCE : 0x20/0x60 - Tach Source Register */ [all …]
|
H A D | axi-fan-control.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <linux/fpga/adi-axi-common.h> 11 #include <linux/hwmon-sysfs.h> 66 iowrite32(val, ctl->base + reg); in axi_iowrite() 72 return ioread32(ctl->base + reg); in axi_ioread() 77 * T = /raw * 509.3140064 / 65535) - 280.2308787 83 u32 temp = axi_ioread(attr->index, ctl); in axi_fan_control_show() 85 temp = DIV_ROUND_CLOSEST_ULL(temp * 509314ULL, 65535) - 280230; in axi_fan_control_show() 103 axi_iowrite(temp, attr->index, ctl); in axi_fan_control_store() 148 return DIV_ROUND_CLOSEST(60 * ctl->clk_rate, ctl->ppr * tach); in axi_fan_control_get_fan_rpm() [all …]
|
H A D | lm85.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * lm85.c - Part of lm_sensors, Linux kernel modules for hardware 7 * Copyright (c) 2003 Margit Schubert-While <margitsw@t-online.de> 9 * Copyright (C) 2007--2014 Jean Delvare <jdelvare@suse.de> 21 #include <linux/hwmon-vid.h> 22 #include <linux/hwmon-sysfs.h> 59 ((data)->type == adt7468 && !((data)->cfg5 & ADT7468_OFF64)) 61 ((data)->type == adt7468 && !((data)->cfg5 & ADT7468_HFPWM)) 105 #define EMC6D100_REG_IN(nr) (0x70 + ((nr) - 5)) 106 #define EMC6D100_REG_IN_MIN(nr) (0x73 + ((nr) - 5) * 2) [all …]
|
/linux/drivers/pwm/ |
H A D | pwm-cros-ec.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Expose a PWM controlled by the ChromeOS EC to the host processor. 13 #include <linux/pwm.h> 16 #include <dt-bindings/mfd/cros_ec.h> 19 * struct cros_ec_pwm_device - Driver data for EC PWM 22 * @use_pwm_type: Use PWM types instead of generic channels 44 return -EINVAL; in cros_ec_dt_type_to_pwm_type() 51 struct cros_ec_device *ec = ec_pwm->ec; in cros_ec_pwm_set_duty() 62 msg->version = 0; in cros_ec_pwm_set_duty() 63 msg->command = EC_CMD_PWM_SET_DUTY; in cros_ec_pwm_set_duty() [all …]
|
/linux/Documentation/hwmon/ |
H A D | nct6775.rst | 19 * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I 83 * Nuvoton NCT6796D-S/NCT6799D-R 93 Guenter Roeck <linux@roeck-us.net> 96 ----------- 103 PCH, and SMBUS. Depending on the chip type, 2 to 6 of the temperature sources 117 value. Alarms are only supported for temp1 to temp6, depending on the chip type. 138 The mode works for fan1-fan5. 141 ---------------- 143 pwm[1-7] 144 - this file stores PWM duty cycle or DC value (fan speed) in range: [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 | 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 :-(). 70 UCH1/Reading2 in0 temp3 NTC type thermistor 80 ------------------ [all …]
|
/linux/Documentation/devicetree/bindings/timer/ |
H A D | ingenic,tcu.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 Documentation/arch/mips/ingenic-tcu.rst. 14 - Paul Cercueil <paul@crapouillou.net> 21 - ingenic,jz4740-tcu 22 - ingenic,jz4725b-tcu 23 - ingenic,jz4760-tcu 24 - ingenic,jz4760b-tcu 25 - ingenic,jz4770-tcu [all …]
|
H A D | ti,timer-dm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/timer/ti,timer-dm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI dual-mode timer 10 - Tony Lindgren <tony@atomide.com> 13 The TI dual-mode timer is a general purpose timer with PWM capabilities. 18 - items: 19 - enum: 20 - ti,am335x-timer [all …]
|
/linux/Documentation/devicetree/bindings/leds/backlight/ |
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/driver-api/ |
H A D | miscellaneous.rst | 4 .. kernel-doc:: include/linux/parport.h 7 .. kernel-doc:: drivers/parport/ieee1284.c 10 .. kernel-doc:: drivers/parport/share.c 13 .. kernel-doc:: drivers/parport/daisy.c 19 .. kernel-doc:: drivers/tty/serial/8250/8250_core.c 24 Pulse-Width Modulation (PWM) 27 Pulse-width modulation is a modulation technique primarily used to 30 The PWM framework provides an abstraction for providers and consumers of 31 PWM signals. A controller that provides one or more PWM signals is 32 registered as :c:type:`struct pwm_chip <pwm_chip>`. Providers [all …]
|
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | airoha,en7581-gpio-sysctl.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mfd/airoha,en7581-gpio-sysctl.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Christian Marangi <ansuelsmth@gmail.com> 11 - Lorenzo Bianconi <lorenzo@kernel.org> 15 for controlling the GPIO, pins and PWM of the SoC. 20 - const: airoha,en7581-gpio-sysctl 21 - const: syscon 22 - const: simple-mfd [all …]
|
H A D | st,stmpe.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 touchscreen, ADC, PWM or rotator. It can contain one or several different 15 - Linus Walleij <linus.walleij@linaro.org> 18 - $ref: /schemas/spi/spi-peripheral-props.yaml# 23 - st,stmpe601 24 - st,stmpe801 25 - st,stmpe811 26 - st,stmpe1600 [all …]
|
/linux/drivers/input/misc/ |
H A D | pwm-beeper.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> 4 * PWM beeper driver 14 #include <linux/pwm.h> 20 struct pwm_device *pwm; member 36 pwm_get_state(beeper->pwm, &state); in pwm_beeper_on() 42 error = pwm_apply_might_sleep(beeper->pwm, &state); in pwm_beeper_on() 46 if (!beeper->amplifier_on) { in pwm_beeper_on() 47 error = regulator_enable(beeper->amplifier); in pwm_beeper_on() 49 pwm_disable(beeper->pwm); in pwm_beeper_on() [all …]
|
H A D | max8997_haptic.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * MAX8997-haptic controller driver 15 #include <linux/pwm.h> 17 #include <linux/mfd/max8997-private.h> 44 struct pwm_device *pwm; member 48 enum max8997_haptic_motor_type type; member 60 if (chip->mode == MAX8997_EXTERNAL_MODE) { in max8997_haptic_set_duty_cycle() 61 unsigned int duty = chip->pwm_period * chip->level / 100; in max8997_haptic_set_duty_cycle() 62 ret = pwm_config(chip->pwm, duty, chip->pwm_period); in max8997_haptic_set_duty_cycle() 66 duty_index = DIV_ROUND_UP(chip->level * 64, 100); in max8997_haptic_set_duty_cycle() [all …]
|
/linux/Documentation/devicetree/bindings/pwm/ |
H A D | google,cros-ec-pwm.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/pwm/google,cros-ec-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: PWM controlled by ChromeOS EC 10 - Thierry Reding <thierry.reding@gmail.com> 11 - '"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>' 14 Google's ChromeOS EC PWM is a simple PWM attached to the Embedded Controller 15 (EC) and controlled via a host-command interface. 16 An EC PWM node should be only found as a sub-node of the EC node (see [all …]
|
/linux/Documentation/devicetree/bindings/leds/ |
H A D | leds-pwm-multicolor.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/leds/leds-pwm-multicolor.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Multi-color LEDs connected to PWM 10 - Sven Schwermer <sven.schwermer@disruptive-technologies.com> 13 This driver combines several monochrome PWM LEDs into one multi-color 18 const: pwm-leds-multicolor 20 multi-led: 21 type: object [all …]
|
/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos5422-odroidhc1.dts | 1 // SPDX-License-Identifier: GPL-2.0 10 /dts-v1/; 11 #include <dt-bindings/leds/common.h> 12 #include "exynos5422-odroid-core.dtsi" 16 compatible = "hardkernel,odroid-hc1", "samsung,exynos5800", \ 19 led-controller { 20 compatible = "pwm-leds"; 22 led-1 { 25 pwms = <&pwm 2 2000000 0>; 26 pwm-names = "pwm2"; [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | atmel,sama5d2-classd.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/sound/atmel,sama5d2-classd.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Nicolas Ferre <nicolas.ferre@microchip.com> 12 - Alexandre Belloni <alexandre.belloni@bootlin.com> 13 - Claudiu Beznea <claudiu.beznea@microchip.com> 17 Modulated (PWM) output stereo Class D amplifier. 22 - items: 23 - const: atmel,sama5d2-classd [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/arch/arm64/boot/dts/qcom/ |
H A D | pm8550.dtsi | 1 // SPDX-License-Identifier: BSD-3-Clause 6 #include <dt-bindings/interrupt-controller/irq.h> 7 #include <dt-bindings/spmi/spmi.h> 10 thermal-zones { 11 pm8550-thermal { 12 polling-delay-passive = <100>; 14 thermal-sensors = <&pm8550_temp_alarm>; 20 type = "passive"; 26 type = "hot"; 36 compatible = "qcom,pm8550", "qcom,spmi-pmic"; [all …]
|