lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEnQRZARAOvNo6Yac5a0oJj8ARHE8_93=JNJp6YwZokjo2byZw@mail.gmail.com>
Date:	Fri, 5 Feb 2016 11:58:02 +0200
From:	Daniel Baluta <daniel.baluta@...el.com>
To:	Lars-Peter Clausen <lars@...afoo.de>
Cc:	Cristina Moraru <cristina.moraru09@...il.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Peter Meerwald-Stadler <pmeerw@...erw.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Cristina Georgiana Opriceana <cristina.opriceana@...il.com>,
	marek@...delico.com, sdliyong@...il.com,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	driverdev <devel@...verdev.osuosl.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"octavian.purdila@...el.com" <octavian.purdila@...el.com>,
	Daniel Baluta <daniel.baluta@...el.com>, shubhrajyoti@...com
Subject: Re: [RFC PATCH 1/2] iio: hmc5843 Add channel attribute for bias configuration

On Thu, Feb 4, 2016 at 7:45 PM, Lars-Peter Clausen <lars@...afoo.de> wrote:
> On 02/04/2016 03:50 PM, Cristina Moraru wrote:
>> Replace non standard meas_conf attribute with the standard IIO
>> calibbias attribute.
>>
>> API for setting bias measurement configuration:
>>
>> 0 - Normal measurement configuration (default): In normal measurement
>>     configuration the device follows normal measurement flow. Pins BP
>>     and BN are left floating and high impedance.
>>
>> 1 - Positive bias configuration: In positive bias configuration, a
>>     positive current is forced across the resistive load on pins BP
>>     and BN.
>>
>> 2 - Negative bias configuration. In negative bias configuration, a
>>     negative current is forced across the resistive load on pins BP
>>     and BN.
>>
>> 3 - Only available on HMC5983. Magnetic sensor is disabled.
>>     Temperature sensor is enabled.
>>
>> With this in place, we can think of moving this driver out of staging.
>
> Using a standard attribute, but overloading it with custom semantics doesn't
> do any good either. calibbias is supposed to be a integer that gets added to
> measurements internally in the device (unit is device specific though).
>
> This attribute seems to do something else. In that case it might be better
> to stay with a custom attribute (as long as it is documented) or come up
> with a better way to map the device configuration onto standard attributes.

We missed the RFC tag. So, with this in mind we still have some minor
issues to fix and then we can move the code out of staging.

1) checkpatch.pl -- strict warnings
2) suspend/resume functions in hmc5843_core.c.

int hmc5843_common_suspend(struct device *dev)
{
        return hmc5843_set_mode(iio_priv(dev_get_drvdata(dev)),
                        HMC5843_MODE_CONVERSION_CONTINUOUS);
}

int hmc5843_common_resume(struct device *dev)
{
        return hmc5843_set_mode(iio_priv(dev_get_drvdata(dev)),
                                HMC5843_MODE_SLEEP);
}

I think the function names or implementations were swapped.
The device should go to sleep at suspend and back to continuous
mode on resume.

thanks,
Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ