Re: [PATCH 3/6] i2c: add 'set_sda' to bus_recovery_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +                       if (gpiod_get_direction(bri->sda_gpiod) == GPIOF_DIR_OUT)
> > +                               bri->set_sda = set_sda_gpio_value;
> 
> Just compare it to zero. if (!gpiod_get_direction())

So, this?

	if (!gpiod_get_direction())
		bri->set_sda = set_sda_gpio_value;

That looks like "if i couldn't the direction, then...", or?

Comparing to plain numbers feels like magic values?

Maybe this should be named 'gpiod_is_direction_input()'?

Or?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux