From: Marten Lindahl <martenli@axis.com>
To: andriy.shechenko@saunalahti.fi,
"Mårten Lindahl" <marten.lindahl@axis.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>, <linux-iio@vger.kernel.org>,
<kernel@axis.com>
Subject: Re: [PATCH v3 2/3] iio: light: vcnl4000: Make irq handling more generic
Date: Tue, 17 Jan 2023 00:06:05 +0100 [thread overview]
Message-ID: <6ca87240-3efb-5bc1-6ad7-78c861be296d@axis.com> (raw)
In-Reply-To: <Y8Q6zrJ+AwzmO8KK@surfacebook>
On 1/15/23 18:41, andriy.shechenko@saunalahti.fi 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
>
>> }
next prev parent reply other threads:[~2023-01-16 23:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 13:43 [PATCH v3 0/3] iio: light: vcnl4000: Add vcnl4040 interrupt support Mårten Lindahl
2023-01-10 13:43 ` [PATCH v3 1/3] iio: light: vcnl4000: Prepare for more generic setup Mårten Lindahl
2023-01-10 13:43 ` [PATCH v3 2/3] iio: light: vcnl4000: Make irq handling more generic Mårten Lindahl
2023-01-15 17:41 ` andriy.shechenko
2023-01-16 23:06 ` Marten Lindahl [this message]
2023-01-10 13:43 ` [PATCH v3 3/3] iio: light: vcnl4000: Add interrupt support for vcnl4040 Mårten Lindahl
2023-01-15 17:38 ` andriy.shechenko
2023-01-16 17:32 ` Jonathan Cameron
2023-01-16 23:22 ` Marten Lindahl
2023-01-16 23:19 ` Marten Lindahl
2023-01-14 16:47 ` [PATCH v3 0/3] iio: light: vcnl4000: Add vcnl4040 interrupt support Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ca87240-3efb-5bc1-6ad7-78c861be296d@axis.com \
--to=martenli@axis.com \
--cc=andriy.shechenko@saunalahti.fi \
--cc=jic23@kernel.org \
--cc=kernel@axis.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=marten.lindahl@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox