lkml.org 
[lkml]   [2020]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RESEND PATCH v6 1/4] mfd: syscon: Add fwnode_to_regmap
On Tue, Apr 28, 2020 at 12:05 PM Lee Jones <lee.jones@linaro.org> wrote:
> On Tue, 21 Apr 2020, Dilip Kota wrote:
> >
> > But, i feel return error for ACPI or oother, looks better because
> > 'device_node' has fwnode pointer. And provide description
> > in the header file, mentioning function is success for 'OF' and returns
> > error for the rest.
>
> I don't think this patch adds much to be honest.
>
> Better to just do:
>
> device_node_get_regmap(to_of_node(fwnode), false);
>
> ... from the call site I think.

Agreed, or just use the of_node pointer consistently in the driver that uses
it and avoid the use of the fwnode interface entirely when dealing with a
modern driver that does not need to support board files any more.

Arnd

\
 
 \ /
  Last update: 2020-04-28 12:30    [W:0.057 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site