From: Jonathan Cameron <jic23@kernel.org>
To: Daniel Baluta <daniel.baluta@intel.com>,
Lars-Peter Clausen <lars@metafoo.de>
Cc: Cristina Moraru <cristina.moraru09@gmail.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Cristina Georgiana Opriceana <cristina.opriceana@gmail.com>,
marek@goldelico.com, sdliyong@gmail.com,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
driverdev <devel@driverdev.osuosl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"octavian.purdila@intel.com" <octavian.purdila@intel.com>,
shubhrajyoti@ti.com
Subject: Re: [RFC PATCH 1/2] iio: hmc5843 Add channel attribute for bias configuration
Date: Sat, 6 Feb 2016 18:04:47 +0000 [thread overview]
Message-ID: <56B635BF.2090201@kernel.org> (raw)
In-Reply-To: <CAEnQRZARAOvNo6Yac5a0oJj8ARHE8_93=JNJp6YwZokjo2byZw@mail.gmail.com>
On 05/02/16 09:58, Daniel Baluta wrote:
> On Thu, Feb 4, 2016 at 7:45 PM, Lars-Peter Clausen <lars@metafoo.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.
Yup, from a quick glance - it otherwise looks sensible to me.
Will as ever attract more reviews once the move out of staging
patch shows up.
Jonathan
>
> thanks,
> Daniel.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-02-06 18:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 14:50 [RFC PATCH 1/2] iio: hmc5843 Add channel attribute for bias configuration Cristina Moraru
2016-02-04 14:50 ` [RFC PATCH 2/2] iio: hmc5843: Add attribute for available bias values Cristina Moraru
2016-02-04 17:45 ` [RFC PATCH 1/2] iio: hmc5843 Add channel attribute for bias configuration Lars-Peter Clausen
2016-02-05 9:58 ` Daniel Baluta
2016-02-06 18:04 ` Jonathan Cameron [this message]
2016-02-06 18:01 ` Jonathan Cameron
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=56B635BF.2090201@kernel.org \
--to=jic23@kernel.org \
--cc=cristina.moraru09@gmail.com \
--cc=cristina.opriceana@gmail.com \
--cc=daniel.baluta@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek@goldelico.com \
--cc=octavian.purdila@intel.com \
--cc=pmeerw@pmeerw.net \
--cc=sdliyong@gmail.com \
--cc=shubhrajyoti@ti.com \
/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.