Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393329
| From | Daniel Baluta <daniel.baluta@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC |
| Date | 2016-05-03 13:00 +0200 |
| Message-ID | <ruGdA-6GP-15@gated-at.bofh.it> (permalink) |
| References | <rtfyN-5Os-1@gated-at.bofh.it> <ru76b-86o-33@gated-at.bofh.it> <ruCWm-3Cj-13@gated-at.bofh.it> <ruG3U-6AZ-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 3, 2016 at 1:43 PM, Jonathan Cameron
<jic23@jic23.retrosnub.co.uk> wrote:
>
>
> On 3 May 2016 09:29:26 CEST, Daniel Baluta <daniel.baluta@intel.com> wrote:
>>On Sun, May 1, 2016 at 9:56 PM, Jonathan Cameron <jic23@kernel.org>
>>wrote:
>>> On 29/04/16 13:19, Constantin Musca wrote:
>>>> Minimal implementation of an IIO driver for the Freescale
>>>> MMA7660FC 3-axis accelerometer. Datasheet:
>>>>
>>http://www.freescale.com.cn/files/sensors/doc/data_sheet/MMA7660FC.pdf
>>>>
>>>> Includes:
>>>> - ACPI support;
>>>> - read_raw for x,y,z axes;
>>>> - reading and setting the scale (range) parameter.
>>>> - power management
>>>>
>>>> Signed-off-by: Constantin Musca <constantin.musca@intel.com>
>>> Couple of trivial bits inline as well as that request to update the
>>link above
>>> if possible...
>>>
>>> Why the retries? (I'm on a train without internet access for quite a
>>few
>>> hours yet hence I can't dig into the datasheet!)
>>
>>I suggested the retries because it's quite unsafe to infinitely loop
>>in the kernel
>>on a hardware condition. We can lockup the kernel if there is some sort
>>of
>>hardware problem.
> Agreed but why try more than once? Needs a comment...
>>
>>
>>>
>>> Anyhow, even if it's obvious from the datasheet, that sort of 'magic'
>>needs
>>> an explanation comment...
Agree we need a comment on that. As for the number of retries I can see
drivers doing from 5 to 100 (re)tries:
humidity/si7005.c
44: int tries = 50;
55: while (tries-- > 0) {
temperature/tmp006.c
55: int tries = 50;
57: while (tries-- > 0) {
dac/mcp4725.c
76: int tries = 20;
99: while (tries--) {
111: if (tries < 0) {
pressure/mpl3115.c
49: int ret, tries = 15;
57: while (tries-- > 0) {
ight/ltr501.c
329: int tries = 100;
332: while (tries--) {
proximity/pulsedlight-lidar-lite-v2.c
160: int tries = 10;
accel/mma9551_core.c
75:#define MMA9551_I2C_READ_RETRIES 5
Daniel.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3] iio: accel: Add support for Freescale MMA7660FC Constantin Musca <constantin.musca@intel.com> - 2016-04-29 14:20 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Martin Kepplinger <martink@posteo.de> - 2016-04-29 15:10 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Constantin Musca <constantin.musca@intel.com> - 2016-04-29 15:40 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:30 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:40 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:30 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Daniel Baluta <daniel.baluta@intel.com> - 2016-05-03 09:30 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Jonathan Cameron <jic23@jic23.retrosnub.co.uk> - 2016-05-03 12:50 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Daniel Baluta <daniel.baluta@intel.com> - 2016-05-03 13:00 +0200
Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:40 +0200
csiph-web