Home
last modified time | relevance | path

Searched +full:fan +full:- +full:hat (Results 1 – 21 of 21) sorted by relevance

/linux/Documentation/devicetree/bindings/pwm/
H A Dargon40,fan-hat.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/pwm/argon40,fan-hat.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Argon40 Fan HAT PWM controller
10 - Marek Vasut <marek.vasut+renesas@mailbox.org>
13 The trivial PWM on Argon40 Fan HAT, which is a RaspberryPi blower fan
14 hat which can be controlled over I2C, generates a fixed 30 kHz period
15 PWM signal with configurable 0..100% duty cycle to control the fan
19 - $ref: pwm.yaml#
[all …]
/linux/drivers/pwm/
H A Dpwm-argon-fan-hat.c1 // SPDX-License-Identifier: GPL-2.0
6 * - no support for offset/polarity
7 * - fixed 30 kHz period
9 * Argon Fan HAT https://argon40.com/products/argon-fan-hat
28 if (wf->duty_length_ns > ARGON40_FAN_HAT_PERIOD_NS) in argon_fan_hat_round_waveform_tohw()
31 *wfhw = mul_u64_u64_div_u64(wf->duty_length_ns, 100, ARGON40_FAN_HAT_PERIOD_NS); in argon_fan_hat_round_waveform_tohw()
43 wf->period_length_ns = ARGON40_FAN_HAT_PERIOD_NS; in argon_fan_hat_round_waveform_fromhw()
44 wf->duty_length_ns = DIV64_U64_ROUND_UP(wf->period_length_ns * *wfhw, 100); in argon_fan_hat_round_waveform_fromhw()
45 wf->duty_offset_ns = 0; in argon_fan_hat_round_waveform_fromhw()
67 * reading from the controller stops the fan, therefore there
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
H A Dfanpwm.c2 * Copyright 2012 Red Hat Inc.
29 #include <subdev/bios/fan.h>
40 struct nvkm_fanpwm *fan = (void *)therm->fan; in nvkm_fanpwm_get() local
41 struct nvkm_device *device = therm->subdev.device; in nvkm_fanpwm_get()
42 struct nvkm_gpio *gpio = device->gpio; in nvkm_fanpwm_get()
43 int card_type = device->card_type; in nvkm_fanpwm_get()
47 ret = therm->func->pwm_get(therm, fan->func.line, &divs, &duty); in nvkm_fanpwm_get()
50 if (card_type <= NV_40 || (fan->func.log[0] & 1)) in nvkm_fanpwm_get()
51 duty = divs - duty; in nvkm_fanpwm_get()
55 return nvkm_gpio_get(gpio, 0, fan->func.func, fan->func.line) * 100; in nvkm_fanpwm_get()
[all …]
H A Dfan.c2 * Copyright 2012 Red Hat Inc.
27 #include <subdev/bios/fan.h>
32 nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target) in nvkm_fan_update() argument
34 struct nvkm_therm *therm = fan->parent; in nvkm_fan_update()
35 struct nvkm_subdev *subdev = &therm->subdev; in nvkm_fan_update()
36 struct nvkm_timer *tmr = subdev->device->timer; in nvkm_fan_update()
41 /* update target fan speed, restricting to allowed range */ in nvkm_fan_update()
42 spin_lock_irqsave(&fan->lock, flags); in nvkm_fan_update()
44 target = fan->percent; in nvkm_fan_update()
45 target = max_t(u8, target, fan->bios.min_duty); in nvkm_fan_update()
[all …]
H A Dgt215.c2 * Copyright 2012 Red Hat Inc.
31 struct nvkm_device *device = therm->subdev.device; in gt215_therm_fan_sense()
36 return -ENODEV; in gt215_therm_fan_sense()
42 struct nvkm_device *device = therm->subdev.device; in gt215_therm_init()
43 struct dcb_gpio_func *tach = &therm->fan->tach; in gt215_therm_init()
47 /* enable fan tach, count revolutions per-second */ in gt215_therm_init()
49 if (tach->func != DCB_GPIO_UNUSED) { in gt215_therm_init()
50 nvkm_wr32(device, 0x00e724, device->crystal * 1000); in gt215_therm_init()
51 nvkm_mask(device, 0x00e720, 0x001f0000, tach->line << 16); in gt215_therm_init()
H A Dgf119.c2 * Copyright 2012 Red Hat Inc.
29 struct nvkm_subdev *subdev = &therm->subdev; in pwm_info()
30 struct nvkm_device *device = subdev->device; in pwm_info()
50 return -ENODEV; in pwm_info()
56 struct nvkm_device *device = therm->subdev.device; in gf119_fan_pwm_ctrl()
70 struct nvkm_device *device = therm->subdev.device; in gf119_fan_pwm_get()
86 return -EINVAL; in gf119_fan_pwm_get()
92 struct nvkm_device *device = therm->subdev.device; in gf119_fan_pwm_set()
109 struct nvkm_device *device = therm->subdev.device; in gf119_fan_pwm_clock()
114 return (device->crystal * 1000) / 20; in gf119_fan_pwm_clock()
[all …]
H A Dfannil.c2 * Copyright 2012 Red Hat Inc.
29 return -ENODEV; in nvkm_fannil_get()
35 return -ENODEV; in nvkm_fannil_set()
44 therm->fan = priv; in nvkm_fannil_create()
46 return -ENOMEM; in nvkm_fannil_create()
48 priv->type = "none / external"; in nvkm_fannil_create()
49 priv->get = nvkm_fannil_get; in nvkm_fannil_create()
50 priv->set = nvkm_fannil_set; in nvkm_fannil_create()
H A Dg84.c2 * Copyright 2012 Red Hat Inc.
32 struct nvkm_device *device = therm->subdev.device; in g84_temp_get()
34 if (nvkm_fuse_read(device->fuse, 0x1a8) == 1) in g84_temp_get()
37 return -ENODEV; in g84_temp_get()
43 struct nvkm_device *device = therm->subdev.device; in g84_sensor_setup()
46 if (nvkm_fuse_read(device->fuse, 0x1a8) == 1) { in g84_sensor_setup()
56 struct nvbios_therm_sensor *sensor = &therm->bios_sensor; in g84_therm_program_alarms()
57 struct nvkm_subdev *subdev = &therm->subdev; in g84_therm_program_alarms()
58 struct nvkm_device *device = subdev->device; in g84_therm_program_alarms()
61 spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); in g84_therm_program_alarms()
[all …]
/linux/fs/cachefiles/
H A Dvolume.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
20 struct cachefiles_cache *cache = vcookie->cache->cache_priv; in cachefiles_acquire_volume()
22 struct dentry *vdentry, *fan; in cachefiles_acquire_volume() local
33 volume->vcookie = vcookie; in cachefiles_acquire_volume()
34 volume->cache = cache; in cachefiles_acquire_volume()
35 INIT_LIST_HEAD(&volume->cache_link); in cachefiles_acquire_volume()
39 len = vcookie->key[0]; in cachefiles_acquire_volume()
44 memcpy(name + 1, vcookie->key + 1, len); in cachefiles_acquire_volume()
48 vdentry = cachefiles_get_directory(cache, cache->store, name, &is_new); in cachefiles_acquire_volume()
[all …]
H A Dnamei.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
22 if (!(inode->i_flags & S_KERNEL_FILE)) { in __cachefiles_mark_inode_in_use()
23 inode->i_flags |= S_KERNEL_FILE; in __cachefiles_mark_inode_in_use()
50 inode->i_flags &= ~S_KERNEL_FILE; in __cachefiles_unmark_inode_in_use()
69 struct cachefiles_cache *cache = object->volume->cache; in cachefiles_unmark_inode_in_use()
74 if (!test_bit(CACHEFILES_OBJECT_USING_TMPFILE, &object->flags)) { in cachefiles_unmark_inode_in_use()
75 atomic_long_add(inode->i_blocks, &cache->b_released); in cachefiles_unmark_inode_in_use()
76 if (atomic_inc_return(&cache->f_released)) in cachefiles_unmark_inode_in_use()
109 if (PTR_ERR(subdir) == -ENOMEM) in cachefiles_get_directory()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/
H A Dbase.c2 * Copyright 2013 Red Hat Inc.
32 struct nvkm_pmu *pmu = device->pmu; in nvkm_pmu_fan_controlled()
37 if (pmu && pmu->func->code.size) in nvkm_pmu_fan_controlled()
40 /* Default (board-loaded, or VBIOS PMU/PREOS) PMU FW on Fermi in nvkm_pmu_fan_controlled()
41 * and newer automatically control the fan speed, which would in nvkm_pmu_fan_controlled()
44 return (device->chipset >= 0xc0); in nvkm_pmu_fan_controlled()
50 if (pmu && pmu->func->pgob) in nvkm_pmu_pgob()
51 pmu->func->pgob(pmu, enable); in nvkm_pmu_pgob()
58 return pmu->func->recv(pmu); in nvkm_pmu_recv()
65 if (!pmu || !pmu->func->send) in nvkm_pmu_send()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/
H A Dmxms.c2 * Copyright 2012 Red Hat Inc.
32 return mxm->mxms; in mxms_data()
50 nvkm_debug(&mxm->subdev, "unknown version %d.%d\n", mxms[4], mxms[5]); in mxms_version()
71 while (size--) in mxms_checksum()
74 nvkm_debug(&mxm->subdev, "checksum invalid\n"); in mxms_checksum()
85 nvkm_debug(&mxm->subdev, "signature invalid\n"); in mxms_valid()
99 struct nvkm_subdev *subdev = &mxm->subdev; in mxms_foreach()
102 u8 *fini = desc + mxms_structlen(mxm) - 1; in mxms_foreach()
138 case 7: /* Fan Control Structure */ in mxms_foreach()
148 if (mxm->subdev.debug >= NV_DBG_DEBUG && (exec == NULL)) { in mxms_foreach()
[all …]
/linux/drivers/platform/x86/hp/
H A Dhp-wmi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2008 Red Hat <mjg@redhat.com>
22 #include <linux/input/sparse-keymap.h>
38 MODULE_ALIAS("wmi:95F24279-4D7B-4334-9387-ACCDC67EF61C");
39 MODULE_ALIAS("wmi:5FB7F034-2C63-45E9-BE91-3D44E2C707E4");
41 #define HPWMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C"
42 #define HPWMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4"
90 /* DMI Board names of Victus 16-d1xxx laptops */
95 /* DMI Board names of Victus 16-r1000 and Victus 16-s1000 laptops */
132 * were introduced that exceeds 128-byte data size. Changes to handle
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dbase.c2 * Copyright 2013 Red Hat Inc.
44 struct nvkm_bios *bios = clk->subdev.device->bios; in nvkm_clk_adjust()
76 * C-States
82 const struct nvkm_domain *domain = clk->domains; in nvkm_cstate_valid()
83 struct nvkm_volt *volt = clk->subdev.device->volt; in nvkm_cstate_valid()
86 while (domain && domain->name != nv_clk_src_max) { in nvkm_cstate_valid()
87 if (domain->flags & NVKM_CLK_DOM_FLAG_VPSTATE) { in nvkm_cstate_valid()
88 u32 freq = cstate->domain[domain->name]; in nvkm_cstate_valid()
89 switch (clk->boost_mode) { in nvkm_cstate_valid()
91 if (clk->base_khz && freq > clk->base_khz) in nvkm_cstate_valid()
[all …]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_hwmon.c2 * Copyright 2010 Red Hat Inc.
30 #include <linux/hwmon-sysfs.h>
58 therm->attr_get(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST) * 1000); in nouveau_hwmon_temp1_auto_point1_temp()
71 return -EINVAL; in nouveau_hwmon_set_temp1_auto_point1_temp()
73 therm->attr_set(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST, in nouveau_hwmon_set_temp1_auto_point1_temp()
91 therm->attr_get(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST_HYST) * 1000); in nouveau_hwmon_temp1_auto_point1_temp_hyst()
104 return -EINVAL; in nouveau_hwmon_set_temp1_auto_point1_temp_hyst()
106 therm->attr_set(therm, NVKM_THERM_ATTR_THRS_FAN_BOOST_HYST, in nouveau_hwmon_set_temp1_auto_point1_temp_hyst()
124 ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MAX_DUTY); in nouveau_hwmon_get_pwm1_max()
140 ret = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MIN_DUTY); in nouveau_hwmon_get_pwm1_min()
[all …]
/linux/drivers/gpu/drm/radeon/
H A Dradeon_atombios.c2 * Copyright 2007-8 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
36 #include "atom-bits.h"
52 if ((rdev->family == CHIP_R420) || in radeon_lookup_i2c_gpio_quirks()
53 (rdev->family == CHIP_R423) || in radeon_lookup_i2c_gpio_quirks()
54 (rdev->family == CHIP_RV410)) { in radeon_lookup_i2c_gpio_quirks()
55 if ((le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0018) || in radeon_lookup_i2c_gpio_quirks()
56 (le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x0019) || in radeon_lookup_i2c_gpio_quirks()
57 (le16_to_cpu(gpio->usClkMaskRegisterIndex) == 0x001a)) { in radeon_lookup_i2c_gpio_quirks()
58 gpio->ucClkMaskShift = 0x19; in radeon_lookup_i2c_gpio_quirks()
[all …]
/linux/drivers/platform/x86/dell/
H A Ddell-smbios-base.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) Red Hat <mjg@redhat.com>
10 * Copyright (C) 2005-2014 Dell Inc.
23 #include "dell-smbios.h"
77 {0x0000, 19, -1}, /* diagnostics */
78 /* handled by kernel: dell-laptop */
111 {0x0000, 0x0332, 0x0335}, /* fan control */
123 /* handled by kernel: dell-laptop */
139 case -1: /* Completed with error */ in dell_smbios_error()
140 return -EIO; in dell_smbios_error()
[all …]
/linux/drivers/ata/
H A Dlibata-sata.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2003-2004 Red Hat, Inc. All rights reserved.
6 * Copyright 2003-2004 Jeff Garzik
19 #include "libata-transport.h"
30 * sata_scr_valid - test whether SCRs are accessible
43 struct ata_port *ap = link->ap; in sata_scr_valid()
45 return (ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read; in sata_scr_valid()
50 * sata_scr_read - read SCR register of the specified port
56 * guaranteed to succeed if @link is ap->link, the cable type of
57 * the port is SATA and the port implements ->scr_read.
[all …]
H A Dlibata-core.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * libata-core.c - helper library for ATA
5 * Copyright 2003-2004 Red Hat, Inc. All rights reserved.
6 * Copyright 2003-2004 Jeff Garzik
9 * as Documentation/driver-api/libata.rst
12 * http://www.sata-io.org/
16 * http://www.t10.org (SCSI MMC - for ATAPI MMC)
17 * http://www.sata-io.org (SATA)
19 * http://www.qic.org (QIC157 - Tape and DSC)
20 * http://www.ce-ata.org (CE-ATA: not supported)
[all …]
/linux/
H A DCREDITS1 This is at least a partial credits-file of people that have
4 scripts. The fields are: name (N), email (E), web-address
6 snail-mail address (S).
10 ----------
51 D: in-kernel DRM Maintainer
76 E: tim_alpaerts@toyota-motor-europe.com
80 S: B-2610 Wilrijk-Antwerpen
85 W: http://www-stu.christs.cam.ac.uk/~aia21/
106 D: Maintainer of ide-cd and Uniform CD-ROM driver,
107 D: ATAPI CD-Changer support, Major 2.1.x CD-ROM update.
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_device.c3 * Copyright 2008 Red Hat Inc.
37 #include <linux/pci-p2pdma.h>
38 #include <linux/apple-gmux.h>
87 #include <asm/intel-family.h>
102 #define AMDGPU_RETRY_SRIOV_RESET(r) ((r) == -EBUSY || (r) == -ETIMEDOUT || (r) == -EINVAL)
153 #define AMDGPU_IP_BLK_MASK_ALL GENMASK(AMD_IP_BLOCK_TYPE_NUM - 1, 0)
187 return (adev->init_lvl->hwini_ip_block_mask & (1U << block)) != 0; in amdgpu_ip_member_of_hwini()
195 adev->init_lvl = &amdgpu_init_minimal_xgmi; in amdgpu_set_init_level()
198 adev->init_lvl = &amdgpu_init_recovery; in amdgpu_set_init_level()
203 adev->init_lvl = &amdgpu_init_default; in amdgpu_set_init_level()
[all …]