Re: [PATCH 2/2] iio: pressure: add Honeywell ABP2 driver

From: Jonathan Cameron

Date: Sat Dec 06 2025 - 15:13:59 EST


> ...
>
> > +int abp2_common_probe(struct device *dev, const struct abp2_ops *ops, int irq)
> > +{
> > + int ret;
> > + struct abp2_data *data;
> > + struct iio_dev *indio_dev;
> > + const char *triplet;
> > + s64 tmp;
> > +
> > + indio_dev = devm_iio_device_alloc(dev, sizeof(*data));
> > + if (!indio_dev)
> > + return -ENOMEM;
> > +
> > + data = iio_priv(indio_dev);
> > + data->dev = dev;
> > + data->ops = ops;
> > + data->irq = irq;
> > +
> > + init_completion(&data->completion);
> > +
> > + indio_dev->name = "abp2030pa";
> > + indio_dev->info = &abp2_info;
> > + indio_dev->channels = abp2_channels;
> > + indio_dev->num_channels = ARRAY_SIZE(abp2_channels);
>
> > + indio_dev->modes = INDIO_DIRECT_MODE;
>
> Doesn't IIO core take care of this?
Not currently. We should revisit if we this ever actually proved
useful to set. It dates back to very early in IIO where I assumed
we would want to differential devices that only do buffered capture from
those that can do that and single shot. I'm not sure we actually have
any in that category though :(

So maybe we can justify dropping this across all drivers at somepoint
or as you say just set it as a default value.

Jonathan