Re: [PATCH v6 11/12] input: misc: Add support for MAX7360 rotary

Mathieu Dubois-Briand
2025-04-10T11:36:39Z

On Wed Apr 9, 2025 at 9:17 PM CEST, Dmitry Torokhov wrote:
> 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:
>

OK

>> +
>> + 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.
>

Ok, thanks!

>> +
>> + 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?

Ok, I should be able to add "rotary-encoder,relative-axis" property, as
for rotary_encoder.c.

>
> Thanks.

Thanks for your review.
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering