From: Mike Frysinger <vapier.adi@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org,
chrisv@cyberswitching.com, linux-kernel@vger.kernel.org,
michael.hennerich@analog.com
Subject: Re: [Uclinux-dist-devel] [PATCH] ad525x_dpot: new driver for AD525x digital potentiometers
Date: Tue, 29 Sep 2009 21:44:22 -0400 [thread overview]
Message-ID: <8bd0f97a0909291844j17f485edib7417015d90b4784@mail.gmail.com> (raw)
In-Reply-To: <20090929182746.245afa74.akpm@linux-foundation.org>
On Tue, Sep 29, 2009 at 21:27, Andrew Morton wrote:
> On Tue, 29 Sep 2009 21:14:37 -0400 Mike Frysinger wrote:
>> > + __ __ __ if (reg & AD525X_REG_TOL)
>> > + __ __ __ __ __ __ __ return sprintf(buf, "0x%04x\n", value & 0xFFFF);
>> > + __ __ __ else
>> > + __ __ __ __ __ __ __ return sprintf(buf, "%u\n", value & data->rdac_mask);
>> >
>> > which makes me suspect that the proposed userspace interface is quite
>> > poor.
>>
>> not really.
>
> Think so. We have a sysfs file which under some circumstances will
> return a decimal number and which under others will return a hex
> number. So userspace is supposed to look for the leading 0x to work
> out how to interpret that number?
>
> Or something. Whatever. Perhaps it all makes sense when one has seen
> the overall description.
no, you're looking at one common function which is called by different
sysfs files. no point in copying & pasting the same code over and
over. all of the rdac files display as a hex file while all the
non-rdac files display as a decimal.
-mike
next prev parent reply other threads:[~2009-09-30 1:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 4:22 Mike Frysinger
2009-09-29 22:39 ` Andrew Morton
2009-09-30 1:14 ` [Uclinux-dist-devel] " Mike Frysinger
2009-09-30 1:27 ` Andrew Morton
2009-09-30 1:44 ` Mike Frysinger [this message]
2009-10-02 0:53 ` [PATCH v2] " Mike Frysinger
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=8bd0f97a0909291844j17f485edib7417015d90b4784@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chrisv@cyberswitching.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=uclinux-dist-devel@blackfin.uclinux.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®