[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dfc438ab-29fd-881d-f019-7223cae60e88@redhat.com>
Date: Fri, 8 Apr 2022 21:25:18 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: Rob Herring <robh@...nel.org>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Chen-Yu Tsai <wens@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Mark Brown <broonie@...nel.org>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Maxime Ripard <mripard@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/5] dt-bindings: display: ssd1307fb: Deprecate fbdev
compatible strings
On 4/8/22 21:19, Javier Martinez Canillas wrote:
[snip]
>>
>> There's also no reason to put the bus interface into the compatible as
>> the same compatible will work on different buses. But since you want to
>> add SPI, just using the 'i2c' one will confuse people. For that reason
>> you could add 'solomon,ssd1305', etc. for both SPI support and I2C DRM.
>
> That's not really true. There's a reason to add per bus compatible strings
> at least in Linux. And is that there's no information about the bus types
> in module aliases that are reported to user-space for module auto-loading.
>
Forgot to mention that in this particular case it will work but just because
the SPI subsystem always report a module alias of the form "spi:device" even
for devices that are registered through OF.
So having a single "solomon,ssd1306" would work because for I2C the module
alias will be "of:NoledT(null)Csolomon,ssd1306" and for SPI it will be
"spi:ssd1306".
But if ever the SPI subsystem is fixed to report proper OF module aliases
things will break. And since the DT bindings is an ABI, it's safer to have
"-i2c" and "-spi" compatible strings variants.
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
Powered by blists - more mailing lists