/Linux-v5.15/drivers/thermal/st/ |
D | st_thermal.c | 3 * ST Thermal Sensor Driver core routines 23 static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) in st_thermal_alloc_regfields() argument 25 struct device *dev = sensor->dev; in st_thermal_alloc_regfields() 26 struct regmap *regmap = sensor->regmap; in st_thermal_alloc_regfields() 27 const struct reg_field *reg_fields = sensor->cdata->reg_fields; in st_thermal_alloc_regfields() 29 sensor->dcorrect = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 32 sensor->overflow = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 35 sensor->temp_data = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 38 if (IS_ERR(sensor->dcorrect) || in st_thermal_alloc_regfields() 39 IS_ERR(sensor->overflow) || in st_thermal_alloc_regfields() [all …]
|
D | stm_thermal.c | 102 static int stm_enable_irq(struct stm_thermal_sensor *sensor) in stm_enable_irq() argument 106 dev_dbg(sensor->dev, "low:%d high:%d\n", sensor->low_temp_enabled, in stm_enable_irq() 107 sensor->high_temp_enabled); in stm_enable_irq() 110 value = readl_relaxed(sensor->base + DTS_ITENR_OFFSET); in stm_enable_irq() 113 if (sensor->low_temp_enabled) in stm_enable_irq() 116 if (sensor->high_temp_enabled) in stm_enable_irq() 120 writel_relaxed(value, sensor->base + DTS_ITENR_OFFSET); in stm_enable_irq() 127 struct stm_thermal_sensor *sensor = sdata; in stm_thermal_irq_handler() local 129 dev_dbg(sensor->dev, "sr:%d\n", in stm_thermal_irq_handler() 130 readl_relaxed(sensor->base + DTS_SR_OFFSET)); in stm_thermal_irq_handler() [all …]
|
D | st_thermal_memmap.c | 3 * ST Thermal Sensor Driver for memory mapped sensors. 19 /* Power control bits for the memory mapped thermal sensor */ 25 * According to the STIH416 MPE temp sensor data sheet - 28 * sensor. regmap_update_bits() will be used to update the register. 39 struct st_thermal_sensor *sensor = sdata; in st_mmap_thermal_trip_handler() local 41 thermal_zone_device_update(sensor->thermal_dev, in st_mmap_thermal_trip_handler() 48 static int st_mmap_power_ctrl(struct st_thermal_sensor *sensor, in st_mmap_power_ctrl() argument 54 return regmap_update_bits(sensor->regmap, STIH416_MPE_CONF, mask, val); in st_mmap_power_ctrl() 57 static int st_mmap_alloc_regfields(struct st_thermal_sensor *sensor) in st_mmap_alloc_regfields() argument 59 struct device *dev = sensor->dev; in st_mmap_alloc_regfields() [all …]
|
/Linux-v5.15/drivers/media/i2c/ccs/ |
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 …]
|
/Linux-v5.15/drivers/media/i2c/ |
D | ov2680.c | 3 * Omnivision OV2680 CMOS Image Sensor driver 7 * Based on OV5640 Sensor Driver 186 static struct device *ov2680_to_dev(struct ov2680_dev *sensor) in ov2680_to_dev() argument 188 return &sensor->i2c_client->dev; in ov2680_to_dev() 197 static int __ov2680_write_reg(struct ov2680_dev *sensor, u16 reg, in __ov2680_write_reg() argument 200 struct i2c_client *client = sensor->i2c_client; in __ov2680_write_reg() 227 static int __ov2680_read_reg(struct ov2680_dev *sensor, u16 reg, in __ov2680_read_reg() argument 230 struct i2c_client *client = sensor->i2c_client; in __ov2680_read_reg() 269 static int ov2680_mod_reg(struct ov2680_dev *sensor, u16 reg, u8 mask, u8 val) in ov2680_mod_reg() argument 274 ret = ov2680_read_reg(sensor, reg, &readval); in ov2680_mod_reg() [all …]
|
D | s5k6a3.c | 3 * Samsung S5K6A3 image sensor driver 45 * struct s5k6a3 - fimc-is sensor data structure 47 * @subdev: the image sensor's v4l2 subdev 49 * @supplies: image sensor's voltage regulator supplies 50 * @gpio_reset: GPIO connected to the sensor's reset pin 52 * @format: media bus format at the sensor's source pad 126 struct s5k6a3 *sensor, struct v4l2_subdev_state *sd_state, in __s5k6a3_get_format() argument 130 return sd_state ? v4l2_subdev_get_try_format(&sensor->subdev, in __s5k6a3_get_format() 133 return &sensor->format; in __s5k6a3_get_format() 140 struct s5k6a3 *sensor = sd_to_s5k6a3(sd); in s5k6a3_set_fmt() local [all …]
|
D | mt9m032.c | 3 * Driver for MT9M032 CMOS Image Sensor from Micron 125 * for this sensor. 155 #define to_dev(sensor) \ argument 156 (&((struct i2c_client *)v4l2_get_subdevdata(&(sensor)->subdev))->dev) 168 static u32 mt9m032_row_time(struct mt9m032 *sensor, unsigned int width) in mt9m032_row_time() argument 174 ns = div_u64(1000000000ULL * effective_width, sensor->pix_clock); in mt9m032_row_time() 175 dev_dbg(to_dev(sensor), "MT9M032 line time: %u ns\n", ns); in mt9m032_row_time() 179 static int mt9m032_update_timing(struct mt9m032 *sensor, in mt9m032_update_timing() argument 182 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); in mt9m032_update_timing() 183 struct v4l2_rect *crop = &sensor->crop; in mt9m032_update_timing() [all …]
|
D | ov5648.c | 966 static int ov5648_read(struct ov5648_sensor *sensor, u16 address, u8 *value) in ov5648_read() argument 969 struct i2c_client *client = sensor->i2c_client; in ov5648_read() 989 static int ov5648_write(struct ov5648_sensor *sensor, u16 address, u8 value) in ov5648_write() argument 992 struct i2c_client *client = sensor->i2c_client; in ov5648_write() 1005 static int ov5648_write_sequence(struct ov5648_sensor *sensor, in ov5648_write_sequence() argument 1013 ret = ov5648_write(sensor, sequence[i].address, in ov5648_write_sequence() 1025 static int ov5648_update_bits(struct ov5648_sensor *sensor, u16 address, in ov5648_update_bits() argument 1031 ret = ov5648_read(sensor, address, &value); in ov5648_update_bits() 1038 ret = ov5648_write(sensor, address, value); in ov5648_update_bits() 1045 /* Sensor */ [all …]
|
D | ov5640.c | 566 /* power-on sensor init reg table */ 628 static int ov5640_init_slave_id(struct ov5640_dev *sensor) in ov5640_init_slave_id() argument 630 struct i2c_client *client = sensor->i2c_client; in ov5640_init_slave_id() 656 static int ov5640_write_reg(struct ov5640_dev *sensor, u16 reg, u8 val) in ov5640_write_reg() argument 658 struct i2c_client *client = sensor->i2c_client; in ov5640_write_reg() 682 static int ov5640_read_reg(struct ov5640_dev *sensor, u16 reg, u8 *val) in ov5640_read_reg() argument 684 struct i2c_client *client = sensor->i2c_client; in ov5640_read_reg() 713 static int ov5640_read_reg16(struct ov5640_dev *sensor, u16 reg, u16 *val) in ov5640_read_reg16() argument 718 ret = ov5640_read_reg(sensor, reg, &hi); in ov5640_read_reg16() 721 ret = ov5640_read_reg(sensor, reg + 1, &lo); in ov5640_read_reg16() [all …]
|
D | ov8865.c | 735 /* Sensor */ 812 /* Sensor */ 1165 /* Sensor */ 1294 static int ov8865_read(struct ov8865_sensor *sensor, u16 address, u8 *value) in ov8865_read() argument 1297 struct i2c_client *client = sensor->i2c_client; in ov8865_read() 1317 static int ov8865_write(struct ov8865_sensor *sensor, u16 address, u8 value) in ov8865_write() argument 1320 struct i2c_client *client = sensor->i2c_client; in ov8865_write() 1333 static int ov8865_write_sequence(struct ov8865_sensor *sensor, in ov8865_write_sequence() argument 1341 ret = ov8865_write(sensor, sequence[i].address, in ov8865_write_sequence() 1353 static int ov8865_update_bits(struct ov8865_sensor *sensor, u16 address, in ov8865_update_bits() argument [all …]
|
D | Kconfig | 393 This is a Video4Linux2 sensor driver for the TI TVP5146/47 712 It is used to allow usage of CSI-2 sensor with PARALLEL port 723 menu "Camera sensor devices" 733 tristate "Hynix Hi-556 sensor support" 739 This is a Video4Linux2 sensor driver for the Hynix 746 tristate "Sony IMX208 sensor support" 750 This is a Video4Linux2 sensor driver for the Sony 757 tristate "Sony IMX214 sensor support" 764 This is a Video4Linux2 sensor driver for the Sony 771 tristate "Sony IMX219 sensor support" [all …]
|
/Linux-v5.15/drivers/media/pci/intel/ipu3/ |
D | cio2-bridge.c | 20 * Do not add an entry for a sensor that is not actually supported. 76 struct cio2_sensor *sensor, in cio2_bridge_create_fwnode_properties() argument 80 sensor->prop_names = prop_names; in cio2_bridge_create_fwnode_properties() 82 sensor->local_ref[0] = SOFTWARE_NODE_REFERENCE(&sensor->swnodes[SWNODE_CIO2_ENDPOINT]); in cio2_bridge_create_fwnode_properties() 83 sensor->remote_ref[0] = SOFTWARE_NODE_REFERENCE(&sensor->swnodes[SWNODE_SENSOR_ENDPOINT]); in cio2_bridge_create_fwnode_properties() 85 sensor->dev_properties[0] = PROPERTY_ENTRY_U32( in cio2_bridge_create_fwnode_properties() 86 sensor->prop_names.clock_frequency, in cio2_bridge_create_fwnode_properties() 87 sensor->ssdb.mclkspeed); in cio2_bridge_create_fwnode_properties() 88 sensor->dev_properties[1] = PROPERTY_ENTRY_U8( in cio2_bridge_create_fwnode_properties() 89 sensor->prop_names.rotation, in cio2_bridge_create_fwnode_properties() [all …]
|
/Linux-v5.15/drivers/iio/light/ |
D | Kconfig | 11 tristate "ACPI Ambient Light Sensor" 18 Ambient Light Sensor. 24 tristate "ADJD-S311-CR999 digital color sensor" 30 digital color light sensor. 36 tristate "ADUX1020 photometric sensor" 41 ADUX1020 photometric sensor. 47 tristate "AL3010 ambient light sensor" 51 ambient light sensor. 57 tristate "AL3320A ambient light sensor" 61 ambient light sensor. [all …]
|
/Linux-v5.15/drivers/thermal/ |
D | hisi_thermal.c | 2 * HiSilicon thermal sensor driver 77 int (*get_temp)(struct hisi_thermal_sensor *sensor); 78 int (*enable_sensor)(struct hisi_thermal_sensor *sensor); 79 int (*disable_sensor)(struct hisi_thermal_sensor *sensor); 80 int (*irq_handler)(struct hisi_thermal_sensor *sensor); 86 struct hisi_thermal_sensor *sensor; member 252 * Temperature configuration register - Sensor selection 256 * 0x0: local sensor (default) 257 * 0x1: remote sensor 1 (ACPU cluster 1) 258 * 0x2: remote sensor 2 (ACPU cluster 0) [all …]
|
D | thermal_mmio.c | 26 struct thermal_mmio *sensor = in thermal_mmio_get_temperature() local 29 t = sensor->read_mmio(sensor->mmio_base) & sensor->mask; in thermal_mmio_get_temperature() 30 t *= sensor->factor; in thermal_mmio_get_temperature() 44 struct thermal_mmio *sensor; in thermal_mmio_probe() local 46 struct thermal_mmio *sensor); in thermal_mmio_probe() 51 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in thermal_mmio_probe() 52 if (!sensor) in thermal_mmio_probe() 56 sensor->mmio_base = devm_ioremap_resource(&pdev->dev, resource); in thermal_mmio_probe() 57 if (IS_ERR(sensor->mmio_base)) in thermal_mmio_probe() 58 return PTR_ERR(sensor->mmio_base); in thermal_mmio_probe() [all …]
|
/Linux-v5.15/drivers/input/rmi4/ |
D | rmi_2d_sensor.c | 22 void rmi_2d_sensor_abs_process(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_process() argument 26 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_process() 33 obj->x = sensor->max_x - obj->x; in rmi_2d_sensor_abs_process() 36 obj->y = sensor->max_y - obj->y; in rmi_2d_sensor_abs_process() 56 obj->x = min(sensor->max_x, obj->x); in rmi_2d_sensor_abs_process() 59 obj->y = min(sensor->max_y, obj->y); in rmi_2d_sensor_abs_process() 61 sensor->tracking_pos[slot].x = obj->x; in rmi_2d_sensor_abs_process() 62 sensor->tracking_pos[slot].y = obj->y; in rmi_2d_sensor_abs_process() 66 void rmi_2d_sensor_abs_report(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_report() argument 70 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_report() [all …]
|
D | rmi_f12.c | 29 struct rmi_2d_sensor sensor; member 66 struct rmi_2d_sensor *sensor = &f12->sensor; in rmi_f12_read_sensor_tuning() local 67 struct rmi_function *fn = sensor->fn; in rmi_f12_read_sensor_tuning() 80 "F12 does not have the sensor tuning control register\n"); in rmi_f12_read_sensor_tuning() 100 sensor->max_x = (buf[offset + 1] << 8) | buf[offset]; in rmi_f12_read_sensor_tuning() 101 sensor->max_y = (buf[offset + 3] << 8) | buf[offset + 2]; in rmi_f12_read_sensor_tuning() 106 sensor->max_x, sensor->max_y); in rmi_f12_read_sensor_tuning() 115 /* Units 1/128 sensor pitch */ in rmi_f12_read_sensor_tuning() 131 /* Skip over sensor flags */ in rmi_f12_read_sensor_tuning() 135 sensor->x_mm = (pitch_x * rx_receivers) >> 12; in rmi_f12_read_sensor_tuning() [all …]
|
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-v5.15/drivers/iio/common/scmi_sensors/ |
D | scmi_iio.c | 4 * System Control and Management Interface(SCMI) based IIO sensor driver 40 struct scmi_iio_priv *sensor; in scmi_iio_sensor_update_cb() local 48 sensor = container_of(nb, struct scmi_iio_priv, sensor_update_nb); in scmi_iio_sensor_update_cb() 51 sensor->iio_buf[i] = sensor_update->readings[i].value; in scmi_iio_sensor_update_cb() 53 if (!sensor->sensor_info->timestamped) { in scmi_iio_sensor_update_cb() 67 tstamp_scale = sensor->sensor_info->tstamp_scale + in scmi_iio_sensor_update_cb() 77 scmi_iio_dev = sensor->indio_dev; in scmi_iio_sensor_update_cb() 78 iio_push_to_buffers_with_timestamp(scmi_iio_dev, sensor->iio_buf, in scmi_iio_sensor_update_cb() 85 struct scmi_iio_priv *sensor = iio_priv(iio_dev); in scmi_iio_buffer_preenable() local 89 if (sensor->sensor_info->timestamped) in scmi_iio_buffer_preenable() [all …]
|
/Linux-v5.15/drivers/hid/amd-sfh-hid/hid_descriptor/ |
D | amd_sfh_hid_report_desc.h | 12 // Accelerometer 3D Sensor 20 0x05, 0x20, /* HID usage page sensor */ 21 0x0A, 0x09, 0x03, /* Sensor property and sensor connection type */ 27 0x0A, 0x30, 0x08, /* Sensor property connection type intergated sel*/ 28 0x0A, 0x31, 0x08, /* Sensor property connection type attached sel */ 29 0x0A, 0x32, 0x08, /* Sensor property connection type external sel */ 32 0x0A, 0x16, 0x03, /* HID usage sensor property reporting state */ 38 0x0A, 0x40, 0x08, /* Sensor property report state no events sel */ 39 0x0A, 0x41, 0x08, /* Sensor property report state all events sel */ 40 0x0A, 0x42, 0x08, /* Sensor property report state threshold events sel */ [all …]
|
/Linux-v5.15/drivers/hwmon/ |
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 …]
|
/Linux-v5.15/drivers/media/i2c/et8ek8/ |
D | et8ek8_driver.c | 70 * This table describes what should be written to the sensor register 551 * If power is on, also updates the sensor analog and digital gains. 554 static int et8ek8_set_gain(struct et8ek8_sensor *sensor, s32 gain) in et8ek8_set_gain() argument 556 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); in et8ek8_set_gain() 582 static int et8ek8_set_test_pattern(struct et8ek8_sensor *sensor, s32 mode) in et8ek8_set_test_pattern() argument 584 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); in et8ek8_set_test_pattern() 638 struct et8ek8_sensor *sensor = in et8ek8_set_ctrl() local 643 return et8ek8_set_gain(sensor, ctrl->val); in et8ek8_set_ctrl() 648 v4l2_get_subdevdata(&sensor->subdev); in et8ek8_set_ctrl() 655 return et8ek8_set_test_pattern(sensor, ctrl->val); in et8ek8_set_ctrl() [all …]
|
/Linux-v5.15/Documentation/hwmon/ |
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-v5.15/drivers/iio/temperature/ |
D | Kconfig | 3 # Temperature sensor drivers 8 tristate "Azoteq IQS620AT temperature sensor" 12 temperature sensor. 18 tristate "Analog Devices Multi-Sensor Digital Temperature Measurement System" 22 Say yes here to build support for the LTC2983 Multi-Sensor 45 tristate "HID Environmental temperature sensor" 51 Say yes here to build support for the HID SENSOR 55 will be called hid-sensor-temperature. 58 tristate "MLX90614 contact-less infrared sensor" 62 MLX90614 contact-less infrared sensor connected with I2C. [all …]
|
/Linux-v5.15/drivers/staging/media/atomisp/i2c/ |
D | Kconfig | 3 # Kconfig for sensor drivers 7 tristate "OVT ov2722 sensor support" 11 This is a Video4Linux2 sensor-level driver for the OVT 14 OVT is a 2M raw sensor. 19 tristate "Galaxy gc2235 sensor support" 23 This is a Video4Linux2 sensor-level driver for the OVT 26 GC2235 is a 2M raw sensor. 34 This is a helper library to be used from a sensor driver to load, parse 41 tristate "Aptina mt9m114 sensor support" 45 This is a Video4Linux2 sensor-level driver for the Micron [all …]
|