pwm_add_table(9)
π pwm_add_table(9) β the kernel API manual, bestie edition πΈ
Okay so real talk, this is pwm_add_table from the Kernel API Manual, and it's genuinely one of the most straightforward little functions ever. No cap. Let's get into it.
β¨ NAME β¨
pwm_add_table β register PWM device consumers π
Like, it takes a table of peeps who want a PWM device and makes them official. It's giving matchmaker energy, honestly.
π¦ SYNOPSIS π¦
void pwm_add_table (struct pwm_lookup *table , size_t num );
That's it. That's the whole signature. void return, so it doesn't even hand you back a status code β it just does the thing and dips. π
π ARGUMENTS π
tableβ array of consumers to register. Literally the guest list πβ¨numβ number of consumers intable. i.e. how many names are actually on that guest list, so bestie doesn't read past the end π
Both of these are yours to get right.numis not vibes-based β it's the count of entries intable, periodt.
π SEE ALSO π
Kernel file ./drivers/pwm/core.c β like, the source of truth, go read it, it's iconic:
pwm_round_waveform_might_sleep(9)pwm_get_waveform_might_sleep(9)pwm_set_waveform_might_sleep(9)pwm_apply_might_sleep(9)pwm_apply_atomic(9)pwm_get_state_hw(9)pwm_adjust_config(9)pwm_capture(9)pwm_request_from_chip(9)of_pwm_get(9)acpi_pwm_get(9)pwm_get(9)pwm_put(9)devm_pwm_get(9)devm_fwnode_pwm_get(9)__pwmchip_add(9)pwmchip_remove(9)pwm_remove_table(9)
Go off, honestly. The whole PWM family ate. π₯
And that's the tea, bestie π«Ά β this page lives in ./drivers/pwm, dated October 2026, and the manual name on the header up top was pwm_add_table(9). Mwah, bye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms