| /linux/drivers/macintosh/ |
| H A D | windfarm_smu_sat.c | 1 // 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 …]
|
| H A D | windfarm_smu_sensors.c | 1 // SPDX-License-Identifier: GPL-2.0-only 55 struct wf_sensor sens; member 57 #define to_smu_ads(c) container_of(c, struct smu_ad_sensor, sens) 82 return -EIO; in smu_read_adc() 95 rc = smu_read_adc(ads->reg, &val); in smu_cputemp_get() 103 scaled = (s64)(((u64)val) * (u64)cpudiode->m_value); in smu_cputemp_get() 105 scaled += ((s64)cpudiode->b_value) << 9; in smu_cputemp_get() 117 rc = smu_read_adc(ads->reg, &val); in smu_cpuamp_get() 125 scaled = (s32)(val * (u32)cpuvcp->curr_scale); in smu_cpuamp_get() 126 scaled += (s32)cpuvcp->curr_offset; in smu_cpuamp_get() [all …]
|
| H A D | windfarm_lm87_sensor.c | 1 // 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() 110 for_each_child_of_node(client->dev.of_node, np) { in wf_lm87_probe() 111 if (!of_node_name_eq(np, "int-temp")) in wf_lm87_probe() [all …]
|
| H A D | windfarm_max6690_sensor.c | 1 // 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() 69 loc = of_get_property(client->dev.of_node, "hwsensor-location", NULL); in wf_max6690_probe() 71 dev_warn(&client->dev, "Missing hwsensor-location property!\n"); in wf_max6690_probe() 72 return -ENXIO; in wf_max6690_probe() 80 name = "backside-temp"; in wf_max6690_probe() [all …]
|
| H A D | windfarm_lm75_sensor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 39 struct wf_sensor sens; member 41 #define wf_to_lm75(c) container_of(c, struct wf_lm75_sensor, sens) 48 if (lm->i2c == NULL) in wf_lm75_get() 49 return -ENODEV; in wf_lm75_get() 52 if (!lm->inited) { in wf_lm75_get() 53 u8 cfg_new, cfg = (u8)i2c_smbus_read_byte_data(lm->i2c, 1); in wf_lm75_get() 56 sr->name, cfg); in wf_lm75_get() 62 i2c_smbus_write_byte_data(lm->i2c, 1, cfg_new); in wf_lm75_get() 63 lm->inited = 1; in wf_lm75_get() [all …]
|
| H A D | windfarm_core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 115 delay = next - jiffies; in wf_thread_func() 151 DBG("wf: Deleting control %s\n", ct->name); in wf_control_release() 153 if (ct->ops && ct->ops->release) in wf_control_release() 154 ct->ops->release(ct); in wf_control_release() 167 err = ctrl->ops->get_value(ctrl, &val); in wf_show_control() 169 if (err == -EFAULT) in wf_show_control() 173 switch(ctrl->type) { in wf_show_control() 199 if (endp - buf < count) in wf_store_control() 200 return -EINVAL; in wf_store_control() [all …]
|
| /linux/drivers/iio/magnetometer/ |
| H A D | mmc35240.c | 1 // 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). 60 * #define OTP_CONVERT(REG) ((float)((REG) >=32 ? (32 - (REG)) : (REG)) * 0.006 71 #define MMC35240_OTP_CONVERT_Y(REG) (((REG) >= 32 ? (32 - (REG)) : (REG)) * 6) 74 #define MMC35240_OTP_CONVERT_Z(REG) (((REG) >= 32 ? (32 - (REG)) : (REG)) * 81) 96 int sens[3]; /* sensitivity per X, Y, Z axis */ member 176 return -EINVAL; in mmc35240_get_samp_freq_index() 188 ret = regmap_set_bits(data->regmap, MMC35240_REG_CTRL0, in mmc35240_hw_set() 199 return regmap_set_bits(data->regmap, MMC35240_REG_CTRL0, coil_bit); in mmc35240_hw_set() [all …]
|
| /linux/drivers/iio/pressure/ |
| H A D | ms5611_core.c | 1 // 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 …]
|
| H A D | hp03.c | 1 // 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 …]
|
| /linux/sound/isa/gus/ |
| H A D | gus_volume.c | 1 // 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 …]
|
| /linux/security/selinux/ss/ |
| H A D | mls.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Multi-level security (MLS) policy operations. 11 * Copyright (C) 2004-2006 Trusted Computer Solutions, Inc. 13 * Updated: Hewlett-Packard <paul@paul-moore.com> 15 * Copyright (X) Hewlett-Packard Development Company, L.P., 2006 78 return -ENOMEM; in mls_export_netlbl_cat() 84 return -ENOMEM; in mls_import_netlbl_cat() 90 hash = jhash_2words(r->level[0].sens, r->level[1].sens, hash); in mls_range_hash() 91 hash = ebitmap_hash(&r->level[0].cat, hash); in mls_range_hash() 92 hash = ebitmap_hash(&r->level[1].cat, hash); in mls_range_hash()
|
| H A D | policydb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc. 16 * Copyright (C) 2003-2004 Tresys Technology, LLC 18 * Updated: Hewlett-Packard <paul@paul-moore.com> 20 * Copyright (C) 2007 Hewlett-Packard Development Company, L.P. 41 /* clang-format off */ 52 /* clang-format off */ 65 .sym_num = SYM_NUM - 3, 66 .ocon_num = OCON_NUM - 3, 70 .sym_num = SYM_NUM - 2, [all …]
|
| /linux/drivers/pinctrl/mediatek/ |
| H A D | mtk-eint.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2014-2025 MediaTek Inc. 24 #include "mtk-eint.h" 39 .sens = 0x140, 73 unsigned int idx = eint->pins[eint_num].index; in mtk_eint_get_offset() 74 unsigned int inst = eint->pins[eint_num].instance; in mtk_eint_get_offset() 77 reg = eint->base[inst] + offset + (idx / 32 * 4); in mtk_eint_get_offset() 85 unsigned int sens; in mtk_eint_can_en_debounce() local 86 unsigned int bit = BIT(eint->pins[eint_num].index % 32); in mtk_eint_can_en_debounce() 88 eint->regs->sens); in mtk_eint_can_en_debounce() [all …]
|
| H A D | mtk-eint.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (C) 2014-2025 MediaTek Inc. 21 unsigned int sens; member 102 return -EOPNOTSUPP; in mtk_eint_do_init() 107 return -EOPNOTSUPP; in mtk_eint_do_suspend() 112 return -EOPNOTSUPP; in mtk_eint_do_resume() 118 return -EOPNOTSUPP; in mtk_eint_set_debounce() 123 return -EOPNOTSUPP; in mtk_eint_find_irq()
|
| H A D | pinctrl-mtk-common.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 12 #include <linux/pinctrl/pinconf-generic.h> 14 #include "mtk-eint.h" 61 #define SET_ADDR(x, y) (x + (y->devdata->port_align)) 62 #define CLR_ADDR(x, y) (x + (y->devdata->port_align << 1)) 71 * struct mtk_drv_group_desc - Provide driving group data. 96 * struct mtk_pin_drv_grp - Provide each pin driving info. 119 * - For special pins' pull up/down setting which resides in same register 144 * struct mtk_pin_ies_set - For special pins' ies and smt setting. 172 unsigned int sens; member [all …]
|
| /linux/drivers/net/wireless/intel/iwlwifi/dvm/ |
| H A D | devices.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 11 * DVM device-specific data & functions 13 #include "iwl-io.h" 14 #include "iwl-prph.h" 15 #include "iwl-nvm-utils.h" 40 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; in iwl1000_set_ct_threshold() 41 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl1000_set_ct_threshold() 49 iwl_set_bits_mask_prph(priv->trans, APMG_DIGITAL_SVR_REG, in iwl1000_nic_config() 55 * iwl_beacon_time_mask_low - mask of lower 32 bit of beacon time [all …]
|
| H A D | dev.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 4 * Copyright(c) 2003 - 2014, 2020, 2023 Intel Corporation. All rights reserved. 23 #include "iwl-nvm-utils.h" 24 #include "iwl-csr.h" 25 #include "iwl-debug.h" 26 #include "iwl-agn-hw.h" 27 #include "iwl-op-mode.h" 28 #include "fw/notif-wait.h" 29 #include "iwl-trans.h" 36 /* CT-KILL constants */ [all …]
|
| H A D | calib.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 * Copyright (C) 2005-2014 Intel Corporation 8 #include "iwl-trans.h" 41 list_for_each_entry(res, &priv->calib_results, list) { in iwl_send_calib_results() 44 hcmd.len[0] = res->cmd_len; in iwl_send_calib_results() 45 hcmd.data[0] = &res->cmd; in iwl_send_calib_results() 50 ret, res->cmd.hdr.op_code); in iwl_send_calib_results() 64 return -ENOMEM; in iwl_calib_set() 68 return -ENOMEM; in iwl_calib_set() 69 res->cmd = *cmd; in iwl_calib_set() [all …]
|
| /linux/drivers/iio/common/ms_sensors/ |
| H A D | ms_sensors_i2c.c | 1 // 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 …]
|
| /linux/drivers/media/usb/gspca/ |
| H A D | sonixb.c | 1 // 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 …]
|
| /linux/drivers/iio/cdc/ |
| H A D | ad7150.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright 2010-2011 Analog Devices Inc. 63 * struct ad7150_chip_info - instance specific chip data 71 * 3:0 are for timeout receding - applies if below lower threshold 72 * 7:4 are for timeout approaching - applies if above upper threshold 108 int channel = chan->channel; in ad7150_read_raw() 113 ret = i2c_smbus_read_word_swapped(chip->client, in ad7150_read_raw() 121 ret = i2c_smbus_read_word_swapped(chip->client, in ad7150_read_raw() 138 *val = -(12288 >> 4); /* To match shift in _RAW */ in ad7150_read_raw() 145 return -EINVAL; in ad7150_read_raw() [all …]
|
| /linux/Documentation/networking/device_drivers/wifi/intel/ |
| H A D | ipw2200.rst | 1 .. SPDX-License-Identifier: GPL-2.0 11 - Intel(R) PRO/Wireless 2200BG Network Connection 12 - Intel(R) PRO/Wireless 2915ABG Network Connection 20 Copyright |copy| 2004-2006, Intel Corporation 37 2. Ad-Hoc Networking 40 3.2. iwconfig sens 78 the warranty and/or issues arising from regulatory non-compliance, and 83 modules, and accordingly, condition system-level regulatory approval 86 non-compliant. 113 ------------------------- [all …]
|
| /linux/drivers/net/wireless/intel/iwlegacy/ |
| H A D | 4965-calib.c | 8 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 29 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 33 * Copyright(c) 2005 - 2011 Intel Corporation. All rights reserved. 92 * high that our DSP gets too busy trying to lock onto non-network 107 /* "false_alarms" values below are cross-multiplications to assess the in il4965_sens_energy_cck() 113 * MIN_FA/fixed-time < false_alarms/actual-rx-time < MAX_FA/beacon-time in il4965_sens_energy_cck() 120 const struct il_sensitivity_ranges *ranges = il->hw_params.sens; in il4965_sens_energy_cck() 122 data = &(il->sensitivity_data); in il4965_sens_energy_cck() 124 data->nrg_auto_corr_silence_diff = 0; in il4965_sens_energy_cck() 130 (u8) ((rx_info->beacon_silence_rssi_a & ALL_BAND_FILTER) >> 8); in il4965_sens_energy_cck() [all …]
|
| /linux/Documentation/devicetree/bindings/input/ |
| H A D | iqs62x-keys.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/input/iqs62x-keys.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jeff LaBundy <jeff@labundy.com> 13 - $ref: input.yaml# 16 The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors 17 feature a variety of self-capacitive, mutual-inductive and Hall-effect sens- 23 further details and examples. Sensor hardware configuration (self-capacitive 24 vs. mutual-inductive, etc.) is selected based on the device's firmware. [all …]
|
| /linux/arch/arm64/boot/dts/qcom/ |
| H A D | sm8150-microsoft-surface-duo.dts | 1 // SPDX-License-Identifier: BSD-3-Clause 6 /dts-v1/; 8 #include <dt-bindings/regulator/qcom,rpmh-regulator.h> 9 #include <dt-bindings/gpio/gpio.h> 17 compatible = "microsoft,surface-duo", "qcom,sm8150"; 18 chassis-type = "handset"; 25 stdout-path = "serial0:115200n8"; 28 vph_pwr: vph-pwr-regulator { 29 compatible = "regulator-fixed"; 30 regulator-name = "vph_pwr"; [all …]
|