Re: [PATCH 02/10] iio: orientation: adapt to hid_sensor_remove_trigger() API change

Sanjay Chitroda
2026-04-28T12:08:51Z

On 28 April 2026 1:52:48 pm IST, Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
>On Tue, Apr 28, 2026 at 12:46:05PM +0530, Sanjay Chitroda wrote:
>
>> Update the driver to match the updated hid_sensor_remove_trigger()
>> prototype, which no longer requires struct iio_dev.
>
>You haven't compiled the previous patch, right?
>This is not the way how all this should be done.
>
>Also NAK to the patch 1 as even unused parameter is there for the sake of
>consistency. The prototype to allocate and other in the similar group all
>have it.
Hi Andy,

Thank for the review comment.
I agree your point for consistency.

However primary object of this pre-series is to prepare the drivers for devm_ conversation.

I would prepare devm_ wrapper for the hid_sensor_setup_trigger() and respective resource release hid_sensor_remove_trigger().

... devm_hid_sensor_setup_trigger( ... )
{
...
.. hid_sensor_setup_trigger();
....
devm_add_action_or_release(dev, hid_sensor_remove_trigger, attrb)
......
}

I observed that many HID IIO drivers are not covered fully with managed API.

This devm_* sensor setup trigger would use across multiple HID IIO sensors and will go step forward for managed API support.

>