[PATCH] imx_v6_v7_defconfig: enable SPIDEV module

Gary Bisson gary.bisson at boundarydevices.com
Fri Dec 2 07:27:18 PST 2016


Hi Fabio,

On Fri, Dec 02, 2016 at 01:18:42PM -0200, Fabio Estevam wrote:
> Hi Gary,
> 
> On Fri, Dec 2, 2016 at 12:56 PM, Gary Bisson
> <gary.bisson at boundarydevices.com> wrote:
> > Signed-off-by: Gary Bisson <gary.bisson at boundarydevices.com>
> > ---
> > Hi,
> >
> > Seems that this configuration is missing, especially since many
> > device trees are already using "spidev" nodes.
> 
> Then they will trigger the following warning below (from the spidev
> probe function):
> 
> /*
> * spidev should never be referenced in DT without a specific
> * compatible string, it is a Linux implementation thing
> * rather than a description of the hardware.
> */
> if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) {
>     dev_err(&spi->dev, "buggy DT: spidev listed directly in DT\n");
>     WARN_ON(spi->dev.of_node &&
>                        !of_match_device(spidev_dt_ids, &spi->dev));
> }

Yes I've seen this WARN_ON when doing the dt-overlay testing. But is
disabling the SPIDEV configuration a solution?

To be honest I disagree with that WARN_ON. Ok it means that the hardware
isn't fully described in the device tree but for development platforms
(such as ours or any rpi-like boards) the user can design his own
daugher board with whatever SPI device on it. Then using the spidev
interface is very convenient, so I don't understand what we are trying
to forbid here.

Regards,
Gary



More information about the linux-arm-kernel mailing list