<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/counter/interrupt-cnt.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-03-18T13:04:30Z</updated>
<entry>
<title>counter: interrupt-cnt: add counter_push_event()</title>
<updated>2022-03-18T13:04:30Z</updated>
<author>
<name>Oleksij Rempel</name>
</author>
<published>2022-03-15T19:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=257e3df40c62bdc2a7cfb2deb1dac8fcb931cc73'/>
<id>urn:sha1:257e3df40c62bdc2a7cfb2deb1dac8fcb931cc73</id>
<content type='text'>
Add counter_push_event() to notify user space about new pulses

Link: https://lore.kernel.org/r/20220203135727.2374052-3-o.rempel@pengutronix.de
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Link: https://lore.kernel.org/r/9da3460113b5092e8658e12f23578567aab7cc5f.1647373009.git.vilhelm.gray@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>counter: interrupt-cnt: Convert to new counter registration</title>
<updated>2021-12-30T16:44:07Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2021-12-30T15:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aefc7e1797243eaa7a5e03629819d4aaa3c3feae'/>
<id>urn:sha1:aefc7e1797243eaa7a5e03629819d4aaa3c3feae</id>
<content type='text'>
This fixes device lifetime issues where it was possible to free a live
struct device.

Fixes: a55ebd47f21f ("counter: add IRQ or GPIO based counter")
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Acked-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20211230150300.72196-17-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>counter: interrupt-cnt: Convert to counter_priv() wrapper</title>
<updated>2021-12-30T16:44:06Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2021-12-30T15:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63f0e2b6c0334a35d00e81b4347e34f745bca274'/>
<id>urn:sha1:63f0e2b6c0334a35d00e81b4347e34f745bca274</id>
<content type='text'>
This is a straight forward conversion to the new counter_priv() wrapper.

Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Acked-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20211230150300.72196-7-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>counter: Internalize sysfs interface code</title>
<updated>2021-10-17T09:52:58Z</updated>
<author>
<name>William Breathitt Gray</name>
</author>
<published>2021-08-27T03:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aaec1a0f76ec25f46bbb17b81487c4b0e1c318c5'/>
<id>urn:sha1:aaec1a0f76ec25f46bbb17b81487c4b0e1c318c5</id>
<content type='text'>
This is a reimplementation of the Generic Counter driver interface.
There are no modifications to the Counter subsystem userspace interface,
so existing userspace applications should continue to run seamlessly.

The purpose of this patch is to internalize the sysfs interface code
among the various counter drivers into a shared module. Counter drivers
pass and take data natively (i.e. u8, u64, etc.) and the shared counter
module handles the translation between the sysfs interface and the
device drivers. This guarantees a standard userspace interface for all
counter drivers, and helps generalize the Generic Counter driver ABI in
order to support the Generic Counter chrdev interface (introduced in a
subsequent patch) without significant changes to the existing counter
drivers.

Note, Counter device registration is the same as before: drivers
populate a struct counter_device with components and callbacks, then
pass the structure to the devm_counter_register function. However,
what's different now is how the Counter subsystem code handles this
registration internally.

Whereas before callbacks would interact directly with sysfs data, this
interaction is now abstracted and instead callbacks interact with native
C data types. The counter_comp structure forms the basis for Counter
extensions.

The counter-sysfs.c file contains the code to parse through the
counter_device structure and register the requested components and
extensions. Attributes are created and populated based on type, with
respective translation functions to handle the mapping between sysfs and
the counter driver callbacks.

The translation performed for each attribute is straightforward: the
attribute type and data is parsed from the counter_attribute structure,
the respective counter driver read/write callback is called, and sysfs
I/O is handled before or after the driver read/write function is called.

Cc: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Cc: Patrick Havelange &lt;patrick.havelange@essensium.com&gt;
Cc: Kamel Bouhara &lt;kamel.bouhara@bootlin.com&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@st.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Syed Nayyar Waris &lt;syednwaris@gmail.com&gt;
Reviewed-by: David Lechner &lt;david@lechnology.com&gt;
Tested-by: David Lechner &lt;david@lechnology.com&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Reviewed-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt; # for stm32
Link: https://lore.kernel.org/r/c68b4a1ffb195c1a2f65e8dd5ad7b7c14e79c6ef.1630031207.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>counter: Rename counter_count_function to counter_function</title>
<updated>2021-08-09T19:17:36Z</updated>
<author>
<name>William Breathitt Gray</name>
</author>
<published>2021-08-03T12:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=394a0150a0644389ce4d587f5c67393308eec28c'/>
<id>urn:sha1:394a0150a0644389ce4d587f5c67393308eec28c</id>
<content type='text'>
The phrase "Counter Count function" is verbose and unintentionally
implies that function is a Count extension. This patch adjusts the
Counter subsystem code to use the more direct "Counter function" phrase
to make the intent of this code clearer.

Cc: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Cc: Patrick Havelange &lt;patrick.havelange@essensium.com&gt;
Cc: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: Kamel Bouhara &lt;kamel.bouhara@bootlin.com&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@st.com&gt;
Cc: David Lechner &lt;david@lechnology.com&gt;
Acked-by: Syed Nayyar Waris &lt;syednwaris@gmail.com&gt;
Reviewed-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Link: https://lore.kernel.org/r/8268c54d6f42075a19bb08151a37831e22652499.1627990337.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>counter: Rename counter_signal_value to counter_signal_level</title>
<updated>2021-08-09T19:17:36Z</updated>
<author>
<name>William Breathitt Gray</name>
</author>
<published>2021-08-03T12:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=493b938a14ed78d7e44c33d1c1e349656a16c360'/>
<id>urn:sha1:493b938a14ed78d7e44c33d1c1e349656a16c360</id>
<content type='text'>
Signal values will always be levels so let's be explicit it about it to
make the intent of the code clear.

Cc: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: Kamel Bouhara &lt;kamel.bouhara@bootlin.com&gt;
Acked-by: Syed Nayyar Waris &lt;syednwaris@gmail.com&gt;
Reviewed-by: David Lechner &lt;david@lechnology.com&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Link: https://lore.kernel.org/r/3f17010abe2415859cea9a5fddabd3c97f635ff5.1627990337.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>counter: Standardize to ERANGE for limit exceeded errors</title>
<updated>2021-08-09T19:17:36Z</updated>
<author>
<name>William Breathitt Gray</name>
</author>
<published>2021-08-03T12:06:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2ff3198c580a3a3acfdc50cce5b5f8a941cbcd1'/>
<id>urn:sha1:e2ff3198c580a3a3acfdc50cce5b5f8a941cbcd1</id>
<content type='text'>
ERANGE is a semantically better error code to return when an argument
value falls outside the supported limit range of a device.

Cc: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Cc: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@st.com&gt;
Acked-by: Syed Nayyar Waris &lt;syednwaris@gmail.com&gt;
Reviewed-by: David Lechner &lt;david@lechnology.com&gt;
Reviewed-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Link: https://lore.kernel.org/r/ae8d3b20b8b02c96b1c9898ffa2f9fa5d99edc81.1627990337.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>counter: interrupt-cnt: Add const qualifier for actions_list array</title>
<updated>2021-06-13T16:00:18Z</updated>
<author>
<name>William Breathitt Gray</name>
</author>
<published>2021-06-10T01:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc84957d3118df7c05724a0c0e693ffe038d5409'/>
<id>urn:sha1:bc84957d3118df7c05724a0c0e693ffe038d5409</id>
<content type='text'>
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch renames
interrupt_cnt_synapse_actionss to interrupt_cnt_synapse_actions and adds
a const qualifier to match actions_list.

Cc: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Reviewed-by: &lt;o.rempel@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210610013642.149961-1-vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>counter: interrupt-cnt: Add const qualifier for functions_list array</title>
<updated>2021-06-09T15:21:30Z</updated>
<author>
<name>William Breathitt Gray</name>
</author>
<published>2021-06-09T01:31:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=891b58b35fd6790d78ffc1ce811ac39dbe26f711'/>
<id>urn:sha1:891b58b35fd6790d78ffc1ce811ac39dbe26f711</id>
<content type='text'>
The struct counter_count functions_list member expects a const enum
counter_count_function array. This patch adds the const qualifier to the
interrupt__cnt_functions to match functions_list.

Cc: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Link: https://lore.kernel.org/r/86f7fb77f703cf2508a6b4ee9cf80aa523392976.1623201081.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>counter: add IRQ or GPIO based counter</title>
<updated>2021-03-25T19:13:51Z</updated>
<author>
<name>Oleksij Rempel</name>
</author>
<published>2021-03-01T08:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a55ebd47f21f6f0472766fb52c973849e31d1466'/>
<id>urn:sha1:a55ebd47f21f6f0472766fb52c973849e31d1466</id>
<content type='text'>
Add simple IRQ or GPIO base counter. This device is used to measure
rotation speed of some agricultural devices, so no high frequency on the
counter pin is expected.

The maximal measurement frequency depends on the CPU and system load. On
the idle iMX6S I was able to measure up to 20kHz without count drops.

Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Reviewed-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Reviewed-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt;
Link: https://lore.kernel.org/r/20210301080401.22190-3-o.rempel@pengutronix.de
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
