From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4FC735DF.4050507@nvidia.com> Date: Thu, 31 May 2012 14:41:59 +0530 From: Laxman Dewangan MIME-Version: 1.0 To: Jonathan Cameron CC: Leed Aguilar , "linux-iio@vger.kernel.org" Subject: Re: [PATCH] staging:iio:magnetometer:ak8975: fix the sensor enable logic References: <1338437446-12829-1-git-send-email-leed.aguilar@ti.com> <4FC71DAC.3080802@kernel.org> In-Reply-To: <4FC71DAC.3080802@kernel.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed List-ID: 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"). ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------