Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp312506ybx; Wed, 6 Nov 2019 00:43:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxyRSV5h6hEZRW2MET3WLzEjcycIQmc9M82JcKHXOok9HgPNm9jzODMFmom2pKp4vk2dScA X-Received: by 2002:a17:906:1c4d:: with SMTP id l13mr22789256ejg.308.1573029787127; Wed, 06 Nov 2019 00:43:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573029787; cv=none; d=google.com; s=arc-20160816; b=SqsqXnOQnUDHS4HftGbfoeGU7QY1NdK7BBsrwRmjW4rqbdEFFUYWtC35dK3tT+JAod +XwJvEaBWCP0eTpemxg2snvNqI15XqutI83Kuh1znRVNWaSHIXGZ/6dWOoavXoK5Uwl3 GO+37AOWCZ5cktSmb3Vwk4wTsqx7qHcrG0xphYtn56U4t4ztsZwZFWvOOmO7NQOsNRGZ EsKxotxjzxG/uv/dJcnaCNR56OeLoozgiam3Hx5doJvspB7qk78wmKytcBIbwNr50OGp T1Z/VL/bxCA1bn0tC0Umqf/y+otgnkrn936/z33wKynJ46H/ynD4LnJTgdh+pP+ltjBt hl4A== 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; bh=oEgS85jLC9o3JeMfo5Q6tfe3kcQ06foOBEWDe9NmqDs=; b=0INnuujVuL9yWKfgVukmFTxzzhGybFrALbzz1ALPFupFfd4/oIsqOLXmCy1QW3zI/P qxxSf9cIENuDvCDg32jvlFXvdtL/VjOG8TMrwfU7ZtUAUoNYF4cx3UE0F1jzekWMX5ew qKk2xHc4xoe0o7PSen5AtGIHkCLQmXruhikQAtdmX4Q3XqOH6vHpoyJgsBpyxC8Lf+gH 7U8GK5rKCoKAPhZZemlr9PNC+DFYzz0RO/uZoazc/1iPIfQFkoF2owuKYV1ZweViHlsT /1OXkPba9vOPsrKIHyj35LdkWEonzlVC6UyDX7ZclUym8uRrseWDSKEzTNbJFkT2aJBV fZdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gs14si176170ejb.347.2019.11.06.00.42.42; Wed, 06 Nov 2019 00:43:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731428AbfKFImE (ORCPT + 99 others); Wed, 6 Nov 2019 03:42:04 -0500 Received: from mx2.suse.de ([195.135.220.15]:51316 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729881AbfKFImE (ORCPT ); Wed, 6 Nov 2019 03:42:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2F6E3ACA4; Wed, 6 Nov 2019 08:42:02 +0000 (UTC) Subject: Re: [RFC 05/11] dt-bindings: soc: realtek: rtd1195-chip: Extend reg property To: Rob Herring Cc: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-realtek-soc@lists.infradead.org References: <20191103013645.9856-1-afaerber@suse.de> <20191103013645.9856-6-afaerber@suse.de> <20191106044605.GA28959@bogus> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Organization: SUSE Software Solutions Germany GmbH Message-ID: <202d501d-f548-24c6-b99c-652a59a9e255@suse.de> Date: Wed, 6 Nov 2019 09:42:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20191106044605.GA28959@bogus> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 06.11.19 um 05:46 schrieb Rob Herring: > On Sun, Nov 03, 2019 at 02:36:39AM +0100, Andreas Färber wrote: >> Allow to optionally specify a second register to identify the chip. >> Whether needed and which register to specify depends on the family; >> RTD1295 family will want the CHIP_INFO1 register. >> >> Signed-off-by: Andreas Färber >> --- >> A SoC specific binding would defeat the purpose of the generic Linux driver; > > Why? You can map any number of compatibles to a generic driver. Because the purpose of the driver is to read from the registers which chip it is. If we tell it via the compatible what it is supposed to be, 1) only the revision would need to be read, and 2) how should it react if the compatible tells it one thing and the register value another. Also it doesn't solve the problem that we may need to extend the binding as new models emerge, or instead of just rtd1195, rtd1295, rtd1395, etc. we'd also need one for each chip, i.e., rtd1296, cf. 1) above. >> is it possible to check the root node's compatible in an if: expression >> to prohibit using more than one reg on "realtek,rtd1195"? > > The "rule" is different programming model, different compatible string > for the block. Agreed in general. > But this looks simple enough, I don't really care. Hope you also read the cover letter wrt syscon? That would probably obsolete this binding then and require to move the driver's logic into a module init instead for lack of dedicated compatible to bind against, like Meson does. Regards, Andreas -- SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer HRB 36809 (AG Nürnberg)