Home
last modified time | relevance | path

Searched +full:sens +full:- (Results 1 – 25 of 57) sorted by relevance

123

/kernel/linux/linux-5.10/drivers/macintosh/
Dwindfarm_smu_sat.c1 // SPDX-License-Identifier: GPL-2.0-only
46 struct wf_sensor sens; member
49 #define wf_to_sat(c) container_of(c, struct wf_sat_sensor, sens)
60 /* TODO: Add the resulting partition to the device-tree */ in smu_sat_get_sdb_partition()
65 err = i2c_smbus_write_word_data(sat->i2c, 8, id << 8); in smu_sat_get_sdb_partition()
71 err = i2c_smbus_read_word_data(sat->i2c, 9); in smu_sat_get_sdb_partition()
89 err = i2c_smbus_read_i2c_block_data(sat->i2c, 0xa, 4, data); in smu_sat_get_sdb_partition()
119 err = i2c_smbus_read_i2c_block_data(sat->i2c, 0x3f, 16, sat->cache); in wf_sat_read_cache()
122 sat->last_read = jiffies; in wf_sat_read_cache()
129 16, 1, sat->cache, 16, false); in wf_sat_read_cache()
[all …]
Dwindfarm_smu_sensors.c1 // SPDX-License-Identifier: GPL-2.0-only
54 struct wf_sensor sens; member
56 #define to_smu_ads(c) container_of(c, struct smu_ad_sensor, sens)
81 return -EIO; in smu_read_adc()
94 rc = smu_read_adc(ads->reg, &val); in smu_cputemp_get()
102 scaled = (s64)(((u64)val) * (u64)cpudiode->m_value); in smu_cputemp_get()
104 scaled += ((s64)cpudiode->b_value) << 9; in smu_cputemp_get()
116 rc = smu_read_adc(ads->reg, &val); in smu_cpuamp_get()
124 scaled = (s32)(val * (u32)cpuvcp->curr_scale); in smu_cpuamp_get()
125 scaled += (s32)cpuvcp->curr_offset; in smu_cpuamp_get()
[all …]
Dwindfarm_lm87_sensor.c1 // SPDX-License-Identifier: GPL-2.0-only
36 struct wf_sensor sens; member
38 #define wf_to_lm87(c) container_of(c, struct wf_lm87_sensor, sens)
60 return -EIO; in wf_lm87_read_reg()
68 struct wf_lm87_sensor *lm = sr->priv; in wf_lm87_get()
71 if (lm->i2c == NULL) in wf_lm87_get()
72 return -ENODEV; in wf_lm87_get()
77 temp = wf_lm87_read_reg(lm->i2c, LM87_INT_TEMP); in wf_lm87_get()
111 for_each_child_of_node(client->dev.of_node, np) { in wf_lm87_probe()
112 if (!of_node_name_eq(np, "int-temp")) in wf_lm87_probe()
[all …]
Dwindfarm_max6690_sensor.c1 // SPDX-License-Identifier: GPL-2.0-only
29 struct wf_sensor sens; member
32 #define wf_to_6690(x) container_of((x), struct wf_6690_sensor, sens)
39 if (max->i2c == NULL) in wf_max6690_get()
40 return -ENODEV; in wf_max6690_get()
43 data = i2c_smbus_read_byte_data(max->i2c, MAX6690_EXTERNAL_TEMP); in wf_max6690_get()
70 loc = of_get_property(client->dev.of_node, "hwsensor-location", NULL); in wf_max6690_probe()
72 dev_warn(&client->dev, "Missing hwsensor-location property!\n"); in wf_max6690_probe()
73 return -ENXIO; in wf_max6690_probe()
81 name = "backside-temp"; in wf_max6690_probe()
[all …]
Dwindfarm_lm75_sensor.c1 // SPDX-License-Identifier: GPL-2.0-only
40 struct wf_sensor sens; member
42 #define wf_to_lm75(c) container_of(c, struct wf_lm75_sensor, sens)
49 if (lm->i2c == NULL) in wf_lm75_get()
50 return -ENODEV; in wf_lm75_get()
53 if (!lm->inited) { in wf_lm75_get()
54 u8 cfg_new, cfg = (u8)i2c_smbus_read_byte_data(lm->i2c, 1); in wf_lm75_get()
57 sr->name, cfg); in wf_lm75_get()
63 i2c_smbus_write_byte_data(lm->i2c, 1, cfg_new); in wf_lm75_get()
64 lm->inited = 1; in wf_lm75_get()
[all …]
Dwindfarm_core.c1 // SPDX-License-Identifier: GPL-2.0-only
117 delay = next - jiffies; in wf_thread_func()
153 DBG("wf: Deleting control %s\n", ct->name); in wf_control_release()
155 if (ct->ops && ct->ops->release) in wf_control_release()
156 ct->ops->release(ct); in wf_control_release()
169 err = ctrl->ops->get_value(ctrl, &val); in wf_show_control()
171 if (err == -EFAULT) in wf_show_control()
175 switch(ctrl->type) { in wf_show_control()
201 if (endp - buf < count) in wf_store_control()
202 return -EINVAL; in wf_store_control()
[all …]
/kernel/linux/linux-5.10/security/selinux/ss/
Dcontext.h1 /* SPDX-License-Identifier: GPL-2.0 */
6 * externally represented as variable-length strings
38 memset(&c->range, 0, sizeof(c->range)); in mls_context_init()
45 dst->range.level[0].sens = src->range.level[0].sens; in mls_context_cpy()
46 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); in mls_context_cpy()
50 dst->range.level[1].sens = src->range.level[1].sens; in mls_context_cpy()
51 rc = ebitmap_cpy(&dst->range.level[1].cat, &src->range.level[1].cat); in mls_context_cpy()
53 ebitmap_destroy(&dst->range.level[0].cat); in mls_context_cpy()
65 dst->range.level[0].sens = src->range.level[0].sens; in mls_context_cpy_low()
66 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); in mls_context_cpy_low()
[all …]
Dmls_types.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Type definitions for the multi-level security (MLS) policy.
12 * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc.
22 u32 sens; /* sensitivity */ member
32 return ((l1->sens == l2->sens) && in mls_level_eq()
33 ebitmap_cmp(&l1->cat, &l2->cat)); in mls_level_eq()
38 return ((l1->sens >= l2->sens) && in mls_level_dom()
39 ebitmap_contains(&l1->cat, &l2->cat, 0)); in mls_level_dom()
Dmls.c1 // SPDX-License-Identifier: GPL-2.0
3 * Implementation of the multi-level security (MLS) policy.
12 * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc.
15 * Updated: Hewlett-Packard <paul@paul-moore.com>
19 * (c) Copyright Hewlett-Packard Development Company, L.P., 2006
43 if (!p->mls_enabled) in mls_compute_context_len()
48 int index_sens = context->range.level[l].sens; in mls_compute_context_len()
49 len += strlen(sym_name(p, SYM_LEVELS, index_sens - 1)); in mls_compute_context_len()
52 head = -2; in mls_compute_context_len()
53 prev = -2; in mls_compute_context_len()
[all …]
Dmls.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Multi-level security (MLS) policy operations.
12 * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc.
15 * Updated: Hewlett-Packard <paul@paul-moore.com>
19 * (c) Copyright Hewlett-Packard Development Company, L.P., 2006
97 return -ENOMEM; in mls_export_netlbl_cat()
103 return -ENOMEM; in mls_import_netlbl_cat()
109 hash = jhash_2words(r->level[0].sens, r->level[1].sens, hash); in mls_range_hash()
110 hash = ebitmap_hash(&r->level[0].cat, hash); in mls_range_hash()
111 hash = ebitmap_hash(&r->level[1].cat, hash); in mls_range_hash()
/kernel/linux/linux-5.10/drivers/iio/magnetometer/
Dmmc35240.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * MMC35240 - MEMSIC 3-axis Magnetic Sensor
7 * IIO driver for MMC35240 (7-bit I2C slave address 0x30).
61 * #define OTP_CONVERT(REG) ((float)((REG) >=32 ? (32 - (REG)) : (REG)) * 0.006
72 #define MMC35240_OTP_CONVERT_Y(REG) (((REG) >= 32 ? (32 - (REG)) : (REG)) * 6)
75 #define MMC35240_OTP_CONVERT_Z(REG) (((REG) >= 32 ? (32 - (REG)) : (REG)) * 81)
97 int sens[3]; /* sensitivity per X, Y, Z axis */ member
177 return -EINVAL; in mmc35240_get_samp_freq_index()
189 ret = regmap_update_bits(data->regmap, MMC35240_REG_CTRL0, in mmc35240_hw_set()
201 return regmap_update_bits(data->regmap, MMC35240_REG_CTRL0, in mmc35240_hw_set()
[all …]
/kernel/linux/linux-5.10/drivers/iio/pressure/
Dms5611_core.c1 // SPDX-License-Identifier: GPL-2.0
8 * http://www.meas-spec.com/downloads/MS5611-01BA03.pdf
9 * http://www.meas-spec.com/downloads/MS5607-02BA03.pdf
88 ret = st->read_prom_word(st, i, &st->prom[i]); in ms5611_read_prom()
90 dev_err(&indio_dev->dev, in ms5611_read_prom()
96 if (!ms5611_prom_is_valid(st->prom, MS5611_PROM_WORDS_NB)) { in ms5611_read_prom()
97 dev_err(&indio_dev->dev, "PROM integrity check failed\n"); in ms5611_read_prom()
98 return -ENODEV; in ms5611_read_prom()
110 ret = st->read_adc_temp_and_pressure(st, temp, pressure); in ms5611_read_temp_and_pressure()
112 dev_err(&indio_dev->dev, in ms5611_read_temp_and_pressure()
[all …]
Dhp03.c1 // SPDX-License-Identifier: GPL-2.0-only
20 * 0x50 ... read-only EEPROM with calibration data
21 * 0x77 ... read-write ADC for pressure and temperature
85 ret = i2c_smbus_write_byte_data(priv->client, HP03_ADC_WRITE_REG, reg); in hp03_get_temp_pressure()
91 return i2c_smbus_read_word_data(priv->client, HP03_ADC_READ_REG); in hp03_get_temp_pressure()
96 struct device *dev = &priv->client->dev; in hp03_update_temp_pressure()
99 int ab_val, d1_val, d2_val, diff_val, dut, off, sens, x; in hp03_update_temp_pressure() local
103 ret = regmap_bulk_read(priv->eeprom_regmap, HP03_EEPROM_CX_OFFSET, in hp03_update_temp_pressure()
112 gpiod_set_value_cansleep(priv->xclr_gpio, 1); in hp03_update_temp_pressure()
128 gpiod_set_value_cansleep(priv->xclr_gpio, 0); in hp03_update_temp_pressure()
[all …]
/kernel/linux/linux-5.10/drivers/pinctrl/mediatek/
Dmtk-eint.c1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2014-2018 MediaTek Inc.
22 #include "mtk-eint.h"
36 .sens = 0x140,
58 if (eint_num >= eint->hw->ap_num) in mtk_eint_get_offset()
59 eint_base = eint->hw->ap_num; in mtk_eint_get_offset()
61 reg = eint->base + offset + ((eint_num - eint_base) / 32) * 4; in mtk_eint_get_offset()
69 unsigned int sens; in mtk_eint_can_en_debounce() local
72 eint->regs->sens); in mtk_eint_can_en_debounce()
75 sens = MTK_EINT_LEVEL_SENSITIVE; in mtk_eint_can_en_debounce()
[all …]
Dmtk-eint.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2014-2018 MediaTek Inc.
20 unsigned int sens; member
82 return -EOPNOTSUPP; in mtk_eint_do_init()
87 return -EOPNOTSUPP; in mtk_eint_do_suspend()
92 return -EOPNOTSUPP; in mtk_eint_do_resume()
98 return -EOPNOTSUPP; in mtk_eint_set_debounce()
103 return -EOPNOTSUPP; in mtk_eint_find_irq()
/kernel/linux/linux-5.10/sound/isa/gus/
Dgus_volume.c1 // SPDX-License-Identifier: GPL-2.0-or-later
13 EXPORT_SYMBOL(snd_gf1_atten_table); /* for snd-gus-synth module */
25 e--; in snd_gf1_lvol_to_gvol_raw()
32 m = vol - (1 << e); in snd_gf1_lvol_to_gvol_raw()
35 m >>= e - 8; in snd_gf1_lvol_to_gvol_raw()
37 m <<= 8 - e; in snd_gf1_lvol_to_gvol_raw()
56 return rvol | (m << (e - 8));
57 return rvol | (m >> (8 - e));
76 us /= end - start;
78 us /= start - end;
[all …]
/kernel/linux/linux-5.10/drivers/net/wireless/intel/iwlwifi/dvm/
Ddevices.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
9 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
16 * DVM device-specific data & functions
18 #include "iwl-io.h"
19 #include "iwl-prph.h"
20 #include "iwl-eeprom-parse.h"
45 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; in iwl1000_set_ct_threshold()
46 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl1000_set_ct_threshold()
54 iwl_set_bits_mask_prph(priv->trans, APMG_DIGITAL_SVR_REG, in iwl1000_nic_config()
[all …]
/kernel/linux/linux-5.10/drivers/iio/common/ms_sensors/
Dms_sensors_i2c.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 2015 Measurement-Specialties
38 * ms_sensors_reset() - Reset function
54 dev_err(&client->dev, "Failed to reset device\n"); in ms_sensors_reset()
64 * ms_sensors_read_prom_word() - PROM word read function
80 dev_err(&client->dev, "Failed to read prom word\n"); in ms_sensors_read_prom_word()
90 * ms_sensors_convert_and_read() - ADC conversion & read function
125 dev_dbg(&client->dev, "ADC raw value : %x\n", be32_to_cpu(buf) >> 8); in ms_sensors_convert_and_read()
130 dev_err(&client->dev, "Unable to make sensor adc conversion\n"); in ms_sensors_convert_and_read()
136 * ms_sensors_crc_valid() - CRC check function
[all …]
/kernel/linux/linux-5.10/drivers/staging/iio/cdc/
Dad7150.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright 2010-2011 Analog Devices Inc.
53 * struct ad7150_chip_info - instance specific chip data
108 int channel = chan->channel; in ad7150_read_raw()
112 ret = i2c_smbus_read_word_data(chip->client, in ad7150_read_raw()
119 ret = i2c_smbus_read_word_data(chip->client, in ad7150_read_raw()
126 return -EINVAL; in ad7150_read_raw()
140 ret = i2c_smbus_read_byte_data(chip->client, AD7150_CFG); in ad7150_read_event_config()
165 return -EINVAL; in ad7150_read_event_config()
177 u8 sens, timeout; in ad7150_write_event_params() local
[all …]
/kernel/linux/linux-5.10/drivers/media/usb/gspca/
Dsonixb.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2009-2011 Jean-François Moine <http://moinejf.free.fr>
17 0x05 red gain 0-127
18 0x06 blue gain 0-127
19 0x07 green gain 0-127
21 0x08-0x0f i2c / 3wire registers
24 0x15 hsize (hsize = register-value * 16)
25 0x16 vsize (vsize = register-value * 16)
27 0x18 bit 7 enables compression, bit 4-5 set image down scaling:
29 0x19 high-nibble is sensor clock divider, changes exposure on sensors which
[all …]
/kernel/linux/linux-5.10/drivers/staging/rtl8192u/
Dr8192U_wx.c1 // SPDX-License-Identifier: GPL-2.0
7 * Copyright (C) Andrea Merello 2004-2005 <andrea.merello@gmail.com>
43 return ieee80211_wx_get_freq(priv->ieee80211, a, wrqu, b); in r8192_wx_get_freq()
51 return ieee80211_wx_get_mode(priv->ieee80211, a, wrqu, b); in r8192_wx_get_mode()
60 return ieee80211_wx_get_rate(priv->ieee80211, info, wrqu, extra); in r8192_wx_get_rate()
70 mutex_lock(&priv->wx_mutex); in r8192_wx_set_rate()
72 ret = ieee80211_wx_set_rate(priv->ieee80211, info, wrqu, extra); in r8192_wx_set_rate()
74 mutex_unlock(&priv->wx_mutex); in r8192_wx_set_rate()
86 mutex_lock(&priv->wx_mutex); in r8192_wx_set_rts()
88 ret = ieee80211_wx_set_rts(priv->ieee80211, info, wrqu, extra); in r8192_wx_set_rts()
[all …]
/kernel/linux/linux-5.10/drivers/platform/x86/
Dsamsung-q10.c1 // SPDX-License-Identifier: GPL-2.0-only
34 return -EIO; in samsungq10_bl_set_intensity()
36 for (i = 0; i < bd->props.brightness; i++) { in samsungq10_bl_set_intensity()
39 return -EIO; in samsungq10_bl_set_intensity()
58 bd = backlight_device_register("samsung", &pdev->dev, NULL, in samsungq10_probe()
90 printk(KERN_INFO KBUILD_MODNAME ": found model '%s'\n", id->ident); in dmi_check_callback()
107 DMI_MATCH(DMI_PRODUCT_NAME, "SENS Q20"),
134 return -ENODEV; in samsungq10_init()
139 return -ENODEV; in samsungq10_init()
/kernel/linux/linux-5.10/drivers/staging/rtl8192e/rtl8192e/
Drtl_core.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
6 * Copyright 2004-2005 Andrea Merello <andrea.merello@gmail.com>, et al.
51 "Copyright(c) 2008 - 2010 Realsil Semiconductor Corporation"
56 (((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192SE)
82 #define CMDPACKET_FRAG_SIZE (4 * (MAX_TRANSMIT_BUFFER_SIZE / 4) - 8)
371 short (*rf_set_sens)(struct net_device *dev, short sens);
411 short sens; member
Drtl_wx.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
27 return rtllib_wx_get_freq(priv->rtllib, a, wrqu, b); in _rtl92e_wx_get_freq()
36 return rtllib_wx_get_mode(priv->rtllib, a, wrqu, b); in _rtl92e_wx_get_mode()
45 return rtllib_wx_get_rate(priv->rtllib, info, wrqu, extra); in _rtl92e_wx_get_rate()
55 if (priv->bHwRadioOff) in _rtl92e_wx_set_rate()
58 mutex_lock(&priv->wx_mutex); in _rtl92e_wx_set_rate()
60 ret = rtllib_wx_set_rate(priv->rtllib, info, wrqu, extra); in _rtl92e_wx_set_rate()
62 mutex_unlock(&priv->wx_mutex); in _rtl92e_wx_set_rate()
74 if (priv->bHwRadioOff) in _rtl92e_wx_set_rts()
[all …]
/kernel/linux/linux-5.10/drivers/hwmon/
Dw83627hf.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * w83627hf.c - Part of lm_sensors, Linux kernel modules for hardware
5 * Copyright (c) 1998 - 2003 Frodo Looijaard <frodol@dds.nl>,
9 * Copyright (c) 2007 - 1012 Jean Delvare <jdelvare@suse.de>
37 #include <linux/hwmon-sysfs.h>
38 #include <linux/hwmon-vid.h>
102 outb(reg, sio->sioaddr); in superio_outb()
103 outb(val, sio->sioaddr + 1); in superio_outb()
109 outb(reg, sio->sioaddr); in superio_inb()
110 return inb(sio->sioaddr + 1); in superio_inb()
[all …]

123