watchdog_init_timeout(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… watchdog_init_timeout(9)

okay so this is a page from the Kernel API Manual β€” yes bestie, the kernel has lore too β€” and it's all about watchdog_init_timeout, which lowkey just sets up the timeout field for you. cute, right? 🐢✨


🌸 NAME 🌸

watchdog_init_timeout β€” literally just initialize the timeout field. that's the whole job. iconic of it, honestly. πŸ’–


✨ SYNOPSIS ✨

int watchdog_init_timeout (struct watchdog_device *wdd , unsigned int
timeout_parm , const struct device *dev );

so you're calling it with three things and it hands you back an int. slay. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • wdd β€” the watchdog device itself. the main character of this whole situation. πŸ‘‘
  • timeout_parm β€” the timeout module parameter. think of it as the "what the user asked for" option. ⭐
  • dev β€” the device that stores the timeout-sec property. that's where the backup answer lives. πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe check: this function initializes the timeout field of the watchdog_device struct, and it's got two sources to pull from. πŸ’…

it takes either:

  • the timeout module parameter β€” but only if it's a valid value, or
  • the timeout-sec property β€” but only if that's a valid value and timeout_parm is out of bounds.

and if neither of them is valid? then we just keep the old value. and ngl that old value should normally be the default timeout value, so it all works out. 🧚

⚠️ heads up bestie β€” for the module parameter, '0' means it should simply be dropped if you want to use the default value. that's just how it is. don't come for me, i don't make the rules. πŸ’€

return-wise: a zero comes back on success, or -EINVAL if literally all the provided values are out of bounds. not me getting rejected by every single validation check πŸ˜­πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

all of these are absolutely part of the watchdog cinematic universe πŸŒˆπŸ‘‘


and that's the whole page, bestie! 🌸 this masterpiece lives under ./drivers/watchdog and it's dated October 2026 β€” so yeah, future vibes fr fr. go forth and initialize those timeouts πŸ’–πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from