/* * The HALL input pin can only be used as input. If this is the pin * we are dealing with - then we are done
*/ if (offset == HALL_GPIO_OFFSET) return 0;
if (offset == HALL_GPIO_OFFSET)
ret = regmap_read(bdgpio->regmap, BD71828_REG_IO_STAT,
&val); else
ret = regmap_read(bdgpio->regmap, GPIO_OUT_REG(offset),
&val); if (!ret)
ret = (val & BD71828_GPIO_OUT_MASK);
staticint bd71828_get_direction(struct gpio_chip *chip, unsignedint offset)
{ /* * Pin usage is selected by OTP data. We can't read it runtime. Hence * we trust that if the pin is not excluded by "gpio-reserved-ranges" * the OTP configuration is set to OUT. (Other pins but HALL input pin * on BD71828 can't really be used for general purpose input - input * states are used for specific cases like regulator control or * PMIC_ON_REQ.
*/ if (offset == HALL_GPIO_OFFSET) return GPIO_LINE_DIRECTION_IN;
/* * See if we need some implementation to mark some PINs as * not controllable based on DT info or if core can handle * "gpio-reserved-ranges" and exclude them from control
*/
bdgpio->gpio.ngpio = 4;
bdgpio->regmap = dev_get_regmap(dev->parent, NULL); if (!bdgpio->regmap) return -ENODEV;
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.