Re: [PATCH] i2c: i2c-gpio: fix some of gpio sleep issues

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 27/03/15 17:46, Wolfram Sang wrote:
> On Tue, Mar 17, 2015 at 12:04:29PM +0000, Ben Dooks wrote:
>> The i2c-gpio driver can be used in systems where the GPIO itself
>> is provided by a GPIO driver that may be sleeping (for example,
>> SPI or USB). In this case, it is preferable to use the
>> _cansleep() variants of the GPIO code.
>> 
>> We can only fix this up for the case where the i2c-gpio
>> implementation provides open-drain outputs as there are no
>> gpio_direction_xxx_cansleep() provided.
>> 
>> This removes the issues on the customer system with the console
>> constantly showing the following warning:
>> 
>> WARNING: CPU: 0 PID: 1 at drivers/gpio/gpiolib.c:2389
>> gpiod_set_raw_value
> 
> ??? It will silence a warning but will totally break the timing in
> case sleeping is needed? I'd think the warning is very suitable.

This basically causes our system to fail to boot in any suitable time.

The problem is that the i2c bus is on the end of an SPI bus which means
that the identification EEPROM tests and other items read from it will
run through a gpio chip that is marked as 'can sleep'.

I don't have the exact times, but I got bored after the first thirty
seconds of these log messages and immediately patched them out of the
kernel.

- -- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVN15rAAoJEMuhVOkVU3uzkpkIALMkbTRYitWe9fgeG1hLTj0h
cTXO9bomIz1t9nZayRXnQKwgbP6Nlgi+QeNHO63BaKtNVTJBue5+f0oLw5ciJW4v
tD2lzcLWPioaZWlhjlgi1AVwC3yD9X7C7EKPuDgwqoblqW5o1UkwUGHKGk85Bueu
IrnC9ce0X56wRuyuRt/ixZwBivsW4APJsNePVebZMKnd1ISrSCDrjJEXQNdhbMjy
5hknHP7x64lMET+bqVvsPwkY1I485Xo8jPSwdzrsQrF4/qSHjou5U8EwIwRWnAf1
fprqYMVY6eN8e8z2T+LdqMOrh4Eb5R0sbmil58LmehttjR+9/KT0Iz28alULp/M=
=mUTb
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux