Re: [PATCH v3 2/3] iio: light: vcnl4000: Make irq handling more generic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 1/15/23 18:41, andriy.shechenko@xxxxxxxxxxxxx wrote:
Tue, Jan 10, 2023 at 02:43:22PM +0100, Mårten Lindahl kirjoitti:
This driver supports 4 chips, by which only one (vcnl4010) handles
interrupts and has support for triggered buffer. The setup of these
functions is hardcoded for vcnl4010 inside the generic vcnl4000_probe,
and thus ignores the chip specific configuration structure where all
other chip specific functions are specified.

This complicates adding interrupt handler and triggered buffer support
to chips which may have support for it.

Add members for irq threads and iio_buffer_setup_ops to the generic
vcnl4000_chip_spec struct, so that instead of checking a chip specific
boolean irq support, we check for a chip specific triggered buffer
handler, and/or a chip specific irq thread handler.
...

-		ret = devm_iio_triggered_buffer_setup(&client->dev, indio_dev,
-						      NULL,

+		ret = devm_iio_triggered_buffer_setup(&client->dev,
+						      indio_dev, NULL,
What the point of this part of the hunk?

Hi Andy! If you mean why these two lines are changed, I blame Lindent. But yes, I will change it back to reduce the noise.


...

+	if (client->irq) {
+		if (data->chip_spec->irq_thread) {
I have checked the rest of the series and found nothing that prevents this to
be written as

	if (client->irq && data->chip_spec->irq_thread) {

This will reduce the noise in the patch.

No problem. I see your point. I'll send a new version.

Thanks!

Kind regards

Mårten


  	}



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux