Re: [PATCH v1 2/2] iio: proximity: add Imagis ISG5320A SAR sensor driver
From: Andy Shevchenko
Date: Mon Nov 16 2026 - 05:53:42 EST
On Mon, Nov 16, 2026 at 10:40:13AM +0300, Adil Hüsrev Tepe wrote:
> Add an IIO driver for the Imagis ISG5320A capacitive SAR/grip sensor
> (I2C), as fitted on the Samsung Galaxy XCover5. It exposes one
> IIO_PROXIMITY channel (the B-channel signal minus its baseline) and a
> rising/falling threshold proximity event.
>
> The driver was derived from the Samsung vendor driver during XCover5
> mainline bring-up with the help of an AI coding assistant (Claude Code,
> Anthropic), which drafted the mainline IIO driver; I reviewed every line
> and tested it on hardware.
...
> +config ISG5320A
> + tristate "Imagis ISG5320A SAR proximity sensor"
Make sure this, top level comment and MODULE_DESCRIPTION() have the same or
quite similar text.
> + depends on I2C
> + select REGMAP_I2C
> + help
> + Say Y here to build a driver for the Imagis ISG5320A capacitive
> + SAR/grip proximity sensor.
> +
> + To compile this driver as a module, choose M here: the module will
> + be called isg5320a.
...
> +#include <linux/bits.h>
> +#include <linux/delay.h>
> +#include <linux/device.h>
> +#include <linux/gpio/consumer.h>
> +#include <linux/i2c.h>
> +#include <linux/interrupt.h>
> +#include <linux/irq.h>
> +#include <linux/kernel.h>
Definitely no.
Also, please follow IWYU principle.
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/pm.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/pm_wakeup.h>
> +#include <linux/property.h>
> +#include <linux/regmap.h>
> +#include <linux/regulator/consumer.h>
...
Also, take in use *ACQUIRE*() macros, in particular for runtime PM where it
makes sense.
...
I stopped here. You can now go via mailing list archive (linux-iio@) and check
what are the usual comments against new drier. You have many small things to
improve, I believe.
--
With Best Regards,
Andy Shevchenko