Home
last modified time | relevance | path

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

12345678910>>...118

/kernel/linux/linux-4.19/drivers/media/i2c/smiapp/
Dsmiapp-core.c11 * Based on smia-sensor.c by Tuukka Toivonen <tuukkat76@gmail.com>
68 static int smiapp_read_frame_fmt(struct smiapp_sensor *sensor) in smiapp_read_frame_fmt() argument
70 struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd); in smiapp_read_frame_fmt()
77 rval = smiapp_read(sensor, SMIAPP_REG_U8_FRAME_FORMAT_MODEL_TYPE, in smiapp_read_frame_fmt()
82 rval = smiapp_read(sensor, SMIAPP_REG_U8_FRAME_FORMAT_MODEL_SUBTYPE, in smiapp_read_frame_fmt()
109 rval = smiapp_read(sensor, reg, &desc); in smiapp_read_frame_fmt()
121 rval = smiapp_read(sensor, reg, &desc); in smiapp_read_frame_fmt()
170 sensor->visible_pixel_start = pixel_count; in smiapp_read_frame_fmt()
178 if (sensor->embedded_end) in smiapp_read_frame_fmt()
180 sensor->embedded_start = line_count; in smiapp_read_frame_fmt()
[all …]
/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-4.19/drivers/thermal/st/
Dst_thermal.c2 * ST Thermal Sensor Driver core routines
28 static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) in st_thermal_alloc_regfields() argument
30 struct device *dev = sensor->dev; in st_thermal_alloc_regfields()
31 struct regmap *regmap = sensor->regmap; in st_thermal_alloc_regfields()
32 const struct reg_field *reg_fields = sensor->cdata->reg_fields; in st_thermal_alloc_regfields()
34 sensor->dcorrect = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields()
37 sensor->overflow = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields()
40 sensor->temp_data = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields()
43 if (IS_ERR(sensor->dcorrect) || in st_thermal_alloc_regfields()
44 IS_ERR(sensor->overflow) || in st_thermal_alloc_regfields()
[all …]
Dst_thermal_memmap.c2 * ST Thermal Sensor Driver for memory mapped sensors.
23 /* Power control bits for the memory mapped thermal sensor */
29 * According to the STIH416 MPE temp sensor data sheet -
32 * sensor. regmap_update_bits() will be used to update the register.
43 struct st_thermal_sensor *sensor = sdata; in st_mmap_thermal_trip_handler() local
45 thermal_zone_device_update(sensor->thermal_dev, in st_mmap_thermal_trip_handler()
52 static int st_mmap_power_ctrl(struct st_thermal_sensor *sensor, in st_mmap_power_ctrl() argument
58 return regmap_update_bits(sensor->regmap, STIH416_MPE_CONF, mask, val); in st_mmap_power_ctrl()
61 static int st_mmap_alloc_regfields(struct st_thermal_sensor *sensor) in st_mmap_alloc_regfields() argument
63 struct device *dev = sensor->dev; in st_mmap_alloc_regfields()
[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 …]
/kernel/linux/linux-4.19/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.c2 * Samsung S5K6A3 image sensor driver
48 * struct s5k6a3 - fimc-is sensor data structure
50 * @subdev: the image sensor's v4l2 subdev
52 * @supplies: image sensor's voltage regulator supplies
53 * @gpio_reset: GPIO connected to the sensor's reset pin
55 * @format: media bus format at the sensor's source pad
129 struct s5k6a3 *sensor, struct v4l2_subdev_pad_config *cfg, in __s5k6a3_get_format() argument
133 return cfg ? v4l2_subdev_get_try_format(&sensor->subdev, cfg, pad) : NULL; in __s5k6a3_get_format()
135 return &sensor->format; in __s5k6a3_get_format()
142 struct s5k6a3 *sensor = sd_to_s5k6a3(sd); in s5k6a3_set_fmt() local
[all …]
Dmt9m032.c2 * Driver for MT9M032 CMOS Image Sensor from Micron
133 * for this sensor.
163 #define to_dev(sensor) \ argument
164 (&((struct i2c_client *)v4l2_get_subdevdata(&(sensor)->subdev))->dev)
176 static u32 mt9m032_row_time(struct mt9m032 *sensor, unsigned int width) in mt9m032_row_time() argument
182 ns = div_u64(1000000000ULL * effective_width, sensor->pix_clock); in mt9m032_row_time()
183 dev_dbg(to_dev(sensor), "MT9M032 line time: %u ns\n", ns); in mt9m032_row_time()
187 static int mt9m032_update_timing(struct mt9m032 *sensor, in mt9m032_update_timing() argument
190 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); in mt9m032_update_timing()
191 struct v4l2_rect *crop = &sensor->crop; in mt9m032_update_timing()
[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 …]
/kernel/linux/linux-4.19/drivers/iio/light/
DKconfig10 tristate "ACPI Ambient Light Sensor"
17 Ambient Light Sensor.
23 tristate "ADJD-S311-CR999 digital color sensor"
29 digital color light sensor.
35 tristate "AL3320A ambient light sensor"
39 ambient light sensor.
45 tristate "APDS9300 ambient light sensor"
49 ambient light sensor.
55 tristate "Avago APDS9960 gesture/RGB/ALS/proximity sensor"
62 APDS9960 gesture/RGB/ALS/proximity sensor.
[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-4.19/drivers/input/rmi4/
Drmi_2d_sensor.c25 void rmi_2d_sensor_abs_process(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_process() argument
29 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_process()
36 obj->x = sensor->max_x - obj->x; in rmi_2d_sensor_abs_process()
39 obj->y = sensor->max_y - obj->y; in rmi_2d_sensor_abs_process()
59 obj->x = min(sensor->max_x, obj->x); in rmi_2d_sensor_abs_process()
62 obj->y = min(sensor->max_y, obj->y); in rmi_2d_sensor_abs_process()
64 sensor->tracking_pos[slot].x = obj->x; in rmi_2d_sensor_abs_process()
65 sensor->tracking_pos[slot].y = obj->y; in rmi_2d_sensor_abs_process()
69 void rmi_2d_sensor_abs_report(struct rmi_2d_sensor *sensor, in rmi_2d_sensor_abs_report() argument
73 struct rmi_2d_axis_alignment *axis_align = &sensor->axis_align; in rmi_2d_sensor_abs_report()
[all …]
Drmi_f12.c32 struct rmi_2d_sensor sensor; member
69 struct rmi_2d_sensor *sensor = &f12->sensor; in rmi_f12_read_sensor_tuning() local
70 struct rmi_function *fn = sensor->fn; in rmi_f12_read_sensor_tuning()
84 "F12 does not have the sensor tuning control register\n"); in rmi_f12_read_sensor_tuning()
104 sensor->max_x = (buf[offset + 1] << 8) | buf[offset]; in rmi_f12_read_sensor_tuning()
105 sensor->max_y = (buf[offset + 3] << 8) | buf[offset + 2]; in rmi_f12_read_sensor_tuning()
110 sensor->max_x, sensor->max_y); in rmi_f12_read_sensor_tuning()
119 /* Units 1/128 sensor pitch */ in rmi_f12_read_sensor_tuning()
140 sensor->x_mm = (pitch_x * rx_receivers) >> 12; in rmi_f12_read_sensor_tuning()
141 sensor->y_mm = (pitch_y * tx_receivers) >> 12; in rmi_f12_read_sensor_tuning()
[all …]
Drmi_f11.c39 * a given sensor are described by its query registers. The number of query
41 * queries as well as the sensor query information.
43 * Similarly, each sensor has control registers that govern its behavior. The
44 * size and layout of the control registers for a given sensor can be determined
47 * And in a likewise fashion, each sensor has data registers where it reports
52 * registers in order to determine the attributes of a sensor. Then
54 * registers for sensor.
69 * @rezero - writing this to the F11 command register will cause the sensor to
186 * @nr_fingers - describes the maximum number of fingers the 2-D sensor
188 * @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-4.19/drivers/hwmon/
Dscpi-hwmon.c2 * System Control and Power Interface(SCPI) based hwmon sensor driver
65 static void scpi_scale_reading(u64 *value, struct sensor_data *sensor) in scpi_scale_reading() argument
67 if (scpi_scale[sensor->info.class] != sensor->scale) { in scpi_scale_reading()
68 *value *= scpi_scale[sensor->info.class]; in scpi_scale_reading()
69 do_div(*value, sensor->scale); in scpi_scale_reading()
78 struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id]; in scpi_read_temp() local
82 ret = scpi_ops->sensor_get_value(sensor->info.sensor_id, &value); in scpi_read_temp()
86 scpi_scale_reading(&value, sensor); in scpi_read_temp()
98 struct sensor_data *sensor; in scpi_show_sensor() local
102 sensor = container_of(attr, struct sensor_data, dev_attr_input); in scpi_show_sensor()
[all …]

12345678910>>...118