Re: [PATCH 2/4] gpio: Introduce ->get_multiple callback

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

 



On Thu, Aug 31, 2017 at 5:46 PM, Lukas Wunner <lukas@xxxxxxxxx> wrote:
> On Thu, Aug 31, 2017 at 03:48:15PM +0200, Linus Walleij wrote:
>> On Sun, Aug 27, 2017 at 7:34 PM, Lukas Wunner <lukas@xxxxxxxxx> wrote:
>> > At least with SPI-attached GPIO controllers, the transmission is never
>> > guaranteed to succeed, so errors can occur both for input and output
>> > GPIOs.  The MAX3191x is input-only and does pass SPI errors back to
>> > the caller.  Output drivers such as gpio-74x164.c silently ignore
>> > SPI errors, which is arguably a problem.
>>
>> This has historical reasons.
>
> Would you generally be open for allowing errors to be returned from
> the set functions as well?

Yes if we can make a series fixing the fallout.

>  The Revolution Pi uses SPI-attached
> digital outputs and knowing if access to them fails would be useful.

True.

> For consumers, switching the return value from void to int shouldn't
> cause any fallout.  They just don't check the return value initially.

Indeed.

> However the ->set and ->set_multiple callbacks in all the GPIO drivers
> would need to be changed, that's where the real work is.

Yeah :/

But there are not so many of them, luckily.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux