linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] iio: light: Support AMS AS73211 digital XYZ sensor
@ 2020-08-02 16:37 Christian Eggers
  2020-08-02 16:37 ` [PATCH v5 1/2] dt-bindings: iio: light: add AMS AS73211 support Christian Eggers
  2020-08-02 16:37 ` [PATCH v5 2/2] iio: light: as73211: New driver Christian Eggers
  0 siblings, 2 replies; 7+ messages in thread
From: Christian Eggers @ 2020-08-02 16:37 UTC (permalink / raw)
  To: Rob Herring, Andy Shevchenko, Jonathan Cameron, Jonathan Cameron
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	linux-iio, devicetree, linux-kernel, Christian Eggers

This series adds support for the AMS AS73211 digital XYZ sensor. Some
comments to the review emails below...

Again, many thanks for the comprehensive reviews.

Changes in v5:
---------------
- [1/2] Reviewed by Rob Herring
- [2/2] Added KHZ_PER_HR define
- [2/2] Added AS73211_SAMPLE_FREQ_BASE define
- [2/2] Slight changes in comments
- [2/2] Claim direct mode in write_raw()
- [2/2] Saturate only in case of overflow
- [2/2] Don't set indio_dev->dev.parent
- [2/2] Fix error path (order) in probe()

Changes in v4:
---------------
- Integrated 2nd review from Andy Shevchenko
- Use more devm_ functions in as73211_probe()

Changes in v3:
---------------
- Integrated comments from Andy Shevchenko
- Integrated comments from Jonathan Cameron

Changes in v2:
---------------
- Fix $id in dt binding
- Document full I2C address range in "reg" property
- Move "buffer" member out of "struct as73211_data"
- Fix sparse warnings by using correct data types


On Friday, 31 July 2020, 17:41:47 CEST, Andy Shevchenko wrote:
> On Fri, Jul 31, 2020 at 1:52 PM Christian Eggers <ceggers@arri.de> wrote:
> > devm_iio_device_alloc() doesn't pass 'dev' to iio_device_alloc().
> > I already looked around, but I didn't find. And after debugging
> > v5.4, devm_iio_device_alloc() definitely doesn't do it.
> 
> Why are you talking about v5.4? We are in v5.8 cycle contributing to v5.9.
v5.4-rt is the version for my product release. Current base for these
patches is 5.8-rc6


On Friday, 31 July 2020, 18:19:55 CEST, Jonathan Cameron wrote:
> > On Fri, Jul 31, 2020 at 1:52 PM Christian Eggers <ceggers@arri.de> wrote:
> > Recently IIO gained some features among which I think the one that
> > assigns parent devices.
> 
> yup. This should be in linux-next now for the coming merge window (which
> probably opens on Sunday).
Thanks for the hint. Is there a particular tree which is preferred for
IIO development?


On Saturday, 1 August 2020, 17:29:58 CEST, Jonathan Cameron wrote:
> On Fri, 31 Jul 2020 09:01:14 +0200 Christian Eggers <ceggers@arri.de> wrote:
> > +static int as73211_write_raw(struct iio_dev *indio_dev, struct
> > iio_chan_spec const *chan, +			      int val, int val2, long mask)
> > +{
> > +	...
> > +	/* Need to switch to config mode ... */
> 
> Is this safe whilst we are doing a capture?
> You may want to claim_direct_mode for write_raw to ensure we don't get such
> a race.
> 
That's an important point! As I use iio-trig-sysfs, I never had any
problems with this. But if for instance iio-trig-hrtimer is active, this
could become a problem.

In v5, I have claimed direct mode. For the application this means, that
buffer/enable has to be set to '0' before any settings can be
changed. As libiio doesn't support enabling/disabling a buffer directly,
the buffer needs to be destroyed and newly constructed.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-04  8:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-02 16:37 [PATCH v5 0/2] iio: light: Support AMS AS73211 digital XYZ sensor Christian Eggers
2020-08-02 16:37 ` [PATCH v5 1/2] dt-bindings: iio: light: add AMS AS73211 support Christian Eggers
2020-08-02 16:37 ` [PATCH v5 2/2] iio: light: as73211: New driver Christian Eggers
2020-08-02 18:02   ` Andy Shevchenko
2020-08-04  7:40     ` Christian Eggers
2020-08-04  8:28       ` Andy Shevchenko
2020-08-04  8:34       ` Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).