Message ID | 20220613192353.696-2-macroalpha82@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | adc-joystick: Add polled support | expand |
On 2022-06-13 21:23, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > Add documentation for adc-joystick,no-hardware-trigger. New device-tree > properties have been added. > > - adc-joystick,no-hardware-trigger: A boolean value noting the joystick > device should be polled rather than > use a triggered buffer. > > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > --- > .../devicetree/bindings/input/adc-joystick.yaml | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml > b/Documentation/devicetree/bindings/input/adc-joystick.yaml > index 2ee04e03bc22..627cc6c40191 100644 > --- a/Documentation/devicetree/bindings/input/adc-joystick.yaml > +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml > @@ -12,12 +12,19 @@ maintainers: > > description: > > Bindings for joystick devices connected to ADC controllers > supporting > - the Industrial I/O subsystem. > + the Industrial I/O subsystem. Supports both polled devices where no > + iio trigger is available and non-polled devices which are triggered > + by iio. > > properties: > compatible: > const: adc-joystick > > + adc-joystick,no-hardware-trigger: I'm against using Device Tree for this functionality. See my reply to patch 2/3 for details. But in case we do end up going DT way, I would much prefer going with Rob's suggestion of using the existing `poll-interval` input property. Cheers, Artur > + type: boolean > + description: > + If the device does not support triggered buffers and needs to be > polled. > + > io-channels: > minItems: 1 > maxItems: 1024
On 14/06/2022 18:50, Artur Rojek wrote: > On 2022-06-13 21:23, Chris Morgan wrote: >> From: Chris Morgan <macromorgan@hotmail.com> >> >> Add documentation for adc-joystick,no-hardware-trigger. New device-tree >> properties have been added. >> >> - adc-joystick,no-hardware-trigger: A boolean value noting the joystick >> device should be polled rather than >> use a triggered buffer. >> >> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> >> Signed-off-by: Chris Morgan <macromorgan@hotmail.com> >> --- >> .../devicetree/bindings/input/adc-joystick.yaml | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml >> b/Documentation/devicetree/bindings/input/adc-joystick.yaml >> index 2ee04e03bc22..627cc6c40191 100644 >> --- a/Documentation/devicetree/bindings/input/adc-joystick.yaml >> +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml >> @@ -12,12 +12,19 @@ maintainers: >> >> description: > >> Bindings for joystick devices connected to ADC controllers >> supporting >> - the Industrial I/O subsystem. >> + the Industrial I/O subsystem. Supports both polled devices where no >> + iio trigger is available and non-polled devices which are triggered >> + by iio. >> >> properties: >> compatible: >> const: adc-joystick >> >> + adc-joystick,no-hardware-trigger: > I'm against using Device Tree for this functionality. See my reply to > patch 2/3 for details. I am surprised to see v3 after that comment... > But in case we do end up going DT way, I would much prefer going with > Rob's suggestion of using the existing `poll-interval` input property. +1 here as well, if above does not work. Best regards, Krzysztof
On Wed, Jun 15, 2022 at 10:23:55AM -0700, Krzysztof Kozlowski wrote: > On 14/06/2022 18:50, Artur Rojek wrote: > > On 2022-06-13 21:23, Chris Morgan wrote: > >> From: Chris Morgan <macromorgan@hotmail.com> > >> > >> Add documentation for adc-joystick,no-hardware-trigger. New device-tree > >> properties have been added. > >> > >> - adc-joystick,no-hardware-trigger: A boolean value noting the joystick > >> device should be polled rather than > >> use a triggered buffer. > >> > >> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > >> Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > >> --- > >> .../devicetree/bindings/input/adc-joystick.yaml | 9 ++++++++- > >> 1 file changed, 8 insertions(+), 1 deletion(-) > >> > >> diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml > >> b/Documentation/devicetree/bindings/input/adc-joystick.yaml > >> index 2ee04e03bc22..627cc6c40191 100644 > >> --- a/Documentation/devicetree/bindings/input/adc-joystick.yaml > >> +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml > >> @@ -12,12 +12,19 @@ maintainers: > >> > >> description: > > >> Bindings for joystick devices connected to ADC controllers > >> supporting > >> - the Industrial I/O subsystem. > >> + the Industrial I/O subsystem. Supports both polled devices where no > >> + iio trigger is available and non-polled devices which are triggered > >> + by iio. > >> > >> properties: > >> compatible: > >> const: adc-joystick > >> > >> + adc-joystick,no-hardware-trigger: > > I'm against using Device Tree for this functionality. See my reply to > > patch 2/3 for details. > > I am surprised to see v3 after that comment... No, I'm sorry I must have missed this comment or glossed over it when updating a v3. I've tested checking for INDIO_ALL_BUFFER_MODES and that doesn't seem to trigger the desired behavior (since I think maybe something in my kernel config is adding INDIO_BUFFER_TRIGGERED, and I'd hate for behavior to be dependent on what's in the config versus what's in the hardware). Would it be sufficient to check for "(INDIO_BUFFER_HARDWARE | INDIO_BUFFER_SOFTWARE)"? Thank you. > > > But in case we do end up going DT way, I would much prefer going with > > Rob's suggestion of using the existing `poll-interval` input property. > > +1 here as well, if above does not work. > > > Best regards, > Krzysztof
diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml b/Documentation/devicetree/bindings/input/adc-joystick.yaml index 2ee04e03bc22..627cc6c40191 100644 --- a/Documentation/devicetree/bindings/input/adc-joystick.yaml +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml @@ -12,12 +12,19 @@ maintainers: description: > Bindings for joystick devices connected to ADC controllers supporting - the Industrial I/O subsystem. + the Industrial I/O subsystem. Supports both polled devices where no + iio trigger is available and non-polled devices which are triggered + by iio. properties: compatible: const: adc-joystick + adc-joystick,no-hardware-trigger: + type: boolean + description: + If the device does not support triggered buffers and needs to be polled. + io-channels: minItems: 1 maxItems: 1024