From: Greg KH <greg@kroah.com>
To: Jan Dittmer <j.dittmer@portrix.net>
Cc: linux-kernel@vger.kernel.org, sensors@Stimpy.netroedge.com
Subject: Re: add eeprom i2c driver
Date: Wed, 26 Mar 2003 13:29:23 -0800 [thread overview]
Message-ID: <20030326212923.GB26886@kroah.com> (raw)
In-Reply-To: <3E8175FF.7060705@portrix.net>
On Wed, Mar 26, 2003 at 10:42:23AM +0100, Jan Dittmer wrote:
> Greg KH wrote:
> As an example of the changes necessary, here's a patch against the i2c
> >cvs version of the eeprom.c driver that converts it over to use sysfs,
> >instead of the /proc and sysctl interface. It's still a bit rough, but
> >you should get the idea of where I'm wanting to go with this. As you
> >can see, it takes about 100 lines of code off of this driver, which is
> >nice.
> >
> I thought about doing something like this for adding sysfs support.
> Should the voltages and other data appear as integer or as floats in
> sysfs tree? (ie. 1.20V or 120cV)
floats are a pain!
As we should have only one value per file, why not just "know" the units
of the file, so that we don't have to mess with a decimal point. Makes
the kernel a lot simpler and smaller, and then userspace can easily
parse the number and do any needed conversions.
> And what should be written back? I think the /proc interface expects
> floats...
Again, I would vote for simple integers.
And good documentation about what each file's units are :)
thanks,
greg k-h
next prev parent reply other threads:[~2003-03-26 21:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-25 14:42 add eeprom i2c driver Jan Dittmer
2003-03-25 17:20 ` Greg KH
2003-03-25 19:33 ` Jan Dittmer
[not found] ` <20030325212753.GA21498@xanadu.az.mvista.com>
2003-03-25 21:32 ` Greg KH
2003-03-25 21:50 ` Deepak Saxena
2003-03-26 9:42 ` Jan Dittmer
2003-03-26 21:29 ` Greg KH [this message]
2003-03-28 20:49 ` Pavel Machek
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=20030326212923.GB26886@kroah.com \
--to=greg@kroah.com \
--cc=j.dittmer@portrix.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@Stimpy.netroedge.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