Re: [PATCH v6 2/2] input: joystick: driver for Adafruit Seesaw Gamepad
From: Jeff LaBundy
Date: Sat Nov 25 2023 - 17:39:57 EST
Hi Thomas and Anshul,
On Fri, Oct 27, 2023 at 06:14:58AM +0000, Thomas Weißschuh wrote:
[...]
> > +struct seesaw_data {
> > + __be16 x;
> > + __be16 y;
>
> The fact that these are big endian is now an implementation detail
> hidden within seesaw_read_data(), so the __be16 can go away.
>
> > + u32 button_state;
> > +} __packed;
>
> While this was requested by Jeff I don't think it's correct.
> The struct is never received in this form from the device.
> I guess he also got confused, like me, by the fact that data is directly
> read into the fields of the struct.
Apologies for some confusion on my part here; Thomas is correct and
my comment can be disregarded. Originally I thought this struct was
mapped to a continguous range of registers, but after studying the
documentation some more, that is clearly not the case :)
Kind regards,
Jeff LaBundy