Skip to content

sensor: Track issues with existing drivers which don't conform to the API #83942

@yperess

Description

@yperess

During the process of adding sensor.yaml files to describe sensors (#71235), several inconsistencies have been found which will be tracked via this issue.

  • adi/adt7310 uses a 0-15 register value for SENSOR_ATTR_HYSTERESIS which means that the attribute isn't portable. solution: Convert to a %
  • adi/adxl345 allows using the FIFO watermark as a trigger but doesn't allow using the SENSOR_ATTR_BATCH_DURATION to configure the watermark
  • adi/adxl362 though this might be more of an attribute API issue. We set the upper/lower threshold on the acceleration, but really it affects when the motion/stationary triggers fire.
  • adi/adxl362 uses FIFO watermark trigger but doesn't allow SENSOR_ATTR_BATCH_DURATION to configure the watermark
  • adi/adxl367 uses FIFO watermark trigger but doesn't allow SENSOR_ATTR_BATCH_DURATION to configure the watermark
  • adi/adxl372 uses FIFO watermark trigger but doesn't allow SENSOR_ATTR_BATCH_DURATION to configure the watermark
  • apds9305 sets both gain and resolution attributes using raw bitfield values instead of any reasonable units for the attribute.
  • apds9960 sets both lower and upper trigger thresholds for proximit using raw register values instead of distance units (m)

Metadata

Metadata

Assignees

Labels

MetaA collection of features, enhancements or bugsarea: SensorsSensorsbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions