[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dd627250-7916-8ac6-9a3c-316e0d7843ae@ideasonboard.com>
Date: Wed, 15 Apr 2020 09:38:03 +0100
From: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: Luca Ceresoli <luca@...aceresoli.net>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-i2c@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-i3c@...ts.infradead.org,
Niklas Söderlund <niklas.soderlund@...natech.se>,
Jacopo Mondi <jacopo@...ndi.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Vladimir Zapolskiy <vz@...ia.com>,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>,
Rob Herring <robh@...nel.org>
Subject: Re: [RFC PATCH v2 2/6] i2c: allow DT nodes without 'compatible'
Hi Wolfram,
On 15/04/2020 09:16, Wolfram Sang wrote:
>
>> Aha, is it easy enough to distinguish that difference in user-space so
>> that we can present a specific character to indicate this in i2cdetect?
>> Or is that not so easy?
>
> I thought about it shortly but have not come up with a way of doing
> that. This is the code in i2cdetect:
>
> /* Set slave address */
> if (ioctl(file, I2C_SLAVE, i+j) < 0) {
> if (errno == EBUSY) {
> printf("UU ");
> continue;
> } else {
> fprintf(stderr, "Error: Could not set "
> "address to 0x%02x: %s\n", i+j,
> strerror(errno));
> return -1;
> }
> }
>
> So, if we chose to use another errno to indicate 'reserved' and update
> i2cdetect, all old versions of i2cdetect will have ugly error messages.
> And adding another IOCTL just for printing reserved addresses neither
> sounds great.
Indeed, a different errno would be about all we could do - and it would
seemingly leave old i2cdetects with complete failures, if it goes
through that non-EBUSY code path.
Ayeeeee :-S
--
Kieran
Powered by blists - more mailing lists