Re: [PATCH] spi: spidev: Warn loudly if instantiated from DT as "spidev"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2015 at 9:21 AM, Martin Sperl <kernel@xxxxxxxxxxxxxxxx> wrote:
>> On 28.03.2015, at 00:42, Mark Brown <broonie@xxxxxxxxxx> wrote:
>>
>> Since spidev is a detail of how Linux controls a device rather than a
>> description of the hardware in the system we should never have a node
>> described as "spidev" in DT, any SPI device could be a spidev so this
>> is just not a useful description.
>>
>> In order to help prevent users from writing such device trees generate a
>> warning if spidev is instantiated as a DT node without an ID in the match
>> table.
>>
>> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
>
> So what is now the “correct way” to create a spidev device via the
> device-tree?

Add the compatible value for your device to the spidev_dt_ids[] array in
drivers/spi/spidev.c.

> Note that on a raspberry pi the 2 SPI devices are by default configured
> as spidev and only overlays would change the settings to a different
> alias. So this change will impact that default immediately.
>
> Thus I wonder if it is wise to produce potential “support issues" for
> distributions triggered by this patch.

So what you need is a way to handover from generic spidev to a device-specific
driver, cfr. what graphics drivers do when the device has been bound to by
vesafb or simplefb.

Could this be implemented in a generic way in the spi or DT code?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux