mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Mark Gross <markgross@kernel.org>,
	Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
	Daniel Oliveira Nascimento <don@syst.com.br>,
	Mattia Dongili <malattia@linux.it>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] platform: olpc: mark SPI related data as maybe unused
Date: Thu, 16 Mar 2023 18:31:07 +0100	[thread overview]
Message-ID: <87o7osli1w.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <51d9b1de-5f22-2085-1d3e-6c29afb44120@redhat.com>

Hans de Goede <hdegoede@redhat.com> writes:

[...]

>>> Exposing modaliases for a non supported way of binding the driver does not really seem useful ?
>> 
>> However binding the device and module loading (uevent) uses sometimes
>> different pieces. Maybe something changed in kernel, but sometime ago
>> certain buses where sending uevent for module loading with one ID (e.g.
>> platform or spi bus) but device matching would be according to OF. Thus
>> if you did not have entries in spi_device_id, the module would not autoload.
>> 
>> It was exactly the case for example here:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c46ed2281bbe4b84e6f3d4bdfb0e4e9ab813fa9d&context=30&ignorews=0&dt=0
>> 
>> You needed spi_device_id for proper module autoloading.
>> 
>> Unless something change in between in the kernel?
>
> Looks like your right, the spi_uevent() code always emits "spi:xxxxxxx" style modalias even for dt/of enumerated devices:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi.c#n398
>
> So the table needs to stay.
>

Yeah, and in fact dropping the spi_device_id table will cause the kernel
to warn that an spi_device_id entry doesn't exist for a given of_device_id
entry since commit 5fa6863ba692 ("spi: Check we have a spi_device_id for
each DT compatible").

Fixing that is not trivial because a lot of drivers are rely on current
behaviour of the SPI core always returning a spi:<dev> modalias. So don't
even have an OF table, even when the SPI devices are instantiated by DT.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


      parent reply	other threads:[~2023-03-16 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12 13:26 Krzysztof Kozlowski
2023-03-12 13:26 ` [PATCH 2/3] platform: classmate: " Krzysztof Kozlowski
2023-03-16 15:14   ` Hans de Goede
2023-03-12 13:26 ` [PATCH 3/3] platform: sony: " Krzysztof Kozlowski
2023-03-16 12:50 ` [PATCH 1/3] platform: olpc: " Hans de Goede
2023-03-16 14:07   ` Krzysztof Kozlowski
2023-03-16 14:13     ` Hans de Goede
2023-03-16 14:17       ` Krzysztof Kozlowski
2023-03-16 17:31       ` Javier Martinez Canillas [this message]

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=87o7osli1w.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=cascardo@holoscopio.com \
    --cc=don@syst.com.br \
    --cc=hdegoede@redhat.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malattia@linux.it \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@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

all inboxes | Powered by JetHome®