[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090929182746.245afa74.akpm@linux-foundation.org>
Date: Tue, 29 Sep 2009 18:27:46 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Mike Frysinger <vapier.adi@...il.com>
Cc: uclinux-dist-devel@...ckfin.uclinux.org, chrisv@...erswitching.com,
linux-kernel@...r.kernel.org, michael.hennerich@...log.com
Subject: Re: [Uclinux-dist-devel] [PATCH] ad525x_dpot: new driver for AD525x
digital potentiometers
On Tue, 29 Sep 2009 21:14:37 -0400 Mike Frysinger <vapier.adi@...il.com> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists