linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Maxime Ripard" <maxime@cerno.tech>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Linux Fbdev development list" <linux-fbdev@vger.kernel.org>
Subject: Re: [PATCH v3 5/7] (WIP) drm/solomon: Add SSD130X OLED displays SPI support
Date: Wed, 9 Feb 2022 14:04:17 +0100	[thread overview]
Message-ID: <e6efb2fd-300e-5282-1f2e-a68130d0b45a@redhat.com> (raw)
In-Reply-To: <CAMuHMdWSDBjpYJv6JtgvyaKiFKh_eqbvH78TR6VBtpDeFJvqFQ@mail.gmail.com>

On 2/9/22 13:25, Geert Uytterhoeven wrote:
> Hi Javier,
> 
> On Wed, Feb 9, 2022 at 10:12 AM Javier Martinez Canillas
> <javierm@redhat.com> wrote:
>> The ssd130x driver only provides the core support for these devices but it
>> does not have any bus transport logic. Add a driver to interface over SPI.
>>
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> 
> Thanks for your patch!
> 
>> --- /dev/null
>> +++ b/drivers/gpu/drm/solomon/ssd130x-spi.c
> 
>> +static const struct of_device_id ssd130x_of_match[] = {
>> +       {
>> +               .compatible = "solomon,ssd1305fb-spi",
> 
> This needs an update to the DT bindings.

Yes, I know. Didn't feel like it, because the patch is a WIP anyways
(I haven't tested it but was included just for illustration purposes).

If someone confirms that works then I will include a proper DT binding
in the next revision.

> Hence this may be a good time to deprecate the existing
> "solomon,ssd130*fb-i2c" compatible values, and switch to
> "solomon,ssd130*fb" instead, for both I2C and SPI.

Is this the preferred approach ? Asking because most of the drivers I
know use this -$bus suffix. From a device <--> driver matching point
of view, shouldn't be an issue to have two different drivers to use
the same compatible strings, as long as these are for different buses.

Since AFAIK the match only happens within the same struct bus_type. But
I wonder if this could cause issues in other places, for example the
module loading. IIRC the OF modaliases don't include the device type.

If instead the drivers were old platform drivers and have an i2c_device_id
and spi_device_id tables, then using the same device name would not be an
issue due the modalias having a i2c: and spi: prefix to make a distinction.

What I think we should do is drop the "fb" part, since that seemed to me
that was included because it was an fbdev driver. And not really hardware
description.

> Of course the I2C subdriver still has to bind against the old values,
> too, for backwards compatibility.
>

Yes, agreed.
 
>> +               .data = (void *)&ssd130x_ssd1305_deviceinfo,
> 
> The casts are not needed.
>

Ok.

Best regards, -- 
Javier Martinez Canillas
Linux Engineering
Red Hat


  reply	other threads:[~2022-02-09 13:04 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  9:03 [PATCH v3 0/7] drm: Add driver for Solomon SSD130X OLED displays Javier Martinez Canillas
2022-02-09  9:03 ` [PATCH v3 1/7] drm/format-helper: Add drm_fb_xrgb8888_to_gray8_line() Javier Martinez Canillas
2022-02-09  9:03 ` [PATCH v3 2/7] drm/format-helper: Add drm_fb_{xrgb8888,gray8}_to_mono_reversed() Javier Martinez Canillas
2022-02-09 12:51   ` [PATCH v3 2/7] drm/format-helper: Add drm_fb_{xrgb8888, gray8}_to_mono_reversed() Thomas Zimmermann
2022-02-09 13:26     ` Javier Martinez Canillas
2022-02-09 15:21       ` Thomas Zimmermann
2022-02-09 15:30         ` Javier Martinez Canillas
2022-02-09  9:03 ` [PATCH v3 3/7] drm: Add driver for Solomon SSD130X OLED displays Javier Martinez Canillas
2022-02-09 13:43   ` Mark Brown
2022-02-09 14:17     ` Javier Martinez Canillas
2022-02-09 14:22       ` Mark Brown
2022-02-09 14:50         ` Javier Martinez Canillas
2022-02-09 15:03           ` Mark Brown
2022-02-09 15:17             ` Javier Martinez Canillas
2022-02-09 15:12   ` Andy Shevchenko
2022-02-09 15:54     ` Javier Martinez Canillas
2022-02-09 16:08       ` Andy Shevchenko
2022-02-09 16:26         ` Javier Martinez Canillas
2022-02-09 16:44           ` Andy Shevchenko
2022-02-11  8:54           ` Javier Martinez Canillas
2022-02-09  9:03 ` [PATCH v3 4/7] drm/solomon: Add SSD130X OLED displays I2C support Javier Martinez Canillas
2022-02-09 12:21   ` Geert Uytterhoeven
2022-02-09 12:41     ` Javier Martinez Canillas
2022-02-09 15:15   ` Andy Shevchenko
2022-02-09 16:05     ` Javier Martinez Canillas
2022-02-09  9:12 ` [PATCH v3 5/7] (WIP) drm/solomon: Add SSD130X OLED displays SPI support Javier Martinez Canillas
2022-02-09 12:25   ` Geert Uytterhoeven
2022-02-09 13:04     ` Javier Martinez Canillas [this message]
2022-02-09 15:19       ` Andy Shevchenko
2022-02-09 16:10         ` Javier Martinez Canillas
2022-02-09 15:17     ` Andy Shevchenko
2022-02-09 16:07       ` Javier Martinez Canillas
2022-02-09 16:25         ` Geert Uytterhoeven
2022-02-09 16:41           ` Andy Shevchenko
2022-02-09 17:04             ` Javier Martinez Canillas
2022-02-09 16:56           ` Javier Martinez Canillas
2022-02-09 16:40         ` Andy Shevchenko
2022-02-09 15:16   ` Andy Shevchenko
2022-02-09 16:05     ` Javier Martinez Canillas
2022-02-09  9:13 ` [PATCH v3 6/7] MAINTAINERS: Add entry for Solomon SSD130X OLED displays DRM driver Javier Martinez Canillas
2022-02-09  9:13 ` [PATCH v3 7/7] dt-bindings: display: ssd1307fb: Add myself as binding co-maintainer Javier Martinez Canillas
2022-02-09 12:19 ` [PATCH v3 0/7] drm: Add driver for Solomon SSD130X OLED displays Geert Uytterhoeven
2022-02-09 12:37   ` Javier Martinez Canillas
2022-02-11  8:45     ` Javier Martinez Canillas
2022-02-10 17:06   ` Geert Uytterhoeven
2022-02-10 17:55     ` Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6efb2fd-300e-5282-1f2e-a68130d0b45a@redhat.com \
    --to=javierm@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=noralf@tronnes.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).