[PATCH V4 0/2] Add support for aw9610x proximity sensor
From: wangshuaijie
Date: Thu Jul 25 2024 - 08:13:50 EST
From: shuaijie wang <wangshuaijie@xxxxxxxxxx>
Add drivers that support Awinic aw9610x proximity sensors.
The aw9610x series are high-sensitivity capacitive proximity detection
sensors. This device detects human proximity and assists electronic devices
in reducing specific absorption rate (SAR) to pass SAR related certifications.
The device reduces RF power and reduces harm when detecting human proximity.
Increase power and improve signal quality when the human body is far away.
The specific absorption rate (SAR) is a metric that measures the degree of
absorption of electromagnetic radiation emitted by wireless devices,
such as mobile phones and tablets, by human tissue.
This patch implements device initialization, registration,
I/O operation handling and interrupt handling, and passed basic testing.
v1->v2:
-------
- Remove unnecessary log printing.
- Optimize comment style.
- Issues with modifying the device tree.
- Optimize code style.
v2->v3:
-------
- Add a description about the hardware device.
- Remove inappropriate configuration items.
- Modify the formatting issues.
- Modify the structure of the driver.
- Change the style of the driver's comments.
- Remove unnecessary log printing.
- Modify the function used for memory allocation.
- Modify the driver registration process.
- Remove the functionality related to updating firmware.
- Change the input subsystem in the driver to the iio subsystem.
- Modify the usage of the interrupt pin.
v3->v4:
-------
The changes in this patch version are quite significant, and I concur
with Krzysztof's viewpoint that this driver is indeed overly complex for
the proximity sensor. Therefore, I have removed the compatibility for the
aw963xx series, and the driver will now exclusively support the aw9610x series.
- Modify the software architecture to remove compatibility for
the aw963xx series.
- Optimize the parsing of register configuration files (.bin).
- Remove unnecessary log printing.
- Delete redefinition of true and false.
- Remove unnecessary interfaces.
- Optimize regulator usage.
- Convert the I2C communication interface to regmap.
shuaijie wang (2):
dt-bindings: iio: aw9610x: Add bindings for aw9610x sensor
iio: proximity: aw9610x: Add support for aw9610x proximity sensor
.../iio/proximity/awinic,aw9610x.yaml | 61 ++
drivers/iio/proximity/Kconfig | 11 +
drivers/iio/proximity/Makefile | 1 +
drivers/iio/proximity/aw9610x.c | 791 ++++++++++++++++++
drivers/iio/proximity/aw9610x.h | 140 ++++
5 files changed, 1004 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/proximity/awinic,aw9610x.yaml
create mode 100644 drivers/iio/proximity/aw9610x.c
create mode 100644 drivers/iio/proximity/aw9610x.h
base-commit: c33ffdb70cc6df4105160f991288e7d2567d7ffa
--
2.45.1