lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 23 Nov 2019 00:21:55 +0800
From:   Orson Zhai <orsonzhai@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Orson Zhai <orson.zhai@...soc.com>,
        Lee Jones <lee.jones@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        DTML <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kevin Tang <kevin.tang@...soc.com>, baolin.wang@...soc.com,
        Chunyan Zhang <chunyan.zhang@...soc.com>
Subject: Re: [PATCH V2 2/2] mfd: syscon: Find syscon by names with arguments support

On Thu, Nov 21, 2019 at 11:06 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Wed, Nov 20, 2019 at 4:44 PM Orson Zhai <orson.zhai@...soc.com> wrote:
> >
> > There are a lot of global registers used across multiple similar SoCs
> > from Unisoc. It is not easy to manage all of them very well by current
> > syscon helper functions.
> >
> > Add helper functions to get regmap and arguments by syscon-names all
> > together.
> >
> > This patch does not affect original syscon code and usage. It may help
> > other SoC vendors if they have the same trouble as well.
> >
> > Signed-off-by: Orson Zhai <orson.zhai@...soc.com>
> > ---
> >  drivers/mfd/syscon.c       | 75 ++++++++++++++++++++++++++++++++++++++
> >  include/linux/mfd/syscon.h | 26 +++++++++++++
> >  2 files changed, 101 insertions(+)
> >
> > diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> > index 660723276481..e818decc7bf2 100644
> > --- a/drivers/mfd/syscon.c
> > +++ b/drivers/mfd/syscon.c
> > @@ -225,6 +225,81 @@ struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,
> >  }
> >  EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle);
> >
> > +struct regmap *syscon_regmap_lookup_by_name(struct device_node *np,
> > +                                       const char *list_name,
> > +                                       const char *cell_name)
> > +{
>
> According to the binding change I suggested, this would not take a 'cell_name'
> argument, but instead a an arg_count.

Got it. This is much convenient for caller.

>
> > +
> > +int syscon_get_args_by_name(struct device_node *np,
> > +                       const char *list_name,
> > +                       const char *cell_name,
> > +                       int arg_count,
> > +                       unsigned int *out_args)
> > +{
>
> and I think this could be combined with it, like
>
> struct regmap *syscon_regmap_lookup_by_name(struct device_node *np,
>                                        const char *name, int
> arg_count, __u32 *out_args)

Ok, I'll send V3 next week.

Best,
-Orson
>
>     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ