mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Andrew Chew <AChew@nvidia.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"khali@linux-fr.org" <khali@linux-fr.org>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: Re: [PATCH 1/1] iio: ak8975: Add Ak8975 magnetometer sensor
Date: Thu, 2 Sep 2010 23:41:24 +0100	[thread overview]
Message-ID: <20100902234124.584b9bf7@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <643E69AA4436674C8F39DCC2C05F763816B85AD096@HQMAIL03.nvidia.com>

On Thu, 2 Sep 2010 15:16:20 -0700
Andrew Chew <AChew@nvidia.com> wrote:

> > > +static IIO_DEVICE_ATTR(mode, S_IRUGO | S_IWUSR, show_mode, 
> > store_mode, 0);
> > > +static IIO_DEVICE_ATTR(magn_x_calibscale, S_IRUGO, 
> > show_calibscale, NULL, 0);
> > > +static IIO_DEVICE_ATTR(magn_y_calibscale, S_IRUGO, 
> > show_calibscale, NULL, 1);
> > > +static IIO_DEVICE_ATTR(magn_z_calibscale, S_IRUGO, 
> > show_calibscale, NULL, 2);
> > > +static IIO_DEV_ATTR_MAGN_X(show_raw, AK8975_REG_HXL);
> > > +static IIO_DEV_ATTR_MAGN_Y(show_raw, AK8975_REG_HYL);
> > > +static IIO_DEV_ATTR_MAGN_Z(show_raw, AK8975_REG_HZL);
> > 
> > This seems odd as an interface as it's raw when the maths to provide
> > non-raw (and thus abstract and easy for user space) data is trivial
> > enough to do in kernel
> 
> IIO guys want to do normalization maths above the kernel-level magnetometer IIO layer.  This interface came before me, so I'm just following current conventions.

That will make a generic IIO <-> input bridge very hard to do right. I
can see why IIO wants to do that but you need both if so and this also
needs discussion.


  reply	other threads:[~2010-09-02 22:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 21:35 achew
2010-09-02 22:19 ` Alan Cox
2010-09-02 22:16   ` Andrew Chew
2010-09-02 22:41     ` Alan Cox [this message]
2010-09-02 23:15       ` Jonathan Cameron
2010-09-03  5:18   ` samu.p.onkalo
2010-09-03  7:23     ` Jonathan Cameron
2010-09-03  7:20       ` samu.p.onkalo
2010-09-02 23:40 achew
2010-09-03 23:16 ` Andrew Morton
2010-09-04 16:38 ` Jonathan Cameron
2010-09-06  8:17 ` Datta, Shubhrajyoti
2010-09-07 23:07   ` Andrew Chew
2010-09-08 10:05     ` Datta, Shubhrajyoti
2010-09-08 15:34       ` Murphy, Dan

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=20100902234124.584b9bf7@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=AChew@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=khali@linux-fr.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®