<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/iio/trigger.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-05-23T20:20:17+00:00</updated>
<entry>
<title>iio: trigger: Add simple trigger_validation helper</title>
<updated>2023-05-23T20:20:17+00:00</updated>
<author>
<name>Matti Vaittinen</name>
<email>mazziesaccount@gmail.com</email>
</author>
<published>2023-05-08T10:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=517985ebc53119a2c2590d29d4056e3f17ef8375'/>
<id>urn:sha1:517985ebc53119a2c2590d29d4056e3f17ef8375</id>
<content type='text'>
Some triggers can only be attached to the IIO device that corresponds to
the same physical device. Implement generic helper which can be used as
a validate_trigger callback for such devices.

Suggested-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Link: https://lore.kernel.org/r/51cd3e3e74a6addf8d333f4a109fb9c5a11086ee.1683541225.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: Rename iio_trigger_poll_chained and add kernel-doc</title>
<updated>2023-03-11T12:18:29+00:00</updated>
<author>
<name>Mehdi Djait</name>
<email>mehdi.djait.k@gmail.com</email>
</author>
<published>2023-03-02T13:04:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f700e55ef6ef9ec723164659ed4385900981c872'/>
<id>urn:sha1:f700e55ef6ef9ec723164659ed4385900981c872</id>
<content type='text'>
Rename the function to iio_trigger_poll_nested. Add kernel-doc with
a note on the context where the function is expected to be called.

Signed-off-by: Mehdi Djait &lt;mehdi.djait.k@gmail.com&gt;
Link: https://lore.kernel.org/r/841b533cba28ca25a8e87280c44e45979166e8e2.1677761379.git.mehdi.djait.k@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: Improve the kernel-doc of iio_trigger_poll</title>
<updated>2023-03-11T12:18:29+00:00</updated>
<author>
<name>Mehdi Djait</name>
<email>mehdi.djait.k@gmail.com</email>
</author>
<published>2023-03-02T13:04:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4ad682e04c1694aba95627f60e89f83178c277c2'/>
<id>urn:sha1:4ad682e04c1694aba95627f60e89f83178c277c2</id>
<content type='text'>
Move the kernel-doc of the function to industrialio-trigger.c
Add a note on the context where the function is expected to be called.

Signed-off-by: Mehdi Djait &lt;mehdi.djait.k@gmail.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/bd84fc17e9d22eab998bf48720297f9a77689f45.1677761379.git.mehdi.djait.k@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: trigger: move trig-&gt;owner init to trigger allocate() stage</title>
<updated>2022-07-16T15:24:19+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>DDRokosov@sberdevices.ru</email>
</author>
<published>2022-06-01T17:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc72d938c149197688ae3b3ecaa25d4aee8653cb'/>
<id>urn:sha1:bc72d938c149197688ae3b3ecaa25d4aee8653cb</id>
<content type='text'>
To provide a new IIO trigger to the IIO core, usually driver executes the
following pipeline: allocate()/register()/get(). Before, IIO core assigned
trig-&gt;owner as a pointer to the module which registered this trigger at
the register() stage. But actually the trigger object is owned by the
module earlier, on the allocate() stage, when trigger object is
successfully allocated for the driver.

This patch moves trig-&gt;owner initialization from register()
stage of trigger initialization pipeline to allocate() stage to
eliminate all misunderstandings and time gaps between trigger object
creation and owner acquiring.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20220601174837.20292-1-ddrokosov@sberdevices.ru
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: trigger: warn about non-registered iio trigger getting attempt</title>
<updated>2022-06-18T13:26:17+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>DDRokosov@sberdevices.ru</email>
</author>
<published>2022-06-07T18:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a08069461ac9822855116d24fbf11d5fb223cd1'/>
<id>urn:sha1:4a08069461ac9822855116d24fbf11d5fb223cd1</id>
<content type='text'>
As a part of patch series about wrong trigger register() and get()
calls order in the some IIO drivers trigger initialization path:

https://lore.kernel.org/all/20220524181150.9240-1-ddrokosov@sberdevices.ru/

runtime WARN_ONCE() is added to alarm IIO driver authors who make such
a mistake.

When an IIO driver allocates a new IIO trigger, it should register it
before calling the get() operation. In other words, each IIO driver
must abide by IIO trigger alloc()/register()/get() calls order.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20220607183907.20017-1-ddrokosov@sberdevices.ru
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046</title>
<updated>2021-12-12T17:12:18+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-10-17T17:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9020ef659885f2622cfb386cc229b6d618362895'/>
<id>urn:sha1:9020ef659885f2622cfb386cc229b6d618362895</id>
<content type='text'>
IIO triggers are software IRQ chips that split an incoming IRQ into
separate IRQs routed to all devices using the trigger.
When all consumers are done then a trigger callback reenable() is
called.  There are a few circumstances under which this can happen
in atomic context.

1) A single user of the trigger that calls the iio_trigger_done()
function from interrupt context.
2) A race between disconnecting the last device from a trigger and
the trigger itself sucessfully being disabled.

To avoid a resulting scheduling whilst atomic, close this second corner
by using schedule_work() to ensure the reenable is not done in atomic
context.

Note that drivers must be careful to manage the interaction of
set_state() and reenable() callbacks to ensure appropriate reference
counting if they are relying on the same hardware controls.

Deliberately taking this the slow path rather than via a fixes tree
because the error has hard to hit and I would like it to soak for a while
before hitting a release kernel.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Pengutronix Kernel Team &lt;kernel@pengutronix.de&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20211017172209.112387-1-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: set default trig-&gt;dev.parent</title>
<updated>2021-03-25T19:13:50+00:00</updated>
<author>
<name>Gwendal Grignou</name>
<email>gwendal@chromium.org</email>
</author>
<published>2021-03-09T19:36:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=995071d36bb9804b644265450142fcb91c427ee8'/>
<id>urn:sha1:995071d36bb9804b644265450142fcb91c427ee8</id>
<content type='text'>
When allocated with [devm_]iio_trigger_alloc(), set trig device parent to
the device the trigger is allocated for by default.

It can always be reassigned in the probe routine.

Change iio_trigger_alloc() API to add the device pointer to be coherent
with devm_iio_trigger_alloc, using similar interface to
iio_device_alloc().

Signed-off-by: Gwendal Grignou &lt;gwendal@chromium.org&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210309193620.2176163-2-gwendal@chromium.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio:trigger: rename try_reenable() to reenable() plus return void</title>
<updated>2020-12-03T19:40:26+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2020-09-20T13:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eca8523a388f65cc0f515e3db4f3b027d7546532'/>
<id>urn:sha1:eca8523a388f65cc0f515e3db4f3b027d7546532</id>
<content type='text'>
As we no longer support a try again if we cannot reenable the trigger
rename the function to reflect this.   Also we don't do anything with
the value returned so stop it returning anything.  For the few drivers
that didn't already print an error message in this patch, add such
a print.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Cc: Christian Oder &lt;me@myself5.de&gt;
Cc: Eugen Hristev &lt;eugen.hristev@microchip.com&gt;
Cc: Nishant Malpani &lt;nish.malpani25@gmail.com&gt;
Cc: Daniel Baluta &lt;daniel.baluta@oss.nxp.com&gt;
Link: https://lore.kernel.org/r/20200920132548.196452-3-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: fix a kernel-doc markup</title>
<updated>2020-10-31T15:02:36+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2020-10-23T16:33:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a096c2bda7d2f0c0866d466447c41bc4b8ecdec'/>
<id>urn:sha1:3a096c2bda7d2f0c0866d466447c41bc4b8ecdec</id>
<content type='text'>
A function has a different name between their prototype
and its kernel-doc markup.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/46622c3bdcffb76e79719f0fe5011c2952960b32.1603469755.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: core: drop devm_iio_trigger_unregister() API call</title>
<updated>2020-04-19T15:56:36+00:00</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-02-27T13:52:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=83381c9803a00d534f32ab52ed91588601eba43f'/>
<id>urn:sha1:83381c9803a00d534f32ab52ed91588601eba43f</id>
<content type='text'>
It's unused so far, so it can be removed. Also makes sense to remove it
to discourage weird uses of this call during review.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
