[i2c] [PATCH] Add support for the S-35390A RTC chip.
Jean Delvare
khali at linux-fr.org
Tue Jan 8 13:07:12 CET 2008
Hi David,
On Sun, 6 Jan 2008 14:25:37 -0800, David Brownell wrote:
> On Sunday 06 January 2008, Byron Bradley wrote:
> > David, the ENOCSI comment probably applies to your at24 eeprom driver
> > too. I was wondering why that error code was chosen since other than
> > "No CSI structure available" I couldn't find anything about it.
>
> It was chosen for its uniqueness ... ideally each fault path has its
> own fault code and (possibly debug-only) diagnostic. When you get
> a fault code from a driver, and there's only one place that's used,
> it's a lot easier to know what went wrong than if the fault code is
> (over)used in many places.
>
> In fact it's common practice to adopt subsystem-specific conventions
> about what a given errno value indicates. Otherwise, almost every
> fault observed would map to a small handful ... making them useless
> for fault recovery logic, and at best problematic in terms of any
> diagnostic utility.
A common practice to use random error codes just to make sure they are
unique? I don't think so, no. Resource not available is EBUSY, not
ENOCSI, period. Please fix your driver.
--
Jean Delvare
More information about the i2c
mailing list