ChanServ changed the topic of #armlinux to: ARM kernel talk [Upstream kernel, find your vendor forums for questions about their kernels] | https://libera.irclog.whitequark.org/armlinux
iivanov has quit [Ping timeout: 264 seconds]
System_Error has quit [Remote host closed the connection]
System_Error has joined #armlinux
nsaenz has quit [Remote host closed the connection]
Nact has quit [Ping timeout: 245 seconds]
alpernebbi has quit [Remote host closed the connection]
alpernebbi has joined #armlinux
apritzel_ has quit [Ping timeout: 264 seconds]
mripard has quit [Ping timeout: 260 seconds]
mripard has joined #armlinux
tudorel has joined #armlinux
iivanov has joined #armlinux
Pali has joined #armlinux
tre has joined #armlinux
djrscally has joined #armlinux
apritzel_ has joined #armlinux
sszy has joined #armlinux
iivanov has quit [Remote host closed the connection]
matthias_bgg has quit [Read error: Connection reset by peer]
iivanov has joined #armlinux
matthias_bgg has joined #armlinux
elastic_dog has quit [Ping timeout: 268 seconds]
elastic_dog has joined #armlinux
nsaenz has joined #armlinux
_whitelogger has quit [Ping timeout: 264 seconds]
_whitelogger has joined #armlinux
Turingtoast has joined #armlinux
EdFletcher has joined #armlinux
Turingtoast has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
apritzel_ has quit [Ping timeout: 256 seconds]
prabhakarlad has joined #armlinux
ardb has quit [Ping timeout: 260 seconds]
ardb has joined #armlinux
apritzel_ has joined #armlinux
tudorel has quit [Quit: tudorel]
iivanov has quit [Ping timeout: 260 seconds]
iivanov has joined #armlinux
iivanov__ has joined #armlinux
iivanov has quit [Read error: Connection reset by peer]
iivanov has joined #armlinux
iivanov__ has quit [Ping timeout: 268 seconds]
iivanov__ has joined #armlinux
iivanov has quit [Ping timeout: 256 seconds]
prabhakarlad has quit [Quit: Client closed]
prabhakarlad has joined #armlinux
iivanov__ has quit [Read error: Connection reset by peer]
torez has joined #armlinux
iivanov has joined #armlinux
iivanov has quit [Client Quit]
iivanov has joined #armlinux
iivanov__ has joined #armlinux
iivanov has quit [Ping timeout: 268 seconds]
torez has quit [Ping timeout: 268 seconds]
tudorel has joined #armlinux
torez has joined #armlinux
iivanov__ has quit [Read error: Connection reset by peer]
iivanov has joined #armlinux
Amit_T has joined #armlinux
amitk has quit [Ping timeout: 268 seconds]
amitk has joined #armlinux
amitk has quit [Ping timeout: 264 seconds]
amitk has joined #armlinux
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
torez has quit [Ping timeout: 240 seconds]
tre has quit [Remote host closed the connection]
bps has quit [Ping timeout: 265 seconds]
matthias_bgg has quit [Ping timeout: 268 seconds]
XV8 has joined #armlinux
<rfs613> everyone is probably tired of talking about it... but I'm still puzzled what is the benefit of havint a (potential large) list of compatible strings in spidev.c, for "devices" which exist only in userspace-code.
torez has joined #armlinux
<rfs613> I know the "DT should describe hardware" argument... but much like the "Device tree as stable ABI" discussion from years back, I think the long-term reality ends up trumping ideals in some cases.
<mripard> rfs613: one of the issue is the DT is also used by other OSes, and the driver set can be different
<mripard> and this is also true with future version of Linux, where a device that used to be dealt with by a userspace driver has now a kernel space driver
<mripard> broonie also mentioned something important yesterday: how to you identify the device from the userspace side in the first place?
<mripard> sure, having a spidev compatible would be convenient, hacks can be convenient
<rfs613> for the case of future driver being in kernel, the compatible string would need to change at that point. To me at least that seems reasonable expectation, it's a differnet driver.
<mripard> not really?
<jn> (to which the lazy answer is: pick the first of /dev/spi*)
<jn> how does userspace find a spi device with a specific compatible string?
<mripard> rfs613: there's plenty of unsupported devices in U-Boot or FreeBSD that are listed in the DT, should we expect a different compatible as soon as they support it?
<rfs613> for broonie's point, yes, userspace tends to hardcode the /dev/spi* values (sometimes it has a config file, but usually only after getting burned by changes like spidev32768 -> spi0
milkylainen has joined #armlinux
torez has quit [Ping timeout: 264 seconds]
matthias_bgg has joined #armlinux
<broonie> mripard: you should be able to figure things out from the compatible information in sysfs (though it’s a bunch of hassle).
<rfs613> mripard: does uboot actually need to talk to the hardware behind spidev? It's rather unlikely, there's no real way to run userspace code in u-boot.
<mripard> rfs613: I mean, why not? It's still a device that needs to be driven. There's no userspace, so it can
<rfs613> mripard: for other OSes... maybe... but with the current proposal, the potentiall larger list of compat strings now needs to get synchronised with FreeBSD and whatever else...
bps has joined #armlinux
bps has quit [Changing host]
bps has joined #armlinux
<rfs613> mripard: hrm, without userspace code, spidev doesn't do much (other than occupy kernel pages...)
<mripard> rfs613: it's not really what I'm talking about. where the driver is also depends on the OS/firmware state, right? So why a device handled by a userspace driver through spidev in Linux couldn't be handled by an actual firmware/kernel-space driver in other projects such as U-Boot?
<mripard> and similarly, why wouldn't a device supported through spidev in linux 5.16 couldn't be supported by a kernel space driver in Linux 6.12 ?
<rfs613> mripard: yes, that totally could be the case - and to distinguish these, something needs to change, andI would argue that you use "spidev" as the compat string in one case, and a real name (vendor,device) for a real driver.
<mripard> if you used a proper binding from the beginning, nothing would have to change
<mripard> and it could be shared across all projects, no matter what devices they actually support
<mripard> which is the entire point of the DT?
torez has joined #armlinux
<rfs613> let me ponder it over lunch...
XV8 has quit [Quit: Textual IRC Client: www.textualapp.com]
Tokamak has quit [Read error: Connection reset by peer]
bps has quit [Ping timeout: 264 seconds]
Tokamak has joined #armlinux
bps has joined #armlinux
bps has joined #armlinux
bps has quit [Changing host]
bps has quit [Ping timeout: 256 seconds]
tudorel has quit [Quit: tudorel]
apritzel_ has quit [Ping timeout: 260 seconds]
bps has joined #armlinux
matthias_bgg has quit [Quit: Leaving]
Amit_T has quit [Ping timeout: 260 seconds]
<rfs613> to me, there is value in being able to distinguish whether the driver is in-kernel nor not (eg. userspace). They are different drivers, so they should have differnet compatible strings.
<rfs613> if Linux 6.12 gets a built-in driver, it will almost certainly not be drop-in compatible with the userspace one. The kernel one might have sysfs interface, or something else - in any case very different from userspace C code that talks the "spidev API"
<rfs613> and whatever userspace code would need to be change to talk to the in-kernel driver.
<rfs613> stepping back one level, I think the issue is that spidev (and UIO) are both more of an "interface" or "conduit" rather than an actual driver in the kernel sense. But we do fit them into the regular kernel driver framework, and so they must have some kind of device tree / platform / ACPI hook.
Tokamak has quit [Read error: Connection reset by peer]
Tokamak has joined #armlinux
ardb has quit [Quit: Leaving.]
EdFletcher has quit [Quit: Quit.]
EdFletcher has joined #armlinux
EdFletcher has quit [Client Quit]
apritzel_ has joined #armlinux
<rfs613> having "proper" names is a laudible goal, and I like the idea of having one DT, and letting the whatever linux/freebsd/etc find a driver for the hardware based on the compatible string.
<rfs613> but it is also quite common, esp during development, to only have the SPI controller, and "some" device(s) attached, it might change during board spins, the exact way the device needs to be setup evolves. Often it is just a matter of poking a few magic registers at startup, and doing this from userspace is far easier and simpler than writing a full kernel driver.
iivanov has quit [Quit: Leaving...]
<rfs613> so having a simple way to support the latter case is useful, just like writing userspace code to talk to some hardware via UIO is often a safer choice (you've seen the kind of code that gets written by hardware-folks?!?)
bps has quit [Ping timeout: 268 seconds]
torez has quit [Quit: torez]
bps has joined #armlinux
bps has joined #armlinux
bps has quit [Changing host]
bps has quit [Ping timeout: 268 seconds]
djrscally has quit [Quit: Konversation terminated!]
djrscally has joined #armlinux
<broonie> rfs613: the whole point with not putting spidev in the DT is that you can just do whatever makes sense at runtime, you’ve not baked in decisions that are specific to what you’re doing right now.
<broonie> You can change for a completely different software stack and not have to adjust the board description at all.
<javierm> rfs613: the user-space driver could just bind to spidev using the driver_override and bind sysfs entries
<javierm> as long as it uses whatever device is driving in the compatible string. That's a sensible thing to ask