/* struct mtk_pin_field - the structure that holds the information of the field * used to describe the attribute for the pin * @base: the index pointing to the entry in base address list * @offset: the register offset relative to the base address * @mask: the mask used to filter out the field from the register * @bitpos: the start bit relative to the register * @next: the indication that the field would be extended to the next register
*/ struct mtk_pin_field {
u8 index;
u32 offset;
u32 mask;
u8 bitpos;
u8 next;
};
/* struct mtk_pin_field_calc - the structure that holds the range providing * the guide used to look up the relevant field * @s_pin: the start pin within the range * @e_pin: the end pin within the range * @i_base: the index pointing to the entry in base address list * @s_addr: the start address for the range * @x_addrs: the address distance between two consecutive registers * within the range * @s_bit: the start bit for the first register within the range * @x_bits: the bit distance between two consecutive pins within * the range * @sz_reg: the size of bits in a register * @fixed: the consecutive pins share the same bits with the 1st * pin
*/ struct mtk_pin_field_calc {
u16 s_pin;
u16 e_pin;
u8 i_base;
u32 s_addr;
u8 x_addrs;
u8 s_bit;
u8 x_bits;
u8 sz_reg;
u8 fixed;
};
/** * struct mtk_pin_rsel - the structure that provides bias resistance selection. * @s_pin: the start pin within the rsel range * @e_pin: the end pin within the rsel range * @rsel_index: the rsel bias resistance index * @up_rsel: the pullup rsel bias resistance value * @down_rsel: the pulldown rsel bias resistance value
*/ struct mtk_pin_rsel {
u16 s_pin;
u16 e_pin;
u16 rsel_index;
u32 up_rsel;
u32 down_rsel;
};
/* struct mtk_pin_reg_calc - the structure that holds all ranges used to * determine which register the pin would make use of * for certain pin attribute. * @range: the start address for the range * @nranges: the number of items in the range
*/ struct mtk_pin_reg_calc { conststruct mtk_pin_field_calc *range; unsignedint nranges;
};
/** * struct mtk_func_desc - the structure that providing information * all the funcs for this pin * @name: the name of function * @muxval: the mux to the function
*/ struct mtk_func_desc { constchar *name;
u8 muxval;
};
/** * struct mtk_eint_desc - the structure that providing information * for eint data per pin * @eint_m: the eint mux for this pin * @eitn_n: the eint number for this pin
*/ struct mtk_eint_desc {
u16 eint_m;
u16 eint_n;
};
/** * struct mtk_pin_desc - the structure that providing information * for each pin of chips * @number: unique pin number from the global pin number space * @name: name for this pin * @eint: the eint data for this pin * @drv_n: the index with the driving group * @funcs: all available functions for this pins (only used in * those drivers compatible to pinctrl-mtk-common.c-like * ones)
*/ struct mtk_pin_desc { unsignedint number; constchar *name; struct mtk_eint_desc eint;
u8 drv_n; struct mtk_func_desc *funcs;
};
int mtk_hw_set_value(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, int field, int value); int mtk_hw_get_value(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, int field, int *value);
int mtk_build_eint(struct mtk_pinctrl *hw, struct platform_device *pdev);
int mtk_pinconf_bias_disable_set(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc); int mtk_pinconf_bias_disable_get(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, int *res); int mtk_pinconf_bias_set(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, bool pullup); int mtk_pinconf_bias_get(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, bool pullup, int *res);
int mtk_pinconf_bias_disable_set_rev1(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc); int mtk_pinconf_bias_disable_get_rev1(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, int *res); int mtk_pinconf_bias_set_rev1(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, bool pullup); int mtk_pinconf_bias_get_rev1(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, bool pullup, int *res); int mtk_pinconf_bias_set_combo(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc,
u32 pullup, u32 enable); int mtk_pinconf_bias_get_combo(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc,
u32 *pullup, u32 *enable);
int mtk_pinconf_drive_set(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, u32 arg); int mtk_pinconf_drive_get(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, int *val);
int mtk_pinconf_drive_set_rev1(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, u32 arg); int mtk_pinconf_drive_get_rev1(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, int *val);
int mtk_pinconf_drive_set_raw(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, u32 arg); int mtk_pinconf_drive_get_raw(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, int *val);
int mtk_pinconf_adv_pull_set(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, bool pullup,
u32 arg); int mtk_pinconf_adv_pull_get(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, bool pullup,
u32 *val); int mtk_pinconf_adv_drive_set(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, u32 arg); int mtk_pinconf_adv_drive_get(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, u32 *val); int mtk_pinconf_adv_drive_set_raw(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, u32 arg); int mtk_pinconf_adv_drive_get_raw(struct mtk_pinctrl *hw, conststruct mtk_pin_desc *desc, u32 *val);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.