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]
Message-ID: <20220628195654.GE855398@euler>
Date:   Tue, 28 Jun 2022 12:56:54 -0700
From:   Colin Foster <colin.foster@...advantage.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Vladimir Oltean <vladimir.oltean@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        Lee Jones <lee.jones@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Steen Hegelund <Steen.Hegelund@...rochip.com>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Wolfram Sang <wsa@...nel.org>,
        Terry Bowman <terry.bowman@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Arnd Bergmann <arnd@...nel.org>
Subject: Re: [PATCH v11 net-next 1/9] mfd: ocelot: add helper to get regmap
 from a resource

On Tue, Jun 28, 2022 at 09:04:21PM +0200, Andy Shevchenko wrote:
> On Tue, Jun 28, 2022 at 8:56 PM Vladimir Oltean <vladimir.oltean@....com> wrote:
> >
> > On Tue, Jun 28, 2022 at 09:46:59PM +0300, Vladimir Oltean wrote:
> > > I searched for 5 minutes or so, and I noticed regmap_attach_dev() and
> > > dev_get_regmap(), maybe those could be of help?
> >
> > ah, I see I haven't really brought anything of value to the table,
> > dev_get_regmap() was discussed around v1 or so. I'll read the
> > discussions again in a couple of hours to remember what was wrong with
> > it such that you aren't using it anymore.
> 
> It would be nice if you can comment after here to clarify that.
> Because in another series (not related to this anyhow) somebody
> insisted to use dev_get_regmap().

To add some info: The main issue at that time was "how do I get a spi
regmap instead of an mmio regmap from the device". V1 was very early,
and was before I knew about the pinctrl / mdio drivers that were to
come, so that led to the existing MFD implementation.

I came across the IORESOURCE_REG, which seems to be created for exactly
this purpose. Seemingly I'm pretty unique though, since IORESOURCE_REG
doesn't get used much compared to IORESOURCE_MEM.

Though I'll revisit this again. The switch portion of this driver (no
longer included in this patch set) is actually quite different from the
rest of the MFD in how it allocates regmaps, and that might have been
a major contributor at the time. So maybe I dismissed it at the time,
but it actually makes sense for the MFD portion now.

> 
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ