Received: by 10.223.185.116 with SMTP id b49csp37224wrg; Mon, 19 Feb 2018 16:08:17 -0800 (PST) X-Google-Smtp-Source: AH8x227GQoTFJQF3zJmV4KD7MFCNr3c42RR2PTAdcno1I/xgmr7o8giXt8VRGfT+Ws5LwdUH1aKZ X-Received: by 10.98.93.87 with SMTP id r84mr11655699pfb.131.1519085296912; Mon, 19 Feb 2018 16:08:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519085296; cv=none; d=google.com; s=arc-20160816; b=bWyWoApwxPXybfeugp0zmya/lQZz//zpK9+J4TR9n1vQ0BUa0Fx87lu/VxbNqb5kEo rbroni+oP6AElWWjiAmQTSgonyJa+og7BJoC6TfSzbiYdwVakQAbHTj5lpxwdJr/vcHb wp0t9p/FrpX/JALFXoZdT/Hw3dYKTtLFQ9fiL6OvsFKHc5hTJ/cNkps5bMhdFNjMGfaR tOEr9u7zNb+pTVvlx8qYeBC9118b233MPGFd9iN0I/fWXkRD3e28VL8bObpU9Bu9U6HJ muXmdnAqOje2s7NcpJijH15PMMj6dnYDUroIqGkPBfnYS9DRkqXNcLhsLQ/+mDBE6WBe aiVg== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=0EPb4MpO1GusuaKbmvYftGIPntTvpQ11B4RpHY/friY=; b=oWh1vyK8UxmYm2mOP8Y7wWSkgZoxLbnNr+0XytAntwjLCnKzJnE8qcvRwc0X+z+k+v Hgr/G+laluoJ0Ad9JWTDV3bB/t1kH3XWwxUqPyOpfOV3bIvqTpEujllHuHv0AR+c2sjX Pdj7O6dEQFSnha6RcHrSo5TiAULXPZH0LwE10voEuyMvCXuN7xOV7STOuf3896lmfEE8 GO5x6s9PdK+BOwNnBpPwxeCclmvLpOG/37NMG3k+2T0HbqSq3OZdyVX/JEkKaqIn+xDt c/lnQ8ykrWsKGeCrS7ziKdCxqJh0dPyOP2tNobEKFeLz6MhZXGtn/jbkEZysO8habn+K KsLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dWcKDchY; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63-v6si4513377plb.788.2018.02.19.16.08.01; Mon, 19 Feb 2018 16:08:16 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dWcKDchY; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932271AbeBTAHX (ORCPT + 99 others); Mon, 19 Feb 2018 19:07:23 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:43520 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932248AbeBTAHW (ORCPT ); Mon, 19 Feb 2018 19:07:22 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1K070wq009804; Mon, 19 Feb 2018 18:07:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519085220; bh=bC99Q6ob38BhDzgqcl2luzJ7vvzIHoUQng5K6yG4H3o=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=dWcKDchYKE3TTq9y64PVFVG4Pf0sSMgwMbnpZ3ocD1Jlwoj9vuY+UtMWHjdZ7Qymw o6nGcK2IBXuOreJ+pHKvUYLOaCcjR2+6k9NqlOFPJ5MWWMc0LdkH2W+9TI8enxkHaL Dz4SClZ728E5ppMJVDFo2lOtcEGqSVnkTpf5HGj8= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1K070Z4007850; Mon, 19 Feb 2018 18:07:00 -0600 Received: from [128.247.58.153] (128.247.58.153) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Mon, 19 Feb 2018 18:06:59 -0600 Subject: Re: syscon regmap for disabled node? To: Arnd Bergmann CC: Lee Jones , Pankaj Dubey , Linux Kernel Mailing List , Linux ARM References: From: Suman Anna Message-ID: <112b03a1-8f2d-dddf-529c-e70561722722@ti.com> Date: Mon, 19 Feb 2018 18:06:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [128.247.58.153] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/17/2018 01:51 PM, Arnd Bergmann wrote: > On Sat, Feb 17, 2018 at 2:40 AM, Suman Anna wrote: >> Hi Pankaj, Arnd, Lee, >> >> I am testing some code to use a syscon/regmap interface and I find that >> the syscon/regmap is initialized even on a disabled device node using a >> "syscon" compatible property when I have expected it to fail. Prior to >> commit bdb0066df96e ("mfd: syscon: Decouple syscon interface from >> platform devices"), the driver would have never probed, and the >> of_syscon_register() only checks for the compatible, but not if the >> device node is available. Is this intentional or a bug? > > My guess would be that nothing relies on the current behavior and that > it could be changed if it causes problems, but it's hard to tell for the general > case. > > Can you describe why you have a disabled syscon node? Most uses of the > status property are for on-chip devices that we disable because nothing is > connected to them, but that seems unlikely for a syscon. I am just testing the failure paths in my code by specifically disabling the syscon node, and to my surprise, the code went through fine when I had expected the syscon_node_to_regmap() call to fail. regards Suman