linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frieder Schrempf <frieder.schrempf@kontron.de>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH] spi: spidev: Add compatible for external SPI ports on Kontron boards
Date: Mon, 13 Jul 2020 15:19:52 +0200	[thread overview]
Message-ID: <a5b88ad9-3884-1d9c-c4ad-057266f84261@kontron.de> (raw)
In-Reply-To: <479d566a-213f-4e33-8ac7-7637ae88e31c@kontron.de>

On 02.07.20 18:24, Frieder Schrempf wrote:
> On 02.07.20 17:07, Mark Brown wrote:
>> On Thu, Jul 02, 2020 at 04:46:09PM +0200, Frieder Schrempf wrote:
>>
>>> My intention is to use the spidev driver in the default board DT for an
>>> interface that is routed to an extension connector and has no dedicated
>>> slave device attached onboard. So users can attach sensors, etc. with
>>> userspace drivers without touching the kernel or DT.
>>
>> The expected way of doing this is to describe whatever was attached via
>> DT when it's attached - the device is what has the compatible, not some
>> connector in the middle of the connection.  The way you've got things
>> set up if the device has a driver then they won't be able to instantiate
>> the driver.
> 
> Ok thanks, got it. I will remove the spi device from the board DT and 
> use an overlay if required. Now I got a reason to learn writing DT 
> overlays ;)

I need to come back to this for another question. I would very much like 
to do it the way Mark described it above: Use a DT overlay to describe 
the device and load this overlay when the device is attached.

But if I get this correctly it requires me to write a specific driver 
that handles the loading of the overlay, which is way too much overhead 
for the simple issue I'm trying to solve.

I would have expected that there is some kind of existing userspace API 
to load an overlay manually, but it seems like there isn't!?

So what's the reasoning behind this? How can I solve this in a 
mainline-compliant way, meaning without either keeping downstream 
patches to bind spidev to my device or writing and maintaining code that 
does the overlay loading?

  reply	other threads:[~2020-07-13 13:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 14:18 [PATCH] spi: spidev: Add compatible for external SPI ports on Kontron boards Schrempf Frieder
2020-07-02 14:25 ` Mark Brown
2020-07-02 14:46   ` Frieder Schrempf
2020-07-02 14:57     ` Geert Uytterhoeven
2020-07-02 16:04       ` Frieder Schrempf
2020-07-02 15:07     ` Mark Brown
2020-07-02 16:24       ` Frieder Schrempf
2020-07-13 13:19         ` Frieder Schrempf [this message]
2020-07-13 15:11           ` Mark Brown
2020-07-14  8:54             ` Frieder Schrempf
2020-07-14 19:29               ` Mark Brown
2020-07-15  7:26                 ` Frieder Schrempf
2020-07-15 11:36                   ` Mark Brown
2020-07-15 11:45                     ` Frieder Schrempf
2020-07-15 13:10                       ` Mark Brown
2020-07-15 13:48                         ` Frieder Schrempf
2020-07-15 13:51                           ` Mark Brown
2020-07-15 19:06             ` Geert Uytterhoeven
2020-07-16  7:53               ` Frieder Schrempf

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=a5b88ad9-3884-1d9c-c4ad-057266f84261@kontron.de \
    --to=frieder.schrempf@kontron.de \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@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).