From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758061AbcBDRp2 (ORCPT ); Thu, 4 Feb 2016 12:45:28 -0500 Received: from mx-36.synserver.de ([212.40.180.141]:46370 "EHLO smtp-out-195.synserver.de" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1756161AbcBDRpR (ORCPT ); Thu, 4 Feb 2016 12:45:17 -0500 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 30722 Subject: Re: [RFC PATCH 1/2] iio: hmc5843 Add channel attribute for bias configuration To: Cristina Moraru , jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, cristina.opriceana@gmail.com, marek@goldelico.com, sdliyong@gmail.com, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, octavian.purdila@intel.com, daniel.baluta@intel.com References: <1454597413-5298-1-git-send-email-cristina.moraru09@gmail.com> From: Lars-Peter Clausen X-Enigmail-Draft-Status: N1110 Message-ID: <56B38E29.8040300@metafoo.de> Date: Thu, 4 Feb 2016 18:45:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <1454597413-5298-1-git-send-email-cristina.moraru09@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.