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
<broonie> CounterPillow: There's some media drivers IIRC, and they were originally added for the R-Car audio drivers.
d1rg3_ has quit [Ping timeout: 248 seconds]
<CounterPillow> I'll look into the R-Car audio drivers and check if I like what I see, for now I've gone with the usual macro approach.
<broonie> They were added to cope with some IPs which are software compatible between versions but randomly rearranged the field layout between revisions, if you don't have that specific problem then you're probably better off with just using update_bits() directly.
<CounterPillow> Ah, that explains it
<broonie> One issue with fields is that they make it much harder to update multiple fields in a single write, if you're on a slow bus like I2C or performance critical that'll hurt.
<CounterPillow> Yeah I did notice that similar registers but with some permutations between variants is the only real usecase I could think of where they'd make sense
<CounterPillow> I was hoping there was some abstraction in the kernel that'd let me describe bitfield register accesses in a more declarative way so I can have things like "this value is too large" or "this value is not in this set of values" checked statically, but I assume the limitation here is C
<broonie> Hrm, we could probably make update_bits() detect if you overflow the mask and warn on it (or have a mode for that anyway).
<broonie> regmap doesn't have a concept of enums so that'd need an API extension.
<CounterPillow> Another thing I was hoping to look into is some way we can generalise the "this register has a write-enable mask in the upper 16 bits" thing Rockchip likes to do, see `rg -A1 '#define\s+HIWORD_UPDATE\('` for all the duplicated macros to deal with that
<CounterPillow> that they all have slightly different semantics doesn't help either :V
<broonie> That sounds like a sensible thing to add an API for. There are a bunch of drivers that just set a "do the write" bit in their caches.
<broonie> But that only works where it's just a simple thing you can cache in the same register.
<CounterPillow> I'm also not entirely sure whether I should even use a regmap for the PWM driver I'm writing. As I understand it, the big benefit of regmap is the caching so that accesses don't just wait for the bus. But with PWM, when writes take effect is critical enough that this hardware actually has values you write to certain registers only take effect after you toggle a bit in a control register, so I'm not sure if another layer inbetween is a
<CounterPillow> good idea.
mraynal has quit [Remote host closed the connection]
mraynal has joined #armlinux
apritzel has quit [Ping timeout: 245 seconds]
d1rg3_ has joined #armlinux
psydroid has quit [Read error: Connection reset by peer]
d1rg3_ has quit [Ping timeout: 272 seconds]
jclsn has quit [Ping timeout: 272 seconds]
jclsn has joined #armlinux
u0_a567 has joined #armlinux
<u0_a567> Ay i arrived at armlinux
u0_a567 has quit [Quit: WeeChat 4.5.2]
heat has joined #armlinux
heat has quit [Ping timeout: 272 seconds]
heat has joined #armlinux
markussp has quit [Ping timeout: 244 seconds]
psydroid has joined #armlinux
markussp has joined #armlinux
System_Error has quit [Remote host closed the connection]
System_Error has joined #armlinux
Saalim has quit [Ping timeout: 272 seconds]
balrog has quit [Ping timeout: 248 seconds]
balrog has joined #armlinux
d1rg3_ has joined #armlinux
apritzel has joined #armlinux
heat has quit [Ping timeout: 252 seconds]
suihkulokki has joined #armlinux
Saalim has joined #armlinux
Saalim has quit [Ping timeout: 248 seconds]
Saalim has joined #armlinux
Saalim has quit [Ping timeout: 252 seconds]
Saalim has joined #armlinux
apritzel has quit [Ping timeout: 260 seconds]
headless has joined #armlinux
LCWchat has joined #armlinux
<LCWchat> Hello
LCWchat has left #armlinux [WeeChat 4.5.2]
mriesch_ has joined #armlinux
headless has quit [Quit: Konversation terminated!]
mriesch has quit [Ping timeout: 252 seconds]
cbeznea_ has joined #armlinux
mriesch_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mriesch has joined #armlinux
apritzel has joined #armlinux
d1rg3_ has quit [Ping timeout: 260 seconds]
apritzel has quit [Ping timeout: 265 seconds]
prabhakalad has quit [Ping timeout: 265 seconds]
heat has joined #armlinux
gclement has quit [Ping timeout: 265 seconds]
prabhakalad has joined #armlinux
heat_ has joined #armlinux
heat has quit [Read error: Connection reset by peer]
Forty-Bot has joined #armlinux
d1rg3_ has joined #armlinux
apritzel has joined #armlinux
headless has joined #armlinux
apritzel has quit [Ping timeout: 260 seconds]
heat_ has quit [Read error: Connection reset by peer]
heat_ has joined #armlinux
headless has quit [Quit: Konversation terminated!]
bjoto` has joined #armlinux
bjoto has quit [Ping timeout: 244 seconds]
MyNetAz has quit [Remote host closed the connection]
MyNetAz has joined #armlinux
gclement has joined #armlinux
bjoto`` has joined #armlinux
bjoto` has quit [Ping timeout: 272 seconds]
cbeznea_ has quit [Ping timeout: 268 seconds]
apritzel has joined #armlinux
nsaenz_ has quit [Remote host closed the connection]
nsaenz has joined #armlinux
gclement has quit [Quit: Leaving.]
jclsn has quit [Quit: WeeChat 4.5.1]
tlwoerner has quit [Ping timeout: 260 seconds]
tlwoerner has joined #armlinux
jclsn has joined #armlinux
psydroid has quit [Quit: KVIrc 5.2.6 Quasar http://www.kvirc.net/]