This patch series adds support for the ENS210/ENS210A/ENS211/ENS212/ENS213A/ENS215 temperature and humidity sensors. Patch 1 adds the required device tree bindings. Patch 2 adds the driver, providing the probe and read functions. Signed-off-by: Joshua Felmeden <jfelmeden@xxxxxxxxxxxxxxxxxxxx> --- changelog v5->v6: - ens210.c: Improved description to i2c lock - ens210.c: Fixed line wrap formatting - ens210.c: Removed unnecessary comments - ens210.c: Removed unnecessary else if - ens210.c: Fixed incorrect cast - ens210.c: Used GENMASK instead of 0xffff - ens210.c: Removed rel humidity offset bit - ens210.c: Fixed erroneous break - ens210.c: Add error check to write - ens210.c: Fixed general code formatting - Link to v5: https://lore.kernel.org/all/20240722-ens21x-v5-0-cda88dce100e@xxxxxxxxxxxxxxxxxxxx/ --- changelog v4->v5: - ens210.c: Updated ens210_data description to reflect values - ens210.c: Updated dev_err to always use i2c device - ens210.c: Check T_VALID before returning data - ens210.c: Fix short linewrap on certain lines - ens210.c: Added unreachable instead of unreachable return - ens210.c: Fix sparse warnings - ens210.c: Remove unneeded i2c_device_id - ens210.c: Remove unneeded i2c_setclientdata() - ens210.c: Simply return 'dev_err_probe()' instead of raw error code - ens210.c: Fix dev_info print type - Link to v4: https://lore.kernel.org/r/20240719-ens21x-v4-0-6044e48a376a@xxxxxxxxxxxxxxxxxxxx --- changelog v3->v4: - rename ens21x.c -> ens210.c - rename sciosense,ens21x.yaml -> sciosense,ens210.yaml - General: Changed wildcard ens21x to ens210 to avoid wildcards - Kconfig: added crc7 as a dependency - Kconfig: remove extra blank lines - ens210.c: Moved constants to inline - ens210.c: Created ens210 chip info to handle chip specific conversion - ens210.c: Added documentation for mutex - ens210.c: Fixed sparse complaints from kernel bot - ens210.c: Changed htonl to cpu_to_be32 - ens210.c: Renamed dev_data -> ens210_data - ens210.c: changed of_match to i2c - ens210.c: Added return check for i2c write - ens210.c: Removed switch for conversion check, use chip_info instead - ens210.c: Removed unnecessary retry loop - ens210.c: Convert read to u8[3] type - ens210.c: Ensure 'correct' path is inline, use early returns to break for errors - ens210.c: Changed mutex to scoped_guard - ens210.c: Changed part id mismatch to dev_info from dev_err and removed return - ens210.c: Moved name from id->name to chip_info - ens210.c: Changed data field to be chip_info rather than enum - ens210.c: Formatting fixes (consistent spacing, extra line break at end removed) - Link to v3: https://lore.kernel.org/r/20240710-ens21x-v3-0-4e3fbcf2a7fb@xxxxxxxxxxxxxxxxxxxx --- changelog v2->v3: sciosense,ens21x.yaml: Update yaml to match dt_binding_check - Link to V1: https://lore.kernel.org/all/20240709-ens21x-v1-2-678521433cdd@xxxxxxxxxxxxxxxxxxxx/ - Link to v2: https://lore.kernel.org/r/20240710-ens21x-v2-0-a37c22018b0c@xxxxxxxxxxxxxxxxxxxx Many thanks for the feedback on the driver. --- changelog v1->v2: sciosense,ens21x.yaml: Add supply to documentation sciosense,ens21x.yaml: Add fallback to compatible strings ens21x.c: Move i2c_device_id next to of_device_id ens21x.c: Use i2c_of_match_device() instead of of_match_device() Many thanks for taking the time to review my patch. Thanks, Josh To: Jonathan Cameron <jic23@xxxxxxxxxx> To: Lars-Peter Clausen <lars@xxxxxxxxxx> To: Rob Herring <robh@xxxxxxxxxx> To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx> To: Conor Dooley <conor+dt@xxxxxxxxxx> To: Joshua Felmeden <jfelmeden@xxxxxxxxxxxxxxxxxxxx> Cc: linux-iio@xxxxxxxxxxxxxxx Cc: devicetree@xxxxxxxxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx --- --- Joshua Felmeden (2): dt-bindings: iio: humidity: add ENS210 sensor family iio: humidity: Add support for ENS210 .../bindings/iio/humidity/sciosense,ens210.yaml | 55 ++++ drivers/iio/humidity/Kconfig | 11 + drivers/iio/humidity/Makefile | 1 + drivers/iio/humidity/ens210.c | 338 +++++++++++++++++++++ 4 files changed, 405 insertions(+) --- base-commit: 1ebab783647a9e3bf357002d5c4ff060c8474a0a change-id: 20240709-ens21x-8f2530968f2e Best regards, -- Joshua Felmeden <jfelmeden@xxxxxxxxxxxxxxxxxxxx>