From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Cameron Subject: Re: [RFC] i2c_check_functionality and error code Date: Sun, 21 Feb 2016 20:33:17 +0000 Message-ID: <56CA1F0D.2060707@kernel.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matt Ranostay , "linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Wolfram Sang , Linux I2C List-Id: linux-i2c@vger.kernel.org On 14/02/16 23:09, Matt Ranostay wrote: > Jonathan et all, > > Has anyone noticed that there is no clear consensus on which error > code to return when a i2c_check_functionality() check fails within the > probe function. I've seen so far ENODEV, ENOTSUPP, EOPNOTSUPP, EIO, > and ENOSYS in drivers/iio > > Shouldn't these be made a standard value like -ENOTSUPP? Would make sense - but is this the right choice. Thought I'd grep HWMON as a possible source of a consensus on this and got no clear answer. The most common in there looks to be -ENODEV though (From the first few pages of results anyway ;) Hohum. Wolfram what do you think? Worth cleaning this up? Perhaps even kernel wise would lead to some consistency. I've never been that sharp on this in IIO so I can't really talk ;) Jonathan > > Thanks, > > Matt >