Re: [PATCH v3 2/3] iio: pressure: Add driver for Sensirion SDP500

Andy Shevchenko
2024-08-09T15:28:57Z

On Tue, Jul 02, 2024 at 04:59:09PM +0200, Petar Stoykov via B4 Relay wrote:
> From: Petar Stoykov <pd.pstoykov@gmail.com>
>
> Sensirion SDP500 is a digital differential pressure sensor. The sensor is
> accessed over I2C.

...

+ array_size.h
+ bits.h
+ dev_printk.h
+ errno.h

> +#include <linux/i2c.h>
> +#include <linux/crc8.h>
> +#include <linux/iio/iio.h>

+ mod_devicetable.h
+ module.h

> +#include <linux/regulator/consumer.h>

+ types.h

Keep them ordered, also you may split iio/ group out

> +#include <asm/unaligned.h>

linux/*
...blank line...
asm/*
...blank line...
iio/*

...

> +struct sdp500_data {
> + struct device *dev;
> +};

Why is this structure needed at all? You may put dev pointer directly, no?

--
With Best Regards,
Andy Shevchenko