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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Sep 2018 14:14:20 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        radu_nicolae.pirea@....ro, Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Mark Brown <broonie@...nel.org>, Jiri Slaby <jslaby@...e.com>,
        Richard Genoud <richard.genoud@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
        linux-spi <linux-spi@...r.kernel.org>
Subject: Re: [PATCH v12 0/6] Driver for at91 usart in spi mode

On 12/09/2018 12:43:52+0100, Lee Jones wrote:
> > > But ... we can't have it both ways.  *Either* it's a true MFD, in
> > > which case it can/should have 2 separate compatible strings which can
> > > be specified directly from the DT.  *Or* it's not an MFD.  In the
> > > latter case, which I think we're all agreeing on (else we'd have 2
> > > compatible strings), MFD is not the place to handle this (my original
> > > point).
> > > 
> > 
> > If that is what bothers you, then let's move it out of mfd.
> 
> As I've already mentioned.  I don't just want it moved out of MFD and
> shoved somewhere else.  My aim is to fix this properly.
> 

If it is out of MFD, then I'm not sure why you would care too much about
it as you won't be maintaining that code. And I still this what was done
was correct but I'm open to test what you suggest.

> > > So ... this is a USART device which can do SPI, right?
> > > 
> > > My current thinking is that; as this is a USART device first &
> > > foremost, the USART should be probed in the first instance regardless,
> > > then if SPI mode is specified it (the USART driver) registers the SPI
> > > platform driver (as MFD does currently) and exits gracefully, allowing
> > > the SPI driver to take over.
> > > 
> > > Spanner in the works: is it physically possible to change the mode at
> > > run-time?  :s
> > 
> > Yes it is possible but on Linux that will not happen without probing
> > the drivers again.
> 
> Not sure I understand what you mean.
> 

I was just commenting on changing the mode at runtime.

> I'm suggesting that you use the same platform_* interfaces MFD uses to
> register the SPI driver if SPI mode has been selected.  Only do so
> from the appropriate driver i.e. USART.
> 

Yeah, I understood that but I didn't comment because I'm not sure this
will work yet.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ