From: Daniel Thompson <daniel.thompson@linaro.org>
To: Mark Brown <broonie@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] backlight: hx8357: Add SPI device ID table
Date: Mon, 27 Sep 2021 10:42:00 +0100 [thread overview]
Message-ID: <20210927094200.a7d73sl2k4x5xjch@maple.lan> (raw)
In-Reply-To: <20210922151014.49719-1-broonie@kernel.org>
On Wed, Sep 22, 2021 at 04:10:14PM +0100, Mark Brown wrote:
> Currently autoloading for SPI devices does not use the DT ID table, it uses
> SPI modalises. Supporting OF modalises is going to be difficult if not
> impractical, an attempt was made but has been reverted, so ensure that
> module autoloading works for this driver by adding a SPI device ID table.
>
> Fixes: 96c8395e2166 ("spi: Revert modalias changes")
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> drivers/video/backlight/hx8357.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c
> index 9b50bc96e00f..c64b1fbe027f 100644
> --- a/drivers/video/backlight/hx8357.c
> +++ b/drivers/video/backlight/hx8357.c
> @@ -565,6 +565,19 @@ static struct lcd_ops hx8357_ops = {
> .get_power = hx8357_get_power,
> };
>
> +static const struct spi_device_id hx8357_spi_ids[] = {
> + {
> + .name = "hx8357",
> + .driver_data = (kernel_ulong_t)hx8357_lcd_init,
Based on this I had expected to find spi_get_device_id() and a ->driver_data
somewhere in this patch.
Where will this .driver_data be consumed?
Daniel.
> + },
> + {
> + .name = "hx8369",
> + .driver_data = (kernel_ulong_t)hx8369_lcd_init,
> + },
> + {},
> +};
> +MODULE_DEVICE_TABLE(spi, hx8357_spi_ids);
> +
> static const struct of_device_id hx8357_dt_ids[] = {
> {
> .compatible = "himax,hx8357",
> @@ -672,6 +685,7 @@ static struct spi_driver hx8357_driver = {
> .name = "hx8357",
> .of_match_table = hx8357_dt_ids,
> },
> + .id_table = hx8357_spi_ids,
> };
>
> module_spi_driver(hx8357_driver);
> --
> 2.20.1
>
next prev parent reply other threads:[~2021-09-27 9:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 15:10 [PATCH] backlight: hx8357: Add SPI device ID table Mark Brown
2021-09-27 9:42 ` Daniel Thompson [this message]
2021-09-27 11:47 ` Mark Brown
2021-09-27 13:24 ` Daniel Thompson
2021-09-27 13:30 ` Mark Brown
2021-10-01 14:20 ` Daniel Thompson
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=20210927094200.a7d73sl2k4x5xjch@maple.lan \
--to=daniel.thompson@linaro.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.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).