STRUCT HTC_EGPIO_CHIP(9)
π struct htc_egpio_chip(9) β from the Kernel API Manual, bestie
okay so picture this: it's struct htc_egpio_chip, and it's literally just a lil descriptor babe whose whole job is to help create a gpio_chip for a register range. that's the name section, we ate that β¨
πΈ SYNOPSIS πΈ
here's the whole vibe, character for character, no notes:
struct htc_egpio_chip {
int reg_start;
int gpio_base;
int num_gpios;
unsigned long direction;
unsigned long initial_values;
};
(note the closing brace indented by one space β that's canon, that's the original, leave her alone π)
π¦ Members π¦
so like, one by one, here's who's who in this struct:
reg_startβ the index of the first register. like the front door of the register range πͺgpio_baseβ the gpio number of the first pin in this register range. the origin story of your pins β¨num_gpiosβ how many gpios live in this register range, maxBITS_PER_LONGβ and lowkey the important math:number of registers = DIV_ROUND_UP(num_gpios, reg_width). do NOT forget the formula, it's giving main character energy π₯directionβ a bitfield, where'0'= input and'1'= output, π«
side note bestie: initial_values is right there in the struct too β the Members list in this page just doesn't say anything more about it, so i'm not gonna make stuff up π
β¨ SEE ALSO β¨
- Kernel file
./include/linux/platform_data/gpio-htc-egpio.h struct htc_egpio_platform_data(9)β go read that one next, iykyk π«Ά
and that's the whole page, no cap π huge shoutout to the source ./include/linux/platform_data and the date stamp October 2026 β this page is brought to you by the kernel, the letter struct, and the number BITS_PER_LONG. mwah π periodt π
π¦ 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