* [PATCH] staging:iio:ad7606: update structs with doc annotations
@ 2018-09-13 11:07 Alexandru Ardelean
2018-09-16 11:24 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Alexandru Ardelean @ 2018-09-13 11:07 UTC (permalink / raw)
To: linux-iio, Michael.Hennerich, lars, jic23
Cc: knaack.h, pmeerw, Alexandru Ardelean
The current structs are only partially documented via annotations. This
change updates annotations for all structs in the ad7606.h file.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
drivers/staging/iio/adc/ad7606.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/staging/iio/adc/ad7606.h b/drivers/staging/iio/adc/ad7606.h
index 4983e3aa6b0e..f422296354c9 100644
--- a/drivers/staging/iio/adc/ad7606.h
+++ b/drivers/staging/iio/adc/ad7606.h
@@ -24,7 +24,26 @@ struct ad7606_chip_info {
/**
* struct ad7606_state - driver instance specific data
+ * @dev pointer to kernel device
+ * @chip_info entry in the table of chips that describes this device
+ * @reg regulator info for the the power supply of the device
+ * @poll_work struct info for reading data in buffer mode
+ * @wq_data_avail wait queue struct for buffer mode
+ * @bops bus operations (SPI or parallel)
+ * @range voltage range selection, selects which scale to apply
+ * @oversampling oversampling selection
+ * @done marks whether reading data is done
+ * @base_address address from where to read data in parallel operation
* @lock protect sensor state
+ * @gpio_convst GPIO descriptor for conversion start signal (CONVST)
+ * @gpio_reset GPIO descriptor for device hard-reset
+ * @gpio_range GPIO descriptor for range selection
+ * @gpio_standby GPIO descriptor for stand-by signal (STBY),
+ * controls power-down mode of device
+ * @gpio_frstdata GPIO descriptor for reading from device when data
+ * is being read on the first channel
+ * @gpio_os GPIO descriptors to control oversampling on the device
+ * @data buffer for reading data from the device
*/
struct ad7606_state {
@@ -55,6 +74,10 @@ struct ad7606_state {
unsigned short data[12] ____cacheline_aligned;
};
+/**
+ * struct ad7606_bus_ops - driver bus operations
+ * @read_block function pointer for reading blocks of data
+ */
struct ad7606_bus_ops {
/* more methods added in future? */
int (*read_block)(struct device *dev, int num, void *data);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging:iio:ad7606: update structs with doc annotations
2018-09-13 11:07 [PATCH] staging:iio:ad7606: update structs with doc annotations Alexandru Ardelean
@ 2018-09-16 11:24 ` Jonathan Cameron
2018-09-17 7:10 ` Ardelean, Alexandru
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2018-09-16 11:24 UTC (permalink / raw)
To: Alexandru Ardelean; +Cc: linux-iio, Michael.Hennerich, lars, knaack.h, pmeerw
On Thu, 13 Sep 2018 14:07:36 +0300
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> The current structs are only partially documented via annotations. This
> change updates annotations for all structs in the ad7606.h file.
>=20
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Good stuff, though a few questions inline.
I'm hoping this means you are planning to finish tidying this driver
up and move it out of staging?=20
Thanks,
Jonathan
> ---
> drivers/staging/iio/adc/ad7606.h | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>=20
> diff --git a/drivers/staging/iio/adc/ad7606.h b/drivers/staging/iio/adc/a=
d7606.h
> index 4983e3aa6b0e..f422296354c9 100644
> --- a/drivers/staging/iio/adc/ad7606.h
> +++ b/drivers/staging/iio/adc/ad7606.h
> @@ -24,7 +24,26 @@ struct ad7606_chip_info {
> =20
> /**
> * struct ad7606_state - driver instance specific data
> + * @dev pointer to kernel device
> + * @chip_info entry in the table of chips that describes this device
> + * @reg regulator info for the the power supply of the device
> + * @poll_work struct info for reading data in buffer mode
I'm not quite sure on the intended meaning of this one above...
> + * @wq_data_avail wait queue struct for buffer mode
> + * @bops bus operations (SPI or parallel)
> + * @range voltage range selection, selects which scale to apply
> + * @oversampling oversampling selection
> + * @done marks whether reading data is done
> + * @base_address address from where to read data in parallel operation
> * @lock protect sensor state
=46rom what? Concurrent changes I guess, but would be good to be clear.
> + * @gpio_convst GPIO descriptor for conversion start signal (CONVST)
> + * @gpio_reset GPIO descriptor for device hard-reset
> + * @gpio_range GPIO descriptor for range selection
> + * @gpio_standby GPIO descriptor for stand-by signal (STBY),
> + * controls power-down mode of device
> + * @gpio_frstdata GPIO descriptor for reading from device when data
> + * is being read on the first channel
> + * @gpio_os GPIO descriptors to control oversampling on the device
> + * @data buffer for reading data from the device
> */
> =20
> struct ad7606_state {
> @@ -55,6 +74,10 @@ struct ad7606_state {
> unsigned short data[12] ____cacheline_aligned;
> };
> =20
> +/**
> + * struct ad7606_bus_ops - driver bus operations
> + * @read_block function pointer for reading blocks of data
> + */
> struct ad7606_bus_ops {
> /* more methods added in future? */
> int (*read_block)(struct device *dev, int num, void *data);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging:iio:ad7606: update structs with doc annotations
2018-09-16 11:24 ` Jonathan Cameron
@ 2018-09-17 7:10 ` Ardelean, Alexandru
2018-09-17 8:28 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Ardelean, Alexandru @ 2018-09-17 7:10 UTC (permalink / raw)
To: jic23@kernel.org
Cc: lars@metafoo.de, knaack.h@gmx.de, linux-iio@vger.kernel.org,
Hennerich, Michael, pmeerw@pmeerw.net
T24gU3VuLCAyMDE4LTA5LTE2IGF0IDEyOjI0ICswMTAwLCBKb25hdGhhbiBDYW1lcm9uIHdyb3Rl
Og0KPiBPbiBUaHUsIDEzIFNlcCAyMDE4IDE0OjA3OjM2ICswMzAwDQo+IEFsZXhhbmRydSBBcmRl
bGVhbiA8YWxleGFuZHJ1LmFyZGVsZWFuQGFuYWxvZy5jb20+IHdyb3RlOg0KPiANCj4gPiBUaGUg
Y3VycmVudCBzdHJ1Y3RzIGFyZSBvbmx5IHBhcnRpYWxseSBkb2N1bWVudGVkIHZpYSBhbm5vdGF0
aW9ucy4gVGhpcw0KPiA+IGNoYW5nZSB1cGRhdGVzIGFubm90YXRpb25zIGZvciBhbGwgc3RydWN0
cyBpbiB0aGUgYWQ3Nj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nVjdCBhZDc2MDZfc3Rh
dGUgew0KPiA+IEBAIC01NSw2ICs3NCwxMCBAQCBzdHJ1Y3QgYWQ3NjA2X3N0YXRlIHsNCj4gPiAg
CXVuc2lnbmVkIHNob3J0CQkJZGF0YVsxMl0NCj4gPiBfX19fY2FjaGVsaW5lX2FsaWduZWQ7DQo+
ID4gIH07DQo+ID4gIA0KPiA+ICsvKioNCj4gPiArICogc3RydWN0IGFkNzYwNl9idXNfb3BzIC0g
ZHJpdmVyIGJ1cyBvcGVyYXRpb25zDQo+ID4gKyAqIEByZWFkX2Jsb2NrCQlmdW5jdGlvbiBwb2lu
dGVyIGZvciByZWFkaW5nIGJsb2NrcyBvZg0KPiA+IGRhdGENCj4gPiArICovDQo+ID4gIHN0cnVj
dCBhZDc2MDZfYnVzX29wcyB7DQo+ID4gIAkvKiBtb3JlIG1ldGhvZHMgYWRkZWQgaW4gZnV0dXJl
PyAqLw0KPiA+ICAJaW50ICgqcmVhZF9ibG9jaykoc3RydWN0IGRldmljZSAqZGV2LCBpbnQgbnVt
LCB2b2lkICpkYXRhKTsNCj4gDQo+IA==
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging:iio:ad7606: update structs with doc annotations
2018-09-17 7:10 ` Ardelean, Alexandru
@ 2018-09-17 8:28 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2018-09-17 8:28 UTC (permalink / raw)
To: Ardelean, Alexandru
Cc: jic23@kernel.org, lars@metafoo.de, knaack.h@gmx.de,
linux-iio@vger.kernel.org, Hennerich, Michael, pmeerw@pmeerw.net
On Mon, 17 Sep 2018 07:10:44 +0000
"Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:
> On Sun, 2018-09-16 at 12:24 +0100, Jonathan Cameron wrote:
> > On Thu, 13 Sep 2018 14:07:36 +0300
> > Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> >
> > > The current structs are only partially documented via annotations. This
> > > change updates annotations for all structs in the ad7606.h file.
> > >
> > > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> >
> > Good stuff, though a few questions inline.
> >
> > I'm hoping this means you are planning to finish tidying this driver
> > up and move it out of staging?
>
> Replies inline.
>
>
> So, I don't have a good track-record of saying yes to this question and
> sticking to it, because I also have the AD7192 [in my pipeline] to move out
> of staging [and it's only partially done].
>
> But, specifically for this driver, we want to add a new chip to this [after
> the AD7605-4], so there is an interest from our side to actually see this
> through.
>
> And also, we did manage to rebase quite a lot of our patches on top of a
> 4.14 base [ which should hopefully make things more easier to track
> internally vs upstream ].
> I do hope to send-out a bigger set of these patches upstream.
> And I'll try to separate patches as much as possible, because it's simpler
> to resend V2,V3,...,VN for smaller sets of patches.
>
> So, this is not a definite-yes to your question; it's more of an indicative
> of what we're trying to do.
Cool. Thanks for the info and don't worry about it taking a while. I'm definitely
keen that new device support in staging drivers should at least be tangentially
connected to getting them out of staging as clearly there is active interest in
them.
I have drivers in my queue that have been there for a large number of years :(
One day I'll get to them all!
Jonathan
>
> Thanks
> Alex
>
> >
> > Thanks,
> >
> > Jonathan
> >
> > > ---
> > > drivers/staging/iio/adc/ad7606.h | 23 +++++++++++++++++++++++
> > > 1 file changed, 23 insertions(+)
> > >
> > > diff --git a/drivers/staging/iio/adc/ad7606.h
> > > b/drivers/staging/iio/adc/ad7606.h
> > > index 4983e3aa6b0e..f422296354c9 100644
> > > --- a/drivers/staging/iio/adc/ad7606.h
> > > +++ b/drivers/staging/iio/adc/ad7606.h
> > > @@ -24,7 +24,26 @@ struct ad7606_chip_info {
> > >
> > > /**
> > > * struct ad7606_state - driver instance specific data
> > > + * @dev pointer to kernel device
> > > + * @chip_info entry in the table of chips that
> > > describes this device
> > > + * @reg regulator info for the the power supply of the
> > > device
> > > + * @poll_work struct info for reading data in buffer
> > > mode
> >
> > I'm not quite sure on the intended meaning of this one above...
> Ack.
> Will try to make it clearer.
>
> >
> > > + * @wq_data_avail wait queue struct for buffer mode
> > > + * @bops bus operations (SPI or parallel)
> > > + * @range voltage range selection, selects which scale
> > > to apply
> > > + * @oversampling oversampling selection
> > > + * @done marks whether reading data is done
> > > + * @base_address address from where to read data in parallel
> > > operation
> > > * @lock protect sensor state
> >
> > From what? Concurrent changes I guess, but would be good to be clear.
>
> Ack.
> Will update.
>
> >
> > > + * @gpio_convst GPIO descriptor for conversion start signal
> > > (CONVST)
> > > + * @gpio_reset GPIO descriptor for device hard-reset
> > > + * @gpio_range GPIO descriptor for range selection
> > > + * @gpio_standby GPIO descriptor for stand-by signal (STBY),
> > > + * controls power-down mode of device
> > > + * @gpio_frstdata GPIO descriptor for reading from device when
> > > data
> > > + * is being read on the first channel
> > > + * @gpio_os GPIO descriptors to control oversampling on
> > > the device
> > > + * @data buffer for reading data from the device
> > > */
> > >
> > > struct ad7606_state {
> > > @@ -55,6 +74,10 @@ struct ad7606_state {
> > > unsigned short data[12]
> > > ____cacheline_aligned;
> > > };
> > >
> > > +/**
> > > + * struct ad7606_bus_ops - driver bus operations
> > > + * @read_block function pointer for reading blocks of
> > > data
> > > + */
> > > struct ad7606_bus_ops {
> > > /* more methods added in future? */
> > > int (*read_block)(struct device *dev, int num, void *data);
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-17 13:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13 11:07 [PATCH] staging:iio:ad7606: update structs with doc annotations Alexandru Ardelean
2018-09-16 11:24 ` Jonathan Cameron
2018-09-17 7:10 ` Ardelean, Alexandru
2018-09-17 8:28 ` Jonathan Cameron
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).