From: Denis CIOCCA <denis.ciocca@st.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@kernel.org>,
Denis Ciocca <denis.ciocca@gmail.com>,
Jonathan Cameron <jic23@jic23.retrosnub.co.uk>,
Pavel Machek <pavel@denx.de>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"burman.yan@gmail.com" <burman.yan@gmail.com>
Subject: Re: STMicroelectronics accelerometers driver.
Date: Mon, 29 Oct 2012 11:24:56 +0100 [thread overview]
Message-ID: <508E5978.5000907@st.com> (raw)
In-Reply-To: <508E48D1.3000703@metafoo.de>
> There is no attachment attached to this mail.
my was a question. You prefer I attach all source code or the last modified?
>> I don't find IIO_G_TO_M_S_2 in the framework code, but I added this
>> macro in my source code. It is exatly?
>
> It's in the latest IIO tree and also in staging/staging-next. The definition is
>
> +#define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) \
> / 18000000ULL)
Sorry but I'm lost. The relation from IIO_DEGREE_TO_RAD and IIO_G_TO_M_S_2?
>>> I don't think you need the fullscale attribute. This is just the same as the
>>> scale attribute just in a different representation, as far as I can see.
>>>
>> I think this is more useful to user because if you want change the
>> fullscale you can see immediately the current fullscale without apply
>> conversion manually.
>>
>
> I understand your reasoning and I also think that changing the scale factor
> by entering the floating point lsb resolution is rather tedious and don't
> like this. On the other hand having two attributes for the same information
> and more importantly doing things different from every other driver in the
> IIO framework is kind of a no-go. So we have two possible solutions, both
> are far from optimal, but in my opinion the first one is the lesser of the
> two evils.
>
> And hopefully the user or end-user will not have to manually navigate sysfs
> but will rather use some nice abstraction which hides these details.
I check other drivers for that and then do cross-check with you.
>>> I still don't get why you need this. Can't you just power-up and down the
>>> device on demand?
>> The boot time is too different from one sensor to another, this
>> introduce much delay in the single read.
>
> Ok, fair enough. But what power-up times are we talking about exactly. In
> the order of ms or more in the order of up to seconds?
The power-up time depends by ODR and by device. For example in some
devices, you can lose the first 3-4 samples before it is ready, for most
application this is too big.
> Secondly we have similar attributes for other drivers, primarily DACs. But
> the attribute is called 'powerdown' instead of 'enable'. For consistency
> within the IIO framework it would be good if you could use that name (and
> its semantics) as well.
Ok this is not a problem.
>>> I still don't get why this has to be a pointer...
>> I don't understand if your point is use a pointer or use a variable or
>> it is not necessary.
>>
>
> A plain integer should be enough. But you could also get rid of it
> completely since it is only used in the probe and remove callbacks, by
> adding a parameter to these functions and pass client->irq from the I2C and
> SPI probe and remove functions
Ok the second one is very good solution.
next prev parent reply other threads:[~2012-10-29 10:25 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 15:39 STMicroelectronics accelerometers driver Denis CIOCCA
2012-10-08 19:14 ` Lars-Peter Clausen
2012-10-08 19:50 ` Pavel Machek
2012-10-08 20:33 ` Lars-Peter Clausen
2012-10-08 20:37 ` Jonathan Cameron
2012-10-14 15:05 ` Denis Ciocca
2012-10-14 19:08 ` Lars-Peter Clausen
2012-10-16 17:51 ` Lars-Peter Clausen
2012-10-22 9:31 ` Denis CIOCCA
2012-10-22 18:07 ` Jonathan Cameron
2012-10-22 19:37 ` Denis Ciocca
2012-10-24 12:44 ` Denis CIOCCA
2012-10-26 12:10 ` Lars-Peter Clausen
2012-10-29 8:55 ` Denis CIOCCA
2012-10-29 9:13 ` Lars-Peter Clausen
2012-10-29 10:24 ` Denis CIOCCA [this message]
2012-10-29 10:30 ` Lars-Peter Clausen
2012-10-29 10:38 ` Denis CIOCCA
2012-10-31 14:27 ` Denis CIOCCA
2012-10-31 16:40 ` Lars-Peter Clausen
2012-10-31 20:33 ` Jonathan Cameron
2012-11-04 10:09 ` Denis Ciocca
2012-11-05 21:28 ` Jonathan Cameron
2012-11-06 11:11 ` Denis CIOCCA
2012-11-12 17:10 ` Denis CIOCCA
2012-11-12 18:48 ` Jonathan Cameron
2012-11-13 15:38 ` Denis CIOCCA
2012-11-18 13:20 ` Jonathan Cameron
2012-11-23 16:10 ` Denis CIOCCA
2012-11-24 16:23 ` Jonathan Cameron
2012-11-26 16:57 ` Denis CIOCCA
2012-11-27 11:52 ` Denis CIOCCA
2012-11-29 9:46 ` Lars-Peter Clausen
2012-11-27 15:36 ` STMicroelectronics gyroscopes driver Denis CIOCCA
2012-11-29 9:51 ` Lars-Peter Clausen
2012-11-30 9:13 ` Denis CIOCCA
2012-11-30 10:36 ` Lars-Peter Clausen
2012-11-30 13:06 ` Jonathan Cameron
2012-12-03 16:40 ` STMicroelectronics driver Denis CIOCCA
2012-12-03 19:01 ` Lars-Peter Clausen
2012-11-19 13:00 ` STMicroelectronics accelerometers driver Lars-Peter Clausen
2012-11-06 11:14 ` Denis CIOCCA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=508E5978.5000907@st.com \
--to=denis.ciocca@st.com \
--cc=burman.yan@gmail.com \
--cc=denis.ciocca@gmail.com \
--cc=jic23@jic23.retrosnub.co.uk \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pavel@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).