target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
static int aw9523_get_pin_direction(struct regmap *regmap, u8 pin, u8 n)
{
	int val, ret;

	ret = regmap_read(regmap, AW9523_REG_CONF_STATE(pin), &val);
	if (ret < 0)
		return ret;

	return (val & BIT(n)) == BIT(n);
}
/*
 * aw9523_get_pin_direction - Get pin direction
 * @regmap: Regmap structure
 * @pin: gpiolib pin number
 * @n:   pin index in port register
 *
 * Return: Pin direction for success or negative number for error
 */
Get pin direction
@regmap: Regmap structure
@pin: gpiolib pin number
@n:   pin index in port register

Pin direction for success or negative number for error
Get pin direction @regmap : Regmap structure @pin : gpiolib pin number @n : pin index in port register Pin direction for success or negative number for error
static int aw9523_get_pin_direction(struct regmap *regmap, u8 pin, u8 n)
{
	int val, ret;
	ret = regmap_read(regmap, AW9523_REG_CONF_STATE(pin), &val);
	if (ret < 0)
		return ret;
	return (val & BIT(n)) == BIT(n);
}
static int aw9523_get_pin_direction ( struct regmap * regmap , u8 pin , u8 n ) { int val , ret ; ret = regmap_read ( regmap , AW9523_REG_CONF_STATE ( pin ) , & val ) ; if ( ret < 0 ) return ret ; return ( val & BIT ( n ) ) == BIT ( n ) ; }
aw9523_get_pin_direction - Get pin direction
 @regmap: Regmap structure
 @pin: gpiolib pin number
 @n:   pin index in port register
aw9523_get_pin_direction - Get pin direction @regmap : Regmap structure @pin : gpiolib pin number @n : pin index in port register