Messages in this thread | | | From | Patrick Havelange <> | Date | Mon, 4 Mar 2019 13:36:34 +0100 | Subject | Re: [PATCH 5/8] iio/counter: add FlexTimer Module Quadrature decoder counter driver |
| |
On Wed, Feb 20, 2019 at 5:42 PM Jonathan Cameron <jic23@kernel.org> wrote: [skipped] > > + > > +struct ftm_quaddec { > > + struct platform_device *pdev; > > + void __iomem *ftm_base; > > + bool big_endian; > > I'm curious. What is the benefit of running in big endian mode?
It is based on the same behaviour as in drivers/clocksource/timer-fsl-ftm.c The FlexTimer itself on the board I'm testing it with is working in big endian mode, so this mode is required.
> > +static ssize_t ftm_write_reset(struct iio_dev *indio_dev, > > + uintptr_t private, > > + struct iio_chan_spec const *chan, > > + const char *buf, size_t len) > > +{ > > + struct ftm_quaddec *ftm = iio_priv(indio_dev); > > + > > + /* Only "counter reset" is supported for now */ > > + if (!sysfs_streq(buf, "0")) { > > + dev_warn(&ftm->pdev->dev, "Reset only accepts '0'\n"); > > + return -EINVAL; > > Why not just make the channel attribute itself writeable given we are > setting it to 0?
Good idea, I'll see if this can be applied in the new subsystem.
[skipped]
All other comments are Acked.
| |