All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Leed Aguilar <leed.aguilar@ti.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] staging:iio:magnetometer:ak8975: fix the sensor enable logic
Date: Thu, 31 May 2012 10:40:01 +0100	[thread overview]
Message-ID: <4FC73C71.9000006@cam.ac.uk> (raw)
In-Reply-To: <4FC735DF.4050507@nvidia.com>

On 5/31/2012 10:11 AM, Laxman Dewangan wrote:
> On Thursday 31 May 2012 12:58 PM, Jonathan Cameron wrote:
>> Also cc'd Laxman for comments.
>>> Allow the magn sensor raw attributes to be available only
>>> when enable is true.
>>>
>>> The single measurement mode change to power-down mode
>>> automatically once the sensor data is measured, so there
>>> is no need to enable this mode to allow the data reading
>>> process (ak8975_read_axis) to begin, which internally is
>>> setting the single measurement mode to take a sample.
>> Hmm. I'm not terribly keen on this as it's just changed from one non
>> abi compliant attribute to a different one.
>>
>> We need to take another look at how to handle low power modes etc.
>> We could add some heuristics in driver on when to disable the device,
>> but that is obviously not that flexible.
>>
>> Otherwise I'd much prefer a kernel wide view on manual disables
>> of indivual devices to adhoc bits of code liek this...
>>
>> The underlying change to do with not explicitly setting power down
>> modes is fine, but I'd like Laxman's comment on this as I don't have
>> one.
>
> The measurement is done in ONCE mode and once conversion completes the
> device automatically goes into the power down mode. Hence we need not to
> set the power-down mode explictly.
> However, do we really require this "enable" sysfs? I think we can get
> rid of this sysfs as it just does the flag setting now and so we really
> dont need as per lots of improvement done in staging driver recently.
>
> I will go with getting rid of this sysfs (enable or old name " mode").
>
Now that's a solution I like!

Thanks, Laxman. Leed, does this work for you?

  reply	other threads:[~2012-05-31  9:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31  4:10 [PATCH] staging:iio:magnetometer:ak8975: fix the sensor enable logic Leed Aguilar
2012-05-31  7:28 ` Jonathan Cameron
2012-05-31  9:11   ` Laxman Dewangan
2012-05-31  9:40     ` Jonathan Cameron [this message]
2012-05-31 13:51       ` Aguilar, Leed

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=4FC73C71.9000006@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=leed.aguilar@ti.com \
    --cc=linux-iio@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.