From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbeBQTvQ (ORCPT ); Sat, 17 Feb 2018 14:51:16 -0500 Received: from mail-ot0-f178.google.com ([74.125.82.178]:44286 "EHLO mail-ot0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751131AbeBQTvP (ORCPT ); Sat, 17 Feb 2018 14:51:15 -0500 X-Google-Smtp-Source: AH8x226BADgZVm5dhlPee7w1tuqSbFTESYaNqAYtj5YJ1X8Wt/nr4nSlwx73LE9Lj1UyHu1pvON08PIa2geYwAXpfNg= MIME-Version: 1.0 In-Reply-To: References: From: Arnd Bergmann Date: Sat, 17 Feb 2018 20:51:14 +0100 X-Google-Sender-Auth: UguJLcHgw-k-JXOX8CxsYEyf80g Message-ID: Subject: Re: syscon regmap for disabled node? To: Suman Anna Cc: Lee Jones , Pankaj Dubey , Linux Kernel Mailing List , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Sat, 17 Feb 2018 20:51:14 +0100 Subject: syscon regmap for disabled node? In-Reply-To: References: Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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. Arnd