/linux/drivers/media/i2c/ccs/ |
H A D | ccs-core.c | 13 * Based on smia-sensor.c by Tuukka Toivonen <tuukkat76@gmail.com> 91 static int ccs_limit_ptr(struct ccs_sensor *sensor, unsigned int limit, in ccs_limit_ptr() argument 101 if (WARN_ON(!sensor->ccs_limits) || in ccs_limit_ptr() 106 *__ptr = sensor->ccs_limits + ccs_limit_offsets[limit].lim + offset; in ccs_limit_ptr() 111 void ccs_replace_limit(struct ccs_sensor *sensor, in ccs_replace_limit() argument 114 struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd); in ccs_replace_limit() 119 ret = ccs_limit_ptr(sensor, limit, offset, &ptr); in ccs_replace_limit() 131 u32 ccs_get_limit(struct ccs_sensor *sensor, unsigned int limit, in ccs_get_limit() argument 138 ret = ccs_limit_ptr(sensor, limit, offset, &ptr); in ccs_get_limit() 157 return ccs_reg_conv(sensor, ccs_limits[limit].reg, val); in ccs_get_limit() [all …]
|
H A D | ccs-quirk.h | 20 * @limits: Replace sensor->limits with values which can't be read from 21 * sensor registers. Called the first time the sensor is powered up. 22 * @post_poweron: Called always after the sensor has been fully powered on. 27 * also appropriate for adding sensor specific controls, for instance. 41 int (*limits)(struct ccs_sensor *sensor); 42 int (*post_poweron)(struct ccs_sensor *sensor); 43 int (*pre_streamon)(struct ccs_sensor *sensor); 44 int (*post_streamoff)(struct ccs_sensor *sensor); 45 unsigned long (*pll_flags)(struct ccs_sensor *sensor); 46 int (*init)(struct ccs_sensor *sensor); [all …]
|
/linux/drivers/thermal/st/ |
H A D | st_thermal.c | 3 * ST Thermal Sensor Driver core routines 24 static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) in st_thermal_alloc_regfields() argument 26 struct device *dev = sensor->dev; in st_thermal_alloc_regfields() 27 struct regmap *regmap = sensor->regmap; in st_thermal_alloc_regfields() 28 const struct reg_field *reg_fields = sensor->cdata->reg_fields; in st_thermal_alloc_regfields() 30 sensor->dcorrect = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 33 sensor->overflow = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 36 sensor->temp_data = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 39 if (IS_ERR(sensor->dcorrect) || in st_thermal_alloc_regfields() 40 IS_ERR(sensor->overflow) || in st_thermal_alloc_regfields() [all …]
|
/linux/drivers/hid/amd-sfh-hid/hid_descriptor/ |
H A D | amd_sfh_hid_report_desc.h | 13 // Accelerometer 3D Sensor 21 0x05, 0x20, /* HID usage page sensor */ 22 0x0A, 0x09, 0x03, /* Sensor property and sensor connection type */ 28 0x0A, 0x30, 0x08, /* Sensor property connection type intergated sel*/ 29 0x0A, 0x31, 0x08, /* Sensor property connection type attached sel */ 30 0x0A, 0x32, 0x08, /* Sensor property connection type external sel */ 33 0x0A, 0x16, 0x03, /* HID usage sensor property reporting state */ 39 0x0A, 0x40, 0x08, /* Sensor property report state no events sel */ 40 0x0A, 0x41, 0x08, /* Sensor property report state all events sel */ 41 0x0A, 0x42, 0x08, /* Sensor property report state threshold events sel */ [all …]
|
/linux/drivers/hwmon/ |
H A D | scpi-hwmon.c | 3 * System Control and Power Interface(SCPI) based hwmon sensor driver 57 static void scpi_scale_reading(u64 *value, struct sensor_data *sensor) in scpi_scale_reading() argument 59 if (scpi_scale[sensor->info.class] != sensor->scale) { in scpi_scale_reading() 60 *value *= scpi_scale[sensor->info.class]; in scpi_scale_reading() 61 do_div(*value, sensor->scale); in scpi_scale_reading() 70 struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id]; in scpi_read_temp() local 74 ret = scpi_ops->sensor_get_value(sensor->info.sensor_id, &value); in scpi_read_temp() 78 scpi_scale_reading(&value, sensor); in scpi_read_temp() 90 struct sensor_data *sensor; in scpi_show_sensor() local 94 sensor = container_of(attr, struct sensor_data, dev_attr_input); in scpi_show_sensor() [all …]
|
H A D | scmi-hwmon.c | 3 * System Control and Management Interface(SCMI) based hwmon sensor driver 38 static int scmi_hwmon_scale(const struct scmi_sensor_info *sensor, u64 *value) in scmi_hwmon_scale() argument 40 int scale = sensor->scale; in scmi_hwmon_scale() 43 switch (sensor->type) { in scmi_hwmon_scale() 73 const struct scmi_sensor_info *sensor, in scmi_hwmon_read_scaled_value() argument 79 ret = sensor_ops->reading_get(ph, sensor->id, &value); in scmi_hwmon_read_scaled_value() 83 ret = scmi_hwmon_scale(sensor, &value); in scmi_hwmon_read_scaled_value() 93 const struct scmi_sensor_info *sensor; in scmi_hwmon_read() local 96 sensor = *(scmi_sensors->info[type] + channel); in scmi_hwmon_read() 98 return scmi_hwmon_read_scaled_value(scmi_sensors->ph, sensor, val); in scmi_hwmon_read() [all …]
|
/linux/drivers/iio/pressure/ |
H A D | Kconfig | 10 tristate "Honeywell ABP pressure sensor driver" 20 tristate "ROHM BM1390GLV-Z pressure sensor driver" 26 Support for the ROHM BM1390 pressure sensor. The BM1390GLV-Z 29 sensor does also provide temperature measurements. 32 tristate "Bosch Sensortec BMP180/BMP280/BMP380/BMP580 pressure sensor driver" 42 an additional humidity sensor channel. 61 tristate "ChromeOS EC Barometer Sensor" 64 Say yes here to build support for the Barometer sensor when 65 presented by the ChromeOS EC Sensor hub. 83 tristate "Infineon DPS310 pressure and temperature sensor" [all …]
|
/linux/drivers/iio/chemical/ |
H A D | Kconfig | 9 tristate "Aosong AGS02MA TVOC sensor driver" 14 Organic Compounds) sensor. 29 * pH SM sensor 30 * EC SM sensor 31 * ORP SM sensor 34 module will be called atlas-ph-sensor. 42 * CO2 EZO Sensor 45 module will be called atlas-ezo-sensor. 48 tristate "Bosch Sensortec BME680 sensor driver" 56 Say yes here to build support for Bosch Sensortec BME680 sensor with [all …]
|
/linux/drivers/input/rmi4/ |
H A D | rmi_f12.c | 30 struct rmi_2d_sensor sensor; member 67 struct rmi_2d_sensor *sensor = &f12->sensor; in rmi_f12_read_sensor_tuning() local 68 struct rmi_function *fn = sensor->fn; in rmi_f12_read_sensor_tuning() 83 "F12 does not have the sensor tuning control register\n"); in rmi_f12_read_sensor_tuning() 103 sensor->max_x = (buf[offset + 1] << 8) | buf[offset]; in rmi_f12_read_sensor_tuning() 104 sensor->max_y = (buf[offset + 3] << 8) | buf[offset + 2]; in rmi_f12_read_sensor_tuning() 109 sensor->max_x, sensor->max_y); in rmi_f12_read_sensor_tuning() 118 /* Units 1/128 sensor pitch */ in rmi_f12_read_sensor_tuning() 144 sensor->x_mm = sensor->max_x / dpm_resolution; in rmi_f12_read_sensor_tuning() 145 sensor->y_mm = sensor->max_y / dpm_resolution; in rmi_f12_read_sensor_tuning() [all …]
|
H A D | rmi_f11.c | 36 * The properties for a given sensor are described by its query registers. The 38 * the F11 device queries as well as the sensor query information. 40 * Similarly, each sensor has control registers that govern its behavior. The 41 * size and layout of the control registers for a given sensor can be determined 44 * And in a likewise fashion, each sensor has data registers where it reports 49 * registers in order to determine the attributes of a sensor. Then 51 * registers for sensor. 66 * Writing this to the F11 command register will cause the sensor to 181 * struct f11_2d_sensor_queries - describes sensor capabilities 185 * @nr_fingers: describes the maximum number of fingers the 2-D sensor [all …]
|
/linux/drivers/iio/proximity/ |
H A D | Kconfig | 9 tristate "AS3935 Franklin lightning sensor" 15 Microsystems AS3935 lightning detection sensor. 25 tristate "ChromeOS EC MKBP Proximity sensor" 28 Say Y here to enable the proximity sensor implemented via the ChromeOS EC MKBP 36 tristate "Nicera (Nippon Ceramic Co.) D3-323-AA PIR sensor" 39 Say Y here to build a driver for the Nicera D3-323-AA PIR sensor. 45 tristate "TYHX HX9023S SAR sensor" 51 Say Y here to build a driver for TYHX HX9023S capacitive SAR sensor. 59 tristate "Murata IRS-D200 PIR sensor" 65 Say Y here to build a driver for the Murata IRS-D200 PIR sensor. [all …]
|
/linux/Documentation/hwmon/ |
H A D | occ.rst | 16 sensor data from the processor and the system. The OCC can provide the raw 17 sensor data as well as perform thermal and power management on the system. 32 The OCC sensor ID is an integer that represents the unique identifier of the 33 sensor with respect to the OCC. For example, a temperature sensor for the third 34 DIMM slot in the system may have a sensor ID of 7. This mapping is unavailable 35 to the device driver, which must therefore export the sensor ID as-is. 37 Some entries are only present with certain OCC sensor versions or only on 42 OCC sensor ID. 44 [with temperature sensor version 1] 50 [with temperature sensor version >= 2] [all …]
|
/linux/drivers/iio/temperature/ |
H A D | ltc2983.c | 3 * Analog Devices LTC2983 Multi-Sensor Digital Temperature Measurement System 192 container_of(_sensor, struct ltc2983_thermocouple, sensor) 195 container_of(_sensor, struct ltc2983_rtd, sensor) 198 container_of(_sensor, struct ltc2983_thermistor, sensor) 201 container_of(_sensor, struct ltc2983_diode, sensor) 204 container_of(_sensor, struct ltc2983_rsense, sensor) 207 container_of(_sensor, struct ltc2983_adc, sensor) 210 container_of(_sensor, struct ltc2983_temp, sensor) 245 const struct ltc2983_sensor *sensor); 246 /* specifies the sensor channel */ [all …]
|
/linux/drivers/iio/imu/st_lsm6dsx/ |
H A D | st_lsm6dsx_shub.c | 5 * slave devices using accelerometer sensor as trigger for i2c 158 struct st_lsm6dsx_sensor *sensor; in st_lsm6dsx_shub_wait_complete() local 161 sensor = iio_priv(hw->iio_devs[ST_LSM6DSX_ID_ACC]); in st_lsm6dsx_shub_wait_complete() 162 odr = (hw->enable_mask & BIT(ST_LSM6DSX_ID_ACC)) ? sensor->odr : 12500; in st_lsm6dsx_shub_wait_complete() 242 static int st_lsm6dsx_shub_master_enable(struct st_lsm6dsx_sensor *sensor, in st_lsm6dsx_shub_master_enable() argument 246 struct st_lsm6dsx_hw *hw = sensor->hw; in st_lsm6dsx_shub_master_enable() 250 /* enable acc sensor as trigger */ in st_lsm6dsx_shub_master_enable() 251 err = st_lsm6dsx_sensor_set_enable(sensor, enable); in st_lsm6dsx_shub_master_enable() 283 st_lsm6dsx_shub_read(struct st_lsm6dsx_sensor *sensor, u8 addr, in st_lsm6dsx_shub_read() argument 288 struct st_lsm6dsx_hw *hw = sensor->hw; in st_lsm6dsx_shub_read() [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/ |
H A D | base.c | 70 return nvkm_iccsense_poll_lane(rail->sensor->i2c, rail->sensor->addr, in nvkm_iccsense_ina2x9_read() 93 return nvkm_iccsense_poll_lane(rail->sensor->i2c, rail->sensor->addr, in nvkm_iccsense_ina3221_read() 101 struct nvkm_iccsense_sensor *sensor) in nvkm_iccsense_sensor_config() argument 104 nvkm_trace(subdev, "write config of extdev %i: 0x%04x\n", sensor->id, sensor->config); in nvkm_iccsense_sensor_config() 105 nv_wr16i2cr(sensor->i2c, sensor->addr, 0x00, sensor->config); in nvkm_iccsense_sensor_config() 134 struct nvkm_iccsense_sensor *sensor, *tmps; in nvkm_iccsense_dtor() local 137 list_for_each_entry_safe(sensor, tmps, &iccsense->sensors, head) { in nvkm_iccsense_dtor() 138 list_del(&sensor->head); in nvkm_iccsense_dtor() 139 kfree(sensor); in nvkm_iccsense_dtor() 157 struct nvkm_iccsense_sensor *sensor; in nvkm_iccsense_create_sensor() local [all …]
|
/linux/drivers/media/usb/gspca/m5602/ |
H A D | m5602_mt9m111.c | 3 * Driver for the mt9m111 sensor 32 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 33 {SENSOR, MT9M111_SC_RESET, 80 {SENSOR, MT9M111_SC_RESET, 0x00, 0x29}, 81 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00}, 82 {SENSOR, MT9M111_SC_RESET, 0x00, 0x08}, 83 {SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01}, 84 {SENSOR, MT9M111_CP_OPERATING_MODE_CTL, 0x00, 86 {SENSOR, MT9M111_CP_LENS_CORRECTION_1, 0x04, 0x2a}, 87 {SENSOR, MT9M111_CP_DEFECT_CORR_CONTEXT_A, 0x00, [all …]
|
H A D | m5602_ov7660.c | 3 * Driver for the ov7660 sensor 35 {SENSOR, OV7660_OFON, 0x0c}, 36 {SENSOR, OV7660_COM2, 0x11}, 37 {SENSOR, OV7660_COM7, 0x05}, 74 {SENSOR, OV7660_COM7, 0x80}, 75 {SENSOR, OV7660_CLKRC, 0x80}, 76 {SENSOR, OV7660_COM9, 0x4c}, 77 {SENSOR, OV7660_OFON, 0x43}, 78 {SENSOR, OV7660_COM12, 0x28}, 79 {SENSOR, OV7660_COM8, 0x00}, [all …]
|
H A D | m5602_ov9650.c | 4 * Driver for the ov9650 sensor 41 {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, 43 {SENSOR, OV9650_CLKRC, 0x80}, 45 {SENSOR, OV9650_OFON, 0x40} 67 {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, 68 /* One extra reset is needed in order to make the sensor behave 70 {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, 73 {SENSOR, OV9650_CLKRC, 0x80}, 75 {SENSOR, OV9650_OFON, 0x40}, 78 {SENSOR, OV9650_COM8, OV9650_FAST_AGC_AEC | [all …]
|
H A D | m5602_core.c | 36 /* A skeleton used for sending messages to the sensor */ 116 if (!len || len > sd->sensor->i2c_regW) in m5602_read_sensor() 124 sd->sensor->i2c_slave_id); in m5602_read_sensor() 136 if (sd->sensor->i2c_regW == 1) { in m5602_read_sensor() 153 gspca_dbg(gspca_dev, D_CONF, "Reading sensor register 0x%x containing 0x%x\n", in m5602_read_sensor() 168 /* No sensor with a data width larger than 16 bits has yet been seen */ in m5602_write_sensor() 169 if (len > sd->sensor->i2c_regW || !len) in m5602_write_sensor() 175 buf[11] = sd->sensor->i2c_slave_id; in m5602_write_sensor() 178 /* Special case larger sensor writes */ in m5602_write_sensor() 186 gspca_dbg(gspca_dev, D_CONF, "Writing sensor register 0x%x with 0x%x\n", in m5602_write_sensor() [all …]
|
/linux/drivers/thermal/ |
H A D | thermal_mmio.c | 26 struct thermal_mmio *sensor = thermal_zone_device_priv(tz); in thermal_mmio_get_temperature() local 28 t = sensor->read_mmio(sensor->mmio_base) & sensor->mask; in thermal_mmio_get_temperature() 29 t *= sensor->factor; in thermal_mmio_get_temperature() 42 struct thermal_mmio *sensor; in thermal_mmio_probe() local 44 struct thermal_mmio *sensor); in thermal_mmio_probe() 49 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in thermal_mmio_probe() 50 if (!sensor) in thermal_mmio_probe() 53 sensor->mmio_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in thermal_mmio_probe() 54 if (IS_ERR(sensor->mmio_base)) in thermal_mmio_probe() 55 return PTR_ERR(sensor->mmio_base); in thermal_mmio_probe() [all …]
|
/linux/drivers/net/ethernet/sfc/siena/ |
H A D | mcdi_mon.c | 40 #define SENSOR(name, label, hwmon_type, port) \ macro 42 SENSOR(CONTROLLER_TEMP, "Controller board temp.", TEMP, -1), 43 SENSOR(PHY_COMMON_TEMP, "PHY temp.", TEMP, -1), 44 SENSOR(CONTROLLER_COOLING, "Controller heat sink", COOL, -1), 45 SENSOR(PHY0_TEMP, "PHY temp.", TEMP, 0), 46 SENSOR(PHY0_COOLING, "PHY heat sink", COOL, 0), 47 SENSOR(PHY1_TEMP, "PHY temp.", TEMP, 1), 48 SENSOR(PHY1_COOLING, "PHY heat sink", COOL, 1), 49 SENSOR(IN_1V0, "1.0V supply", IN, -1), 50 SENSOR(IN_1V2, "1.2V supply", IN, -1), [all …]
|
/linux/drivers/net/ethernet/sfc/ |
H A D | mcdi_mon.c | 40 #define SENSOR(name, label, hwmon_type, port) \ macro 42 SENSOR(CONTROLLER_TEMP, "Controller board temp.", TEMP, -1), 43 SENSOR(PHY_COMMON_TEMP, "PHY temp.", TEMP, -1), 44 SENSOR(CONTROLLER_COOLING, "Controller heat sink", COOL, -1), 45 SENSOR(PHY0_TEMP, "PHY temp.", TEMP, 0), 46 SENSOR(PHY0_COOLING, "PHY heat sink", COOL, 0), 47 SENSOR(PHY1_TEMP, "PHY temp.", TEMP, 1), 48 SENSOR(PHY1_COOLING, "PHY heat sink", COOL, 1), 49 SENSOR(IN_1V0, "1.0V supply", IN, -1), 50 SENSOR(IN_1V2, "1.2V supply", IN, -1), [all …]
|
/linux/drivers/comedi/drivers/ |
H A D | jr3_pci.c | 4 * hardware driver for JR3/PCI force sensor board 11 * Description: JR3/PCI force sensor board 15 * Devices: [JR3] PCI force sensor board (jr3_pci) 107 struct jr3_sensor __iomem *sensor; member 128 static int is_complete(struct jr3_sensor __iomem *sensor) in is_complete() argument 130 return get_s16(&sensor->command_word0) == 0; in is_complete() 133 static void set_transforms(struct jr3_sensor __iomem *sensor, in set_transforms() argument 140 set_u16(&sensor->transforms[num].link[i].link_type, in set_transforms() 143 set_s16(&sensor->transforms[num].link[i].link_amount, in set_transforms() 151 static void use_transform(struct jr3_sensor __iomem *sensor, in use_transform() argument [all …]
|
/linux/drivers/iio/humidity/ |
H A D | Kconfig | 3 # humidity sensor drivers 8 tristate "Aosong AM2315 relative humidity and temperature sensor" 14 relative humidity and ambient temperature sensor. 29 tristate "ENS210 temperature and humidity sensor" 40 tristate "TI HDC100x relative humidity and temperature sensor" 53 tristate "TI HDC2010 relative humidity and temperature sensor" 63 tristate "TI HDC3020 relative humidity and temperature sensor" 75 tristate "HID Environmental humidity sensor" 81 Say yes here to build support for the HID SENSOR 85 will be called hid-sensor-humidity. [all …]
|
/linux/Documentation/hid/ |
H A D | hid-sensor.rst | 4 HID sensor framework provides necessary interfaces to implement sensor drivers, 5 which are connected to a sensor hub. The sensor hub is a HID device and it provides 6 a report descriptor conforming to HID 1.12 sensor usage tables. 8 Description from the HID 1.12 "HID Sensor Usages" specification: 9 "Standardization of HID usages for sensors would allow (but not require) sensor 15 This specification describes many usage IDs, which describe the type of sensor 16 and also the individual data fields. Each sensor can have variable number of 35 The report is indicating "sensor page (0x20)" contains an accelerometer-3D (0x73). 48 an ambient light sensor can send illumination data. 52 - Individual sensor processing part (sensor drivers) [all …]
|