Home
last modified time | relevance | path

Searched full:sensor (Results 1 – 25 of 1553) sorted by relevance

12345678910>>...63

/kernel/linux/linux-5.10/drivers/thermal/st/
Dst_thermal.c3 * 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 …]
Dstm_thermal.c102 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 …]
Dst_thermal_memmap.c3 * 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 …]
/kernel/linux/linux-5.10/drivers/media/i2c/smiapp/
Dsmiapp-core.c12 * Based on smia-sensor.c by Tuukka Toivonen <tuukkat76@gmail.com>
60 static u32 smiapp_get_limit(struct smiapp_sensor *sensor, in smiapp_get_limit() argument
66 return sensor->limits[limit]; in smiapp_get_limit()
69 #define SMIA_LIM(sensor, limit) \ argument
70 smiapp_get_limit(sensor, SMIAPP_LIMIT_##limit)
72 static int smiapp_read_all_smia_limits(struct smiapp_sensor *sensor) in smiapp_read_all_smia_limits() argument
74 struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd); in smiapp_read_all_smia_limits()
82 sensor, smiapp_reg_limits[i].addr, &val); in smiapp_read_all_smia_limits()
86 sensor->limits[i] = val; in smiapp_read_all_smia_limits()
93 if (SMIA_LIM(sensor, SCALER_N_MIN) == 0) in smiapp_read_all_smia_limits()
[all …]
/kernel/linux/linux-5.10/drivers/media/i2c/
Dov2680.c3 * 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 …]
Ds5k6a3.c3 * 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_pad_config *cfg, in __s5k6a3_get_format() argument
130 return cfg ? v4l2_subdev_get_try_format(&sensor->subdev, cfg, pad) : NULL; in __s5k6a3_get_format()
132 return &sensor->format; in __s5k6a3_get_format()
139 struct s5k6a3 *sensor = sd_to_s5k6a3(sd); in s5k6a3_set_fmt() local
[all …]
Dmt9m032.c3 * 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 …]
Dov5640.c545 /* power-on sensor init reg table */
602 static int ov5640_init_slave_id(struct ov5640_dev *sensor) in ov5640_init_slave_id() argument
604 struct i2c_client *client = sensor->i2c_client; in ov5640_init_slave_id()
630 static int ov5640_write_reg(struct ov5640_dev *sensor, u16 reg, u8 val) in ov5640_write_reg() argument
632 struct i2c_client *client = sensor->i2c_client; in ov5640_write_reg()
656 static int ov5640_read_reg(struct ov5640_dev *sensor, u16 reg, u8 *val) in ov5640_read_reg() argument
658 struct i2c_client *client = sensor->i2c_client; in ov5640_read_reg()
687 static int ov5640_read_reg16(struct ov5640_dev *sensor, u16 reg, u16 *val) in ov5640_read_reg16() argument
692 ret = ov5640_read_reg(sensor, reg, &hi); in ov5640_read_reg16()
695 ret = ov5640_read_reg(sensor, reg + 1, &lo); in ov5640_read_reg16()
[all …]
DKconfig392 This is a Video4Linux2 sensor driver for the TI TVP5146/47
708 It is used to allow usage of CSI-2 sensor with PARALLEL port
719 menu "Camera sensor devices"
729 tristate "Hynix Hi-556 sensor support"
735 This is a Video4Linux2 sensor driver for the Hynix
742 tristate "Sony IMX214 sensor support"
749 This is a Video4Linux2 sensor driver for the Sony
756 tristate "Sony IMX219 sensor support"
762 This is a Video4Linux2 sensor driver for the Sony
769 tristate "Sony IMX258 sensor support"
[all …]
/kernel/linux/linux-5.10/drivers/iio/light/
DKconfig11 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 …]
/kernel/linux/linux-5.10/drivers/thermal/
Dhisi_thermal.c2 * 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 …]
Dthermal_mmio.c26 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()
59 PTR_ERR(sensor->mmio_base)); in thermal_mmio_probe()
[all …]
/kernel/linux/linux-5.10/drivers/input/rmi4/
Drmi_2d_sensor.c22 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 …]
Drmi_f12.c29 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 …]
Drmi_f11.c36 * a given sensor are described by its query registers. The number of query
38 * 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 * @rezero - writing this to the F11 command register will cause the sensor to
183 * @nr_fingers - describes the maximum number of fingers the 2-D sensor
185 * @has_rel - the sensor supports relative motion reporting.
[all …]
/kernel/linux/linux-5.10/drivers/hwmon/
Dscpi-hwmon.c3 * 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 …]
/kernel/linux/linux-5.10/Documentation/hwmon/
Docc.rst16 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 …]
Dabituguru-datasheet.rst61 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 …]
/kernel/linux/linux-5.10/drivers/media/i2c/et8ek8/
Det8ek8_driver.c70 * 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 …]
/kernel/linux/linux-5.10/drivers/staging/media/atomisp/i2c/
DKconfig3 # 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 …]
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/
Dbase.c70 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 …]
/kernel/linux/linux-5.10/drivers/iio/pressure/
DKconfig10 tristate "Honeywell ABP pressure sensor driver"
20 tristate "Bosch Sensortec BMP180/BMP280 pressure sensor I2C driver"
28 an additional humidity sensor channel.
47 tristate "ChromeOS EC Barometer Sensor"
50 Say yes here to build support for the Barometer sensor when
51 presented by the ChromeOS EC Sensor hub.
69 tristate "Infineon DPS310 pressure and temperature sensor"
73 Support for the Infineon DPS310 digital barometric pressure sensor.
86 Say yes here to build support for the HID SENSOR
90 will be called hid-sensor-press.
[all …]
/kernel/linux/linux-5.10/drivers/iio/temperature/
DKconfig3 # 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 …]
/kernel/linux/linux-5.10/drivers/iio/imu/st_lsm6dsx/
Dst_lsm6dsx_shub.c5 * 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()
244 static int st_lsm6dsx_shub_master_enable(struct st_lsm6dsx_sensor *sensor, in st_lsm6dsx_shub_master_enable() argument
248 struct st_lsm6dsx_hw *hw = sensor->hw; in st_lsm6dsx_shub_master_enable()
252 /* enable acc sensor as trigger */ in st_lsm6dsx_shub_master_enable()
253 err = st_lsm6dsx_sensor_set_enable(sensor, enable); in st_lsm6dsx_shub_master_enable()
285 st_lsm6dsx_shub_read(struct st_lsm6dsx_sensor *sensor, u8 addr, in st_lsm6dsx_shub_read() argument
290 struct st_lsm6dsx_hw *hw = sensor->hw; in st_lsm6dsx_shub_read()
[all …]
/kernel/linux/linux-5.10/drivers/media/usb/gspca/m5602/
Dm5602_mt9m111.c3 * 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 …]

12345678910>>...63