<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/counter, branch v6.3.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.3.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.3.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2023-03-18T13:26:40Z</updated>
<entry>
<title>counter: 104-quad-8: Fix Synapse action reported for Index signals</title>
<updated>2023-03-18T13:26:40Z</updated>
<author>
<name>William Breathitt Gray</name>
<email>william.gray@linaro.org</email>
</author>
<published>2023-03-16T20:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=00f4bc5184c19cb33f468f1ea409d70d19f8f502'/>
<id>urn:sha1:00f4bc5184c19cb33f468f1ea409d70d19f8f502</id>
<content type='text'>
Signal 16 and higher represent the device's Index lines. The
priv-&gt;preset_enable array holds the device configuration for these Index
lines. The preset_enable configuration is active low on the device, so
invert the conditional check in quad8_action_read() to properly handle
the logical state of preset_enable.

Fixes: f1d8a071d45b ("counter: 104-quad-8: Add Generic Counter interface support")
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20230316203426.224745-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: 104-quad-8: Fix race condition between FLAG and CNTR reads</title>
<updated>2023-03-18T13:26:40Z</updated>
<author>
<name>William Breathitt Gray</name>
<email>william.gray@linaro.org</email>
</author>
<published>2023-03-12T23:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4aa3b75c74603c3374877d5fd18ad9cc3a9a62ed'/>
<id>urn:sha1:4aa3b75c74603c3374877d5fd18ad9cc3a9a62ed</id>
<content type='text'>
The Counter (CNTR) register is 24 bits wide, but we can have an
effective 25-bit count value by setting bit 24 to the XOR of the Borrow
flag and Carry flag. The flags can be read from the FLAG register, but a
race condition exists: the Borrow flag and Carry flag are instantaneous
and could change by the time the count value is read from the CNTR
register.

Since the race condition could result in an incorrect 25-bit count
value, remove support for 25-bit count values from this driver;
hard-coded maximum count values are replaced by a LS7267_CNTR_MAX define
for consistency and clarity.

Fixes: 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8")
Cc: &lt;stable@vger.kernel.org&gt; # 6.1.x
Cc: &lt;stable@vger.kernel.org&gt; # 6.2.x
Link: https://lore.kernel.org/r/20230312231554.134858-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: fix dependency references for config MICROCHIP_TCB_CAPTURE</title>
<updated>2023-01-18T14:59:58Z</updated>
<author>
<name>Lukas Bulwahn</name>
<email>lukas.bulwahn@gmail.com</email>
</author>
<published>2023-01-18T07:46:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01f714ee022ecb2667ca8ba909138b1af4cfff2c'/>
<id>urn:sha1:01f714ee022ecb2667ca8ba909138b1af4cfff2c</id>
<content type='text'>
Commit dfeef15e73ca ("counter: microchip-tcp-capture: Add appropriate arch
deps for TCP driver") intends to add appropriate dependencies for the
config MICROCHIP_TCB_CAPTURE. It however prefixes the intended configs with
CONFIG, but in Kconfig files in contrast to source files, the configs are
referenced to without prefixing them with CONFIG.

Fix the dependency references due to this minor misconception.

Fixes: dfeef15e73ca ("counter: microchip-tcp-capture: Add appropriate arch deps for TCP driver")
Signed-off-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Link: https://lore.kernel.org/r/20230118074659.5909-1-lukas.bulwahn@gmail.com/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: microchip-tcp-capture: Add appropriate arch deps for TCP driver</title>
<updated>2023-01-13T20:05:56Z</updated>
<author>
<name>Peter Robinson</name>
<email>pbrobinson@gmail.com</email>
</author>
<published>2023-01-08T07:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dfeef15e73ca22455c1dd51c0ebc477145081630'/>
<id>urn:sha1:dfeef15e73ca22455c1dd51c0ebc477145081630</id>
<content type='text'>
Add the CONFIG_SOC_AT91SAM9 and CONFIG_SOC_SAM_V7 deps for the
Microchip SoCs that support this IP block/driver plus compile
time testing.

Signed-off-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Link: https://lore.kernel.org/r/20230108074750.443705-4-pbrobinson@gmail.com/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: ftm-quaddec: Depend on the Layerscape SoC</title>
<updated>2023-01-13T20:05:41Z</updated>
<author>
<name>Peter Robinson</name>
<email>pbrobinson@gmail.com</email>
</author>
<published>2023-01-08T07:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3760b49af5bc773a1679cd2e9dbef3c2532726af'/>
<id>urn:sha1:3760b49af5bc773a1679cd2e9dbef3c2532726af</id>
<content type='text'>
At the moment only the Freescale LS1021A is the only HW that
supports this IP block so add an appropriate dependency and
compile test.

Signed-off-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Link: https://lore.kernel.org/r/20230108074750.443705-3-pbrobinson@gmail.com/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: intel-qep: Depend on X86</title>
<updated>2023-01-13T20:05:23Z</updated>
<author>
<name>Peter Robinson</name>
<email>pbrobinson@gmail.com</email>
</author>
<published>2023-01-08T07:47:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=92a3337081e55eee0491b2a0255a45e7f583fff6'/>
<id>urn:sha1:92a3337081e55eee0491b2a0255a45e7f583fff6</id>
<content type='text'>
Limit the Intel counter driver to X86, it doesn't
make sense to build it for all arches if the counter
subsystem is enabled.

Signed-off-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Link: https://lore.kernel.org/r/20230108074750.443705-2-pbrobinson@gmail.com/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: Sort the Kconfig entries alphabetically</title>
<updated>2023-01-13T20:04:20Z</updated>
<author>
<name>Peter Robinson</name>
<email>pbrobinson@gmail.com</email>
</author>
<published>2023-01-08T07:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9c5e51f2b01edc5b3057044d15eb0f57be2cd449'/>
<id>urn:sha1:9c5e51f2b01edc5b3057044d15eb0f57be2cd449</id>
<content type='text'>
Sort the Kconfig menu alphabetically to make it easier
to read as the list grows larger.

Signed-off-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Link: https://lore.kernel.org/r/20230108074750.443705-1-pbrobinson@gmail.com/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update</title>
<updated>2022-11-26T21:49:28Z</updated>
<author>
<name>Fabrice Gasnier</name>
<email>fabrice.gasnier@foss.st.com</email>
</author>
<published>2022-11-23T13:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fd5ac974fc25feed084c2d1599d0dddb4e0556bc'/>
<id>urn:sha1:fd5ac974fc25feed084c2d1599d0dddb4e0556bc</id>
<content type='text'>
The ARR (auto reload register) and CMP (compare) registers are
successively written. The status bits to check the update of these
registers are polled together with regmap_read_poll_timeout().
The condition to end the loop may become true, even if one of the register
isn't correctly updated.
So ensure both status bits are set before clearing them.

Fixes: d8958824cf07 ("iio: counter: Add support for STM32 LPTimer")
Signed-off-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20221123133609.465614-1-fabrice.gasnier@foss.st.com/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: 104-quad-8: Fix race getting function mode and direction</title>
<updated>2022-10-24T00:39:26Z</updated>
<author>
<name>William Breathitt Gray</name>
<email>william.gray@linaro.org</email>
</author>
<published>2022-10-20T14:11:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d501d37841d3b7f18402d71a9ef057eb9dde127e'/>
<id>urn:sha1:d501d37841d3b7f18402d71a9ef057eb9dde127e</id>
<content type='text'>
The quad8_action_read() function checks the Count function mode and
Count direction without first acquiring a lock. This is a race condition
because the function mode could change by the time the direction is
checked.

Because the quad8_function_read() already acquires a lock internally,
the quad8_function_read() is refactored to spin out the no-lock code to
a new quad8_function_get() function.

To resolve the race condition in quad8_action_read(), a lock is acquired
before calling quad8_function_get() and quad8_direction_read() in order
to get both function mode and direction atomically.

Fixes: f1d8a071d45b ("counter: 104-quad-8: Add Generic Counter interface support")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221020141121.15434-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>counter: microchip-tcb-capture: Handle Signal1 read and Synapse</title>
<updated>2022-10-24T00:38:49Z</updated>
<author>
<name>William Breathitt Gray</name>
<email>william.gray@linaro.org</email>
</author>
<published>2022-10-18T12:10:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d917a62af81b133f35f627e7936e193c842a7947'/>
<id>urn:sha1:d917a62af81b133f35f627e7936e193c842a7947</id>
<content type='text'>
The signal_read(), action_read(), and action_write() callbacks have been
assuming Signal0 is requested without checking. This results in requests
for Signal1 returning data for Signal0. This patch fixes these
oversights by properly checking for the Signal's id in the respective
callbacks and handling accordingly based on the particular Signal
requested. The trig_inverted member of the mchp_tc_data is removed as
superfluous.

Fixes: 106b104137fd ("counter: Add microchip TCB capture counter")
Cc: stable@vger.kernel.org
Reviewed-by: Kamel Bouhara &lt;kamel.bouhara@bootlin.com&gt;
Link: https://lore.kernel.org/r/20221018121014.7368-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
</feed>
