* I2C: can't detect Adafruit Mini I2C Gamepad on Linux - other devices detected
@ 2025-04-11 5:21 Michael Opdenacker
2025-04-11 15:44 ` Michael Opdenacker
0 siblings, 1 reply; 5+ messages in thread
From: Michael Opdenacker @ 2025-04-11 5:21 UTC (permalink / raw)
To: Anshul Dalal; +Cc: michael.opdenacker, linux-input, linux-i2c
Hi Anshul
I contact you as the maintainer for the Adafruit Mini I2C Gamepad driver.
I'm trying to use the Adafruit Seesaw I2C gamepad in my embedded Linux
training courses, to demonstrate driving I2C hardware, and the gamepad
would be perfect to play an ASCII Pac-Man clone
(https://github.com/michaelopdenacker/myman
<https://github.com/michaelopdenacker/myman>).
Even before your driver is loaded, the device has to be detected. My
problem is the gamepad is never detected on Linux (running "i2cdetect -r
<num>"), while other I2C devices connected to the same bus are, proving
that the bus is correctly enabled. This happens on all these boards
running recent kernels:
- BeaglePlay (Linux 6.14.2!)
- BeagleBone Black
- Raspberry Pi5
I double checked my gamepads (I have 4 of them) and wires: they work
fine on Arduino Uno.
Any clue why none of my 4 gamepads are never detected while two other
types of I2C devices are detected on the same bus, and the same gamepads
work on Arduino Uno?
Maybe something stupid but I'm running out of clues...
You can also have a look at the questions I asked on the Adafruit forums
and the pictures I shared:
https://forums.adafruit.com/viewtopic.php?p=1052577#p1052577
Cheers
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I2C: can't detect Adafruit Mini I2C Gamepad on Linux - other devices detected
2025-04-11 5:21 I2C: can't detect Adafruit Mini I2C Gamepad on Linux - other devices detected Michael Opdenacker
@ 2025-04-11 15:44 ` Michael Opdenacker
2025-04-11 15:57 ` Wolfram Sang
0 siblings, 1 reply; 5+ messages in thread
From: Michael Opdenacker @ 2025-04-11 15:44 UTC (permalink / raw)
To: Anshul Dalal; +Cc: michael.opdenacker, linux-input, linux-i2c
Greetings
On 4/11/25 07:21, Michael Opdenacker wrote:
> Hi Anshul
>
> I contact you as the maintainer for the Adafruit Mini I2C Gamepad driver.
>
> I'm trying to use the Adafruit Seesaw I2C gamepad in my embedded Linux
> training courses, to demonstrate driving I2C hardware, and the gamepad
> would be perfect to play an ASCII Pac-Man clone
> (https://github.com/michaelopdenacker/myman
> <https://github.com/michaelopdenacker/myman>).
>
> Even before your driver is loaded, the device has to be detected. My
> problem is the gamepad is never detected on Linux (running "i2cdetect
> -r <num>"), while other I2C devices connected to the same bus are,
> proving that the bus is correctly enabled. This happens on all these
> boards running recent kernels:
> - BeaglePlay (Linux 6.14.2!)
> - BeagleBone Black
> - Raspberry Pi5
>
> I double checked my gamepads (I have 4 of them) and wires: they work
> fine on Arduino Uno.
>
> Any clue why none of my 4 gamepads are never detected while two other
> types of I2C devices are detected on the same bus, and the same
> gamepads work on Arduino Uno?
Some progress here... On BeaglePlay, which is my primary target, I
realized that if I declare the device in the device tree AND load the
driver for the device, then the device seems to work fine. When I press
the buttons, I get data in /dev/input/event<x>.
Plus "i2cdetect -r <num>" shows the device as UU for address 0x50, as
usually happens with a driver is loaded.
I thought that connected I2C devices always showed in i2cdetect output,
whether they are declared in the device tree and have a driver or not.
Cheers
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I2C: can't detect Adafruit Mini I2C Gamepad on Linux - other devices detected
2025-04-11 15:44 ` Michael Opdenacker
@ 2025-04-11 15:57 ` Wolfram Sang
2025-04-11 17:34 ` Michael Opdenacker
0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2025-04-11 15:57 UTC (permalink / raw)
To: Michael Opdenacker; +Cc: Anshul Dalal, linux-input, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
> Plus "i2cdetect -r <num>" shows the device as UU for address 0x50, as
> usually happens with a driver is loaded.
Always. The address is blocked for userspace in any case.
> I thought that connected I2C devices always showed in i2cdetect output,
> whether they are declared in the device tree and have a driver or not.
This is a valid expectation. Since you used 'i2cdetect -r', it means
that the device does not react to the read_byte method. Very strange (if
not even against the specs). Did you try without '-r' to use
SMBUS_QUICK? What driver are we talking about anyhow?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I2C: can't detect Adafruit Mini I2C Gamepad on Linux - other devices detected
2025-04-11 15:57 ` Wolfram Sang
@ 2025-04-11 17:34 ` Michael Opdenacker
2025-04-11 19:21 ` Wolfram Sang
0 siblings, 1 reply; 5+ messages in thread
From: Michael Opdenacker @ 2025-04-11 17:34 UTC (permalink / raw)
To: Wolfram Sang, Anshul Dalal, linux-input, linux-i2c; +Cc: michael.opdenacker
Hi Wolfram
Thanks for your help!
On 4/11/25 17:57, Wolfram Sang wrote:
>> Plus "i2cdetect -r <num>" shows the device as UU for address 0x50, as
>> usually happens with a driver is loaded.
> Always. The address is blocked for userspace in any case.
>
>> I thought that connected I2C devices always showed in i2cdetect output,
>> whether they are declared in the device tree and have a driver or not.
> This is a valid expectation. Since you used 'i2cdetect -r', it means
> that the device does not react to the read_byte method. Very strange (if
> not even against the specs). Did you try without '-r' to use
> SMBUS_QUICK? What driver are we talking about anyhow?
Without the driver loaded, I get this...
~ # i2cdetect 5
i2cdetect: warning: can't use SMBus quick write command, will skip some
addresses
i2cdetect: WARNING! This program can confuse your I2C bus
Continue? [y/N] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00:
10:
20:
30: -- -- -- -- -- -- -- --
40:
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60:
70:
~ #
~ # i2cdetect -r 5
i2cdetect: WARNING! This program can confuse your I2C bus
Continue? [y/N] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
When the driver is loaded, there's UU as expected for address 0x50.
The driver is drivers/input/joystick/adafruit-seesaw.c
Cheers
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I2C: can't detect Adafruit Mini I2C Gamepad on Linux - other devices detected
2025-04-11 17:34 ` Michael Opdenacker
@ 2025-04-11 19:21 ` Wolfram Sang
0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2025-04-11 19:21 UTC (permalink / raw)
To: Michael Opdenacker; +Cc: Anshul Dalal, linux-input, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
> The driver is drivers/input/joystick/adafruit-seesaw.c
My bet: it is a firmware issue. I couldn't find the code from a glimpse
at the github repo, but there could be a similar issue here:
https://github.com/adafruit/Adafruit_Seesaw/issues/96
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-11 19:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-11 5:21 I2C: can't detect Adafruit Mini I2C Gamepad on Linux - other devices detected Michael Opdenacker
2025-04-11 15:44 ` Michael Opdenacker
2025-04-11 15:57 ` Wolfram Sang
2025-04-11 17:34 ` Michael Opdenacker
2025-04-11 19:21 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).