Re: [PATCH v6 11/12] input: misc: Add support for MAX7360 rotary
From: Dmitry Torokhov
Date: Wed Apr 09 2025 - 15:18:38 EST
Hi Mathieu,
On Wed, Apr 09, 2025 at 04:55:58PM +0200, Mathieu Dubois-Briand wrote:
> Add driver for Maxim Integrated MAX7360 rotary encoder controller,
> supporting a single rotary switch.
Largely same comments as for the keypad driver: use "int error" for erro
variable, selection of the device for logging. Also:
> +
> + input = devm_input_allocate_device(dev);
> + if (!input)
> + return -ENOMEM;
> +
> + max7360_rotary->input = input;
> +
> + input->id.bustype = BUS_I2C;
> + input->name = pdev->name;
> + input->dev.parent = dev;
No need to be setting/overriding this, devm_input_allocate_device()
already sets this up.
> +
> + input_set_capability(input, EV_REL, max7360_rotary->axis);
The event type should come from the DT data I believe. Could we use at
least parts of the regular rotary encoding bindings?
Thanks.
--
Dmitry