All of lore.kernel.org
 help / color / mirror / Atom feed
* syscon regmap for disabled node?
@ 2018-02-17  1:40 ` Suman Anna
  0 siblings, 0 replies; 6+ messages in thread
From: Suman Anna @ 2018-02-17  1:40 UTC (permalink / raw)
  To: Lee Jones, Pankaj Dubey, Arnd Bergmann; +Cc: linux-kernel, linux-arm-kernel

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?

regards
Suman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* syscon regmap for disabled node?
@ 2018-02-17  1:40 ` Suman Anna
  0 siblings, 0 replies; 6+ messages in thread
From: Suman Anna @ 2018-02-17  1:40 UTC (permalink / raw)
  To: linux-arm-kernel

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?

regards
Suman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: syscon regmap for disabled node?
  2018-02-17  1:40 ` Suman Anna
@ 2018-02-17 19:51   ` Arnd Bergmann
  -1 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-02-17 19:51 UTC (permalink / raw)
  To: Suman Anna; +Cc: Lee Jones, Pankaj Dubey, Linux Kernel Mailing List, Linux ARM

On Sat, Feb 17, 2018 at 2:40 AM, Suman Anna <s-anna@ti.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* syscon regmap for disabled node?
@ 2018-02-17 19:51   ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-02-17 19:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Feb 17, 2018 at 2:40 AM, Suman Anna <s-anna@ti.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: syscon regmap for disabled node?
  2018-02-17 19:51   ` Arnd Bergmann
@ 2018-02-20  0:06     ` Suman Anna
  -1 siblings, 0 replies; 6+ messages in thread
From: Suman Anna @ 2018-02-20  0:06 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lee Jones, Pankaj Dubey, Linux Kernel Mailing List, Linux ARM

On 02/17/2018 01:51 PM, Arnd Bergmann wrote:
> On Sat, Feb 17, 2018 at 2:40 AM, Suman Anna <s-anna@ti.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* syscon regmap for disabled node?
@ 2018-02-20  0:06     ` Suman Anna
  0 siblings, 0 replies; 6+ messages in thread
From: Suman Anna @ 2018-02-20  0:06 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/17/2018 01:51 PM, Arnd Bergmann wrote:
> On Sat, Feb 17, 2018 at 2:40 AM, Suman Anna <s-anna@ti.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-20  0:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-17  1:40 syscon regmap for disabled node? Suman Anna
2018-02-17  1:40 ` Suman Anna
2018-02-17 19:51 ` Arnd Bergmann
2018-02-17 19:51   ` Arnd Bergmann
2018-02-20  0:06   ` Suman Anna
2018-02-20  0:06     ` Suman Anna

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.