Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp635746ybz; Wed, 15 Apr 2020 15:37:40 -0700 (PDT) X-Google-Smtp-Source: APiQypJ+3G+DA1l8njIe6lA6W5mgMcl4pRUC8yC8ZKwMjwWYM7l9Mt4dJxjwYOY24W1y5L7harlg X-Received: by 2002:a05:6402:28b:: with SMTP id l11mr21303803edv.156.1586990260646; Wed, 15 Apr 2020 15:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586990260; cv=none; d=google.com; s=arc-20160816; b=PDQZbWVlymyOZcpkmbJlrVGtL5vUsKSQDPiz1VMzHJT6m52ckxa3Bik081iaGfbKYa IK+Fk8p6RnVJjk9J9h9qjirRWkc1cHmaQIBbM5PmTDxDC3BuleZx0WoGQSVXd9yWcMwI L+SaFnmq6bfZdgfAZAcpGwRn2nizs4JAGwK2CuFvUUD8n3pMEbtZFgRkvnGPsuvfnAQV ZwSjgZ5FQU+bsqOE/jkV3LGP9KPYzFawzHXTZbOjE3VZiiFbAx4gHdi4sAfokoptmVEh bvRbTTlq7U4eFFHRVHp0mWSHE6rR/NaVmHUSXXWOCoKIIh9s85EqF/0pG61/fbykQnMP CIWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:reply-to :dkim-signature; bh=s8vGDAm6Jsd6aHbIsMhHSbWVJTit9jGUGz7Dzo0kilc=; b=z82BQJNfg1JZ0HRnwJuEyT4mic+vZCQYuOwW6BY21jmyu+cV4Dx/OrZfV8lYXKnrZW CovO4BzLwLTNFTamdL387lMkqxL3fC6kMn7BurrYkB+0tnTqf70T3QboPIrR5fVNRqHN di6NyIWgVzXgQbh8MaLol2cEop9qGZ8MstXWIegHT1Ob/WgFixYS8gt6zsBBIy4XOmUP fVk8EI2NTX+YwfMaQgM1gGz9NJ/gaAK0cu7Mr+tTI9cuENXF6FIOCUrjKWTQIwtYOk63 HWkYXAjtazjXt994Yv8GC9syaFFUVyF+AmeVu9F54NjsSvi6rqJVwxM7wIn2ifFXLWVx GZ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=YJHXYax3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm14si4503975edb.546.2020.04.15.15.37.16; Wed, 15 Apr 2020 15:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=YJHXYax3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2894692AbgDOIia (ORCPT + 99 others); Wed, 15 Apr 2020 04:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2894680AbgDOIiJ (ORCPT ); Wed, 15 Apr 2020 04:38:09 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9696C061A0C; Wed, 15 Apr 2020 01:38:08 -0700 (PDT) Received: from [192.168.0.20] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 81BBB2D1; Wed, 15 Apr 2020 10:38:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586939887; bh=m17M/qxOXVGsFQJ698T1Ff8MtF5x26XIRLZsnobAhNg=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YJHXYax3vn++WTEV3ZgsaAvu0Np/2TLyVoFAzk/SXaOkJgHeaTy+3qpw2qOZurZqX 6IVPyXrZX9N8VJqLF0Mc5OTr6mZORtiKu6Q4+vFNM2DQJECPvFLsBVNmlTJrv7BPPL 8UlYHHVmPO7J16i7Sm3gN5xiQO6qWFL3jtZ8+DsE= Reply-To: kieran.bingham+renesas@ideasonboard.com Subject: Re: [RFC PATCH v2 2/6] i2c: allow DT nodes without 'compatible' To: Wolfram Sang Cc: Luca Ceresoli , Wolfram Sang , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-i3c@lists.infradead.org, =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Jacopo Mondi , Laurent Pinchart , Vladimir Zapolskiy , linux-kernel@vger.kernel.org, Geert Uytterhoeven , Rob Herring References: <20200318150059.21714-1-wsa+renesas@sang-engineering.com> <20200318150059.21714-3-wsa+renesas@sang-engineering.com> <11ca7487-ac07-f714-8573-20d1a0040212@lucaceresoli.net> <20200415075911.GA1141@ninjato> <8937e466-fe3f-3686-98a9-8013990bc3f9@ideasonboard.com> <20200415081654.GC1141@ninjato> From: Kieran Bingham Organization: Ideas on Board Message-ID: Date: Wed, 15 Apr 2020 09:38:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20200415081654.GC1141@ninjato> Content-Type: text/plain; charset=windows-1252 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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