From: Andi <andi.shyti@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "AnilKumar, Chimata" <anilkumar@ti.com>,
"greg@kroah.com" <greg@kroah.com>,
"eric.piel@tremplin-utc.net" <eric.piel@tremplin-utc.net>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Nori, Sekhar" <nsekhar@ti.com>,
Jonathan Cameron <jic23@cam.ac.uk>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
lm-sensors@lm-sensors.org, linux-input@vger.kernel.org,
Jean Delvare <khali@linux-fr.org>
Subject: Re: [PATCH] lis3lv02d: Add STMicroelectronics lis33ldlh digital
Date: Wed, 18 Jan 2012 22:36:37 +0100 [thread overview]
Message-ID: <20120118213635.GB3401@gmail.com> (raw)
In-Reply-To: <201201181403.47806.arnd@arndb.de>
Hi Arnd,
What do you mean with "kernel-wide policy for accelerometer drivers"?
As far as I know, accelerometer drivers are written between the i2c driver and the
input driver.
The input driver provides already some accelerometer specific event types, ABS_X, ABS_Y, ABS_Z,
in your opinion isn't it enough?
If you mean something like collecting common properties like g range or frequency or whatever in a
standard interface, then I think that accelerometers are quite different as devices and sometimes
it could be difficult to arrange a common interface.
Andi
On Wed, Jan 18, 2012 at 02:03:47PM +0000, Arnd Bergmann wrote:
> On Tuesday 17 January 2012, AnilKumar, Chimata wrote:
> > Hi All,
> >
> > Recalling the patch, provide the comments if there are any if not please include
> > this patch to v3.3 kernel.
>
> As Mark and Greg said, 3.4 would be appropriate.
>
> > +static ssize_t lis3lv02d_range_set(struct device *dev,
> > + struct device_attribute *attr, const char *buf,
> > + size_t count)
> > +{
> > + unsigned long range;
> > +
> > + if (strict_strtoul(buf, 0, &range))
> > + return -EINVAL;
> > +
> > + lis3_dev.g_range = range;
> > + lis3lv02d_update_g_range(&lis3_dev);
> > +
> > + return count;
> > +}
> > +
> > static DEVICE_ATTR(selftest, S_IRUSR, lis3lv02d_selftest_show, NULL);
> > static DEVICE_ATTR(position, S_IRUGO, lis3lv02d_position_show, NULL);
> > static DEVICE_ATTR(rate, S_IRUGO | S_IWUSR, lis3lv02d_rate_show,
> > lis3lv02d_rate_set);
> > +static DEVICE_ATTR(range, S_IRUGO | S_IWUSR, lis3lv02d_range_show,
> > + lis3lv02d_range_set);
>
> I think you need to document this new attribute in the Documentation
> directory, unless I missed the other patch doing this.
>
> On a more general topic, do we have a kernel-wide policy for accelerometer
> drivers? AFAICT, we currently have three subsystems that contain
> accelerometer drivers, plus a few ad-hoc ones like this, which is a
> rather unpleasant situation. What I found are these:
>
> $ git grep -l accelerometer drivers/ | manual_grep
> drivers/hwmon/applesmc.c
> (one hwmon sysfs attribute for x/y/z)
> drivers/input/misc/adxl34x.c
> (lots of sysfs attributes, input_report_key)
> drivers/input/misc/cma3000_d0x.c
> (input_report_abs)
> drivers/input/misc/kxtj9.c
> (input_report_abs, plus one aux sysfs attribute)
> drivers/macintosh/ams/ams-core.c
> (one sysfs attribute for x/y/z)
> drivers/misc/lis3lv02d/
> (multiple sysfs attributes)
> drivers/platform/x86/hdaps.c
> (multiple sysfs attributes, only x/y)
> drivers/platform/x86/hp_accel.c
> (hooks into drivers/misc/lis3lv02d/)
> drivers/staging/iio/accel/kxsd9.c
> (iio)
> drivers/staging/iio/accel/sca3000_core.c
> (iio plus extra attributes)
>
> While I'm not blaming you for the current situation, but I think the
> situation is no longer sustainable and we need to decide on one place
> and interface for these to go in the long run so we don't grow even
> more nonstandard interfaces.
>
> Any opinions where they should live? input, iio or a new subsystem?
>
> Arnd
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2012-01-18 21:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1324617892-14576-1-git-send-email-anilkumar@ti.com>
2011-12-23 11:18 ` [PATCH] lis3lv02d: Add STMicroelectronics lis33ldlh digital Mark Brown
2011-12-28 9:14 ` AnilKumar, Chimata
2012-01-17 7:32 ` AnilKumar, Chimata
2012-01-17 10:54 ` Mark Brown
2012-01-17 16:03 ` greg
2012-01-18 5:48 ` AnilKumar, Chimata
2012-01-17 23:47 ` Andrew Morton
2012-01-18 7:51 ` AnilKumar, Chimata
2012-01-18 14:03 ` Arnd Bergmann
2012-01-18 14:43 ` Jean Delvare
2012-01-18 14:49 ` Arnd Bergmann
2012-01-18 15:00 ` Jean Delvare
2012-01-18 16:47 ` Jonathan Cameron
2012-01-18 17:11 ` Arnd Bergmann
2012-01-19 5:30 ` AnilKumar, Chimata
2012-01-19 17:10 ` Arnd Bergmann
2012-01-19 17:29 ` Mark Brown
2012-07-25 8:57 ` AnilKumar, Chimata
2012-01-18 21:36 ` Andi [this message]
2012-01-19 14:26 ` Arnd Bergmann
2012-01-19 17:15 ` 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=20120118213635.GB3401@gmail.com \
--to=andi.shyti@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=anilkumar@ti.com \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=eric.piel@tremplin-utc.net \
--cc=greg@kroah.com \
--cc=jic23@cam.ac.uk \
--cc=khali@linux-fr.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=nsekhar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).