Re: [Uclinux-dist-devel] [PATCH] ad525x_dpot: new driver for AD525x digital potentiometers

From: Andrew Morton
Date: Tue Sep 29 2009 - 21:29:14 EST


On Tue, 29 Sep 2009 21:14:37 -0400 Mike Frysinger <vapier.adi@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/