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]
Message-ID: <20180912083640.GM4185@dell>
Date:   Wed, 12 Sep 2018 09:36:40 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
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 Wed, 12 Sep 2018, Alexandre Belloni wrote:

> On 11/09/2018 23:43:02+0100, Lee Jones wrote:
> > > I haven't read it, but I believe it's not unlike Renesas SCIF, which is
> > > served by both drivers/tty/serial/sh-sci.c and drivers/spi/spi-sh-sci.c.
> > > But the latter is not used from DT, so we haven't experienced (and solved)
> > > the similar issue yet.
> > > 
> > > Would it work if the UART driver and SPI driver would match against the
> > > same compatible value, but the UART driver would do in its probe()
> > > function:
> > > 
> > >     device_property_read_u32(&pdev->dev, "atmel,usart-mode", &opmode);
> > >     if (opmode != AT91_USART_MODE_SERIAL)
> > >         return ENODEV;
> > > 
> > > while the SPI driver would do:
> > > 
> > >     device_property_read_u32(&pdev->dev, "atmel,usart-mode", &opmode);
> > >     if (opmode != AT91_USART_MODE_SPI)
> > >         return ENODEV;
> > > 
> > > ? No MFD driver involved.
> > 
> > I haven't looked at the code in a while, but if memory serves I
> > believe platform code gives up once it has found its first match, so
> > by doing this, one of the drivers will never be matched/probed.
> > 
> > It's midnight here, so cracking out the datasheet isn't going to
> > happen just now, but it's my current belief that if the IP serves 2
> > very different modes of operation, even if the registers are in a
> > shared space, they could have their own compatible strings in DT.
> > 
> > That is what the MFD driver provides after all.  Why would it be okay
> > to allocate different compatible strings from the MFD, but not in the
> > Device Tree?
> > 
> > It would be the easiest solution.
> > 
> > Has Rob commented on this yet?
> 
> V4 of the bindings were acked by Rob and you:
> https://patchwork.kernel.org/patch/10428087/

We didn't Ack the bindings.  We Acked the location change.

I mean, has Rob specifically spoken out about using a compatible
string for each function.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ