/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/media/i2c/ |
H A D | ov2680.c | 3 * Omnivision OV2680 CMOS Image Sensor driver 7 * Based on OV5640 Sensor Driver 205 /* Sensor control register tweaks */ 272 static void ov2680_power_up(struct ov2680_dev *sensor) in ov2680_power_up() argument 274 if (!sensor->pwdn_gpio) in ov2680_power_up() 277 gpiod_set_value(sensor->pwdn_gpio, 0); in ov2680_power_up() 281 static void ov2680_power_down(struct ov2680_dev *sensor) in ov2680_power_down() argument 283 if (!sensor->pwdn_gpio) in ov2680_power_down() 286 gpiod_set_value(sensor->pwdn_gpio, 1); in ov2680_power_down() 290 static void ov2680_set_bayer_order(struct ov2680_dev *sensor, in ov2680_set_bayer_order() argument [all …]
|
H A 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 132 return &sensor->format; in __s5k6a3_get_format() 139 struct s5k6a3 *sensor = sd_to_s5k6a3(sd); in s5k6a3_set_fmt() local 144 mf = __s5k6a3_get_format(sensor, sd_state, fmt->pad, fmt->which); in s5k6a3_set_fmt() [all …]
|
H A 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 …]
|
H A D | Kconfig | 29 bool "Camera sensor devices" 48 This is a Video4Linux2 sensor-level driver for the Allied Vision 55 tristate "ON Semiconductor AR0521 sensor support" 57 This is a Video4Linux2 sensor driver for the ON Semiconductor 64 tristate "GalaxyCore GC0308 sensor support" 67 This is a Video4Linux2 sensor driver for the GalaxyCore 74 tristate "GalaxyCore gc05a2 sensor support" 77 This is a Video4Linux2 sensor driver for the GalaxyCore gc05a2 84 tristate "GalaxyCore gc08a3 sensor support" 87 This is a Video4Linux2 sensor driver for the GalaxyCore gc08a3 [all …]
|
H A D | mt9m114.c | 3 * mt9m114.c onsemi MT9M114 sensor driver 52 /* Sensor Core registers */ 472 mt9m114_default_format_info(struct mt9m114 *sensor) in mt9m114_default_format_info() argument 474 if (sensor->bus_cfg.bus_type == V4L2_MBUS_CSI2_DPHY) in mt9m114_default_format_info() 481 mt9m114_format_info(struct mt9m114 *sensor, unsigned int pad, u32 code) in mt9m114_format_info() argument 492 if (sensor->bus_cfg.bus_type == V4L2_MBUS_CSI2_DPHY) in mt9m114_format_info() 505 return mt9m114_default_format_info(sensor); in mt9m114_format_info() 521 /* Sensor optimization */ 656 static int mt9m114_poll_command(struct mt9m114 *sensor, u32 command) in mt9m114_poll_command() argument 663 ret = cci_read(sensor->regmap, MT9M114_COMMAND_REGISTER, &value, in mt9m114_poll_command() [all …]
|
H A D | ar0521.c | 159 static int ar0521_code_to_bpp(struct ar0521_dev *sensor) in ar0521_code_to_bpp() argument 161 switch (sensor->fmt.code) { in ar0521_code_to_bpp() 170 static int ar0521_write_regs(struct ar0521_dev *sensor, const __be16 *data, in ar0521_write_regs() argument 173 struct i2c_client *client = sensor->i2c_client; in ar0521_write_regs() 185 v4l2_err(&sensor->sd, "%s: I2C write error\n", __func__); in ar0521_write_regs() 192 static int ar0521_write_reg(struct ar0521_dev *sensor, u16 reg, u16 val) in ar0521_write_reg() argument 196 return ar0521_write_regs(sensor, buf, 2); in ar0521_write_reg() 199 static int ar0521_set_geometry(struct ar0521_dev *sensor) in ar0521_set_geometry() argument 202 u16 x = clamp((AR0521_WIDTH_MAX - sensor->fmt.width) / 2, in ar0521_set_geometry() 204 u16 y = clamp(((AR0521_HEIGHT_MAX - sensor->fmt.height) / 2) & ~1, in ar0521_set_geometry() [all …]
|
H A D | ov8865.c | 809 /* Sensor */ 886 /* Sensor */ 1219 /* Sensor */ 1348 static int ov8865_read(struct ov8865_sensor *sensor, u16 address, u8 *value) in ov8865_read() argument 1351 struct i2c_client *client = sensor->i2c_client; in ov8865_read() 1371 static int ov8865_write(struct ov8865_sensor *sensor, u16 address, u8 value) in ov8865_write() argument 1374 struct i2c_client *client = sensor->i2c_client; in ov8865_write() 1387 static int ov8865_write_sequence(struct ov8865_sensor *sensor, in ov8865_write_sequence() argument 1395 ret = ov8865_write(sensor, sequence[i].address, in ov8865_write_sequence() 1407 static int ov8865_update_bits(struct ov8865_sensor *sensor, u16 address, in ov8865_update_bits() argument [all …]
|
/linux/drivers/media/pci/intel/ |
H A D | ipu-bridge.c | 46 * Do not add an entry for a sensor that is not actually supported. 132 /* camera sensor depends on IVSC in DSDT if exist */ in ipu_bridge_get_ivsc_acpi_dev() 176 static int ipu_bridge_check_ivsc_dev(struct ipu_sensor *sensor, in ipu_bridge_check_ivsc_dev() argument 191 sensor->csi_dev = csi_dev; in ipu_bridge_check_ivsc_dev() 192 sensor->ivsc_adev = adev; in ipu_bridge_check_ivsc_dev() 286 int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor) in ipu_bridge_parse_ssdb() argument 305 sensor->link = ssdb.link; in ipu_bridge_parse_ssdb() 306 sensor->lanes = ssdb.lanes; in ipu_bridge_parse_ssdb() 307 sensor->mclkspeed = ssdb.mclkspeed; in ipu_bridge_parse_ssdb() 308 sensor->rotation = ipu_bridge_parse_rotation(adev, &ssdb); in ipu_bridge_parse_ssdb() [all …]
|
/linux/drivers/iio/common/scmi_sensors/ |
H A D | scmi_iio.c | 4 * System Control and Management Interface(SCMI) based IIO sensor driver 44 struct scmi_iio_priv *sensor; in scmi_iio_sensor_update_cb() local 52 sensor = container_of(nb, struct scmi_iio_priv, sensor_update_nb); in scmi_iio_sensor_update_cb() 55 sensor->iio_buf[i] = sensor_update->readings[i].value; in scmi_iio_sensor_update_cb() 57 if (!sensor->sensor_info->timestamped) { in scmi_iio_sensor_update_cb() 71 tstamp_scale = sensor->sensor_info->tstamp_scale + in scmi_iio_sensor_update_cb() 81 scmi_iio_dev = sensor->indio_dev; in scmi_iio_sensor_update_cb() 82 iio_push_to_buffers_with_timestamp(scmi_iio_dev, sensor->iio_buf, in scmi_iio_sensor_update_cb() 89 struct scmi_iio_priv *sensor = iio_priv(iio_dev); in scmi_iio_buffer_preenable() local 93 if (sensor->sensor_info->timestamped) in scmi_iio_buffer_preenable() [all …]
|
/linux/drivers/input/rmi4/ |
H A 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 …]
|
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 …]
|
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 …]
|
/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 …]
|
/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/media/i2c/et8ek8/ |
H A 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/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/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 "TYHX HX9023S SAR sensor" 42 Say Y here to build a driver for TYHX HX9023S capacitive SAR sensor. 50 tristate "Murata IRS-D200 PIR sensor" 56 Say Y here to build a driver for the Murata IRS-D200 PIR sensor. 62 tristate "Intersil ISL29501 Time Of Flight sensor" 69 Time of Flight sensor. [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/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 …]
|
H A D | abituguru-datasheet.rst | 61 in a bank for a sensor is one or more bytes large. 68 number of bytes data per sensor and contents/meaning of those bytes. 70 Although both this document and the kernel driver have kept the sensor 73 a sensor. 100 Sending bank and sensor addresses to the uGuru 110 Once DATA holds 0x08 again write the sensor address to CMD. 116 First send the bank and sensor addresses as described above. 135 First send the bank and sensor addresses as described above. 168 This bank contains 0 sensors, iow the sensor address is ignored (but must be 172 This byte holds the alarm flags for sensor 0-7 of Sensor Bank1, with bit 0 [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 …]
|