<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/mfd/stm32-timers.h, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-03-14T08:59:05Z</updated>
<entry>
<title>mfd: stm32-timers: Add support for stm32mp25</title>
<updated>2025-03-14T08:59:05Z</updated>
<author>
<name>Fabrice Gasnier</name>
<email>fabrice.gasnier@foss.st.com</email>
</author>
<published>2025-01-10T09:19:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7dc0dddbe503fce55ffe31ae5e8a861256a31e3f'/>
<id>urn:sha1:7dc0dddbe503fce55ffe31ae5e8a861256a31e3f</id>
<content type='text'>
Add support for STM32MP25 SoC. Use newly introduced compatible, to handle
new features.
Identification and hardware configuration registers allow to read the
timer version and capabilities (counter width, number of channels...).
So, rework the probe to avoid touching ARR register by simply read the
counter width when available. This may avoid messing with a possibly
running timer.
Also add useful bit fields to stm32-timers header file.

Signed-off-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20250110091922.980627-3-fabrice.gasnier@foss.st.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>mfd: stm32-timers: Drop unused TIM_DIER_CC_IE</title>
<updated>2024-06-26T15:09:58Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-06-19T10:11:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=304d02aa711369da89b4f8c01702bf1b5d1f7abc'/>
<id>urn:sha1:304d02aa711369da89b4f8c01702bf1b5d1f7abc</id>
<content type='text'>
This macro is misleading as

	TIM_DIER_CC_IE(1) == TIM_DIER_CC2IE

. The only user was updated to use TIM_DIER_CCxIE() instead which
doesn't suffer from this mismatch, so TIM_DIER_CC_IE can be dropped.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/6c8fcc4ed159992a1dbb0796087e6ceb10c39c96.1718791090.git.u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>mfd: stm32-timers: Add some register definitions with a parameter</title>
<updated>2024-06-26T15:09:52Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-06-19T10:11:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=796b942f65967af55684bf520812787b97522151'/>
<id>urn:sha1:796b942f65967af55684bf520812787b97522151</id>
<content type='text'>
There are some registers that belong together and are numbered from 1 to
4. Introduce a macro definition for these that takes the channel number
as parameter and define the previously available constants using the new
ones.

This allows to simplify some users that up to now use constructs like

	TIM_CCER_CC1NE &lt;&lt; (ch * 4)

which is an ugly mix of using a predefined value and still knowing
internal details about it.

Note that there are several decrements by 1 involved. These are
necessary because software guys start counting at 0 while the hardware
designer started at 1 (and having TIM_CCER_CCxE(1) be TIM_CCER_CC2E
isn't a sane option). The compiler is expected to optimize these out
nicely.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/05df15f61dde81033407d3b4fcb67ee403ecc8db.1718791090.git.u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>mfd: stm32-timers: Unify alignment of register definition</title>
<updated>2024-06-26T15:08:43Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-06-19T10:11:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a6143bdcaf7e37ecce05df2a3d3c1c5d587f87b1'/>
<id>urn:sha1:a6143bdcaf7e37ecce05df2a3d3c1c5d587f87b1</id>
<content type='text'>
Use tabs consistently for indention and properly align register names,
values and comments. This improves readability (at least for my eyes).

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/da3b7f9af5794d7463aa62cbaa7251abf1af2018.1718791090.git.u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>counter: stm32-timer-cnt: add support for capture events</title>
<updated>2024-04-02T17:10:34Z</updated>
<author>
<name>Fabrice Gasnier</name>
<email>fabrice.gasnier@foss.st.com</email>
</author>
<published>2024-03-07T13:33:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1aed15275b7ce17b5ebdfc112a76e0d7165ed46b'/>
<id>urn:sha1:1aed15275b7ce17b5ebdfc112a76e0d7165ed46b</id>
<content type='text'>
Add support for capture events. Captured counter value for each channel
can be retrieved through CCRx register.
STM32 timers can have up to 4 capture channels (on input channel 1 to
channel 4), hence need to check the number of channels before reading
the capture data.
The capture configuration is hard-coded to capture signals on both edges
(non-inverted). Interrupts are used to report events independently for
each channel.

Reviewed-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
Acked-by: Lee Jones &lt;lee@kernel.org&gt;
Signed-off-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20240307133306.383045-11-fabrice.gasnier@foss.st.com
Signed-off-by: William Breathitt Gray &lt;william.gray@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: stm32-timers: Add support for interrupts</title>
<updated>2023-11-01T10:02:12Z</updated>
<author>
<name>Fabrice Gasnier</name>
<email>fabrice.gasnier@foss.st.com</email>
</author>
<published>2023-08-29T13:40:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1c7ea43fc42b09080657c83683846c4be672bd91'/>
<id>urn:sha1:1c7ea43fc42b09080657c83683846c4be672bd91</id>
<content type='text'>
There are two types of STM32 timers that may have:

- a global interrupt line
- 4 dedicated interrupt lines.

Those interrupts are optional as defined in the dt-bindings. Enforce checks
on either one, four or no interrupts are provided with their names.
Optionally get them here, to be used by child devices.

Signed-off-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20230829134029.2402868-5-fabrice.gasnier@foss.st.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>pwm: stm32: Enforce settings for PWM capture</title>
<updated>2023-04-06T14:35:01Z</updated>
<author>
<name>Olivier Moysan</name>
<email>olivier.moysan@foss.st.com</email>
</author>
<published>2022-12-13T10:27:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d0a4564bd024eaa81cab8c7255e7c44230bdd8a2'/>
<id>urn:sha1:d0a4564bd024eaa81cab8c7255e7c44230bdd8a2</id>
<content type='text'>
The PWM capture assumes that the input selector is set to default
input and that the slave mode is disabled. Force reset state for
TISEL and SMCR registers to match this requirement.

Note that slave mode disabling is not a pre-requisite by itself
for capture mode, as hardware supports it for PWM capture.
However, the current implementation of the driver does not
allow slave mode for PWM capture. Setting slave mode for PWM
capture results in wrong capture values.

Signed-off-by: Olivier Moysan &lt;olivier.moysan@foss.st.com&gt;
Acked-by: Lee Jones &lt;lee@kernel.org&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>counter: stm32-timer-cnt: Provide defines for slave mode selection</title>
<updated>2021-10-17T09:52:46Z</updated>
<author>
<name>William Breathitt Gray</name>
<email>vilhelm.gray@gmail.com</email>
</author>
<published>2021-08-27T03:47:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ea434ff82649111de4fcabd76187270f8abdb63a'/>
<id>urn:sha1:ea434ff82649111de4fcabd76187270f8abdb63a</id>
<content type='text'>
The STM32 timer permits configuration of the counter encoder mode via
the slave mode control register (SMCR) slave mode selection (SMS) bits.
This patch provides preprocessor defines for the supported encoder
modes.

Cc: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.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;
Link: https://lore.kernel.org/r/ad3d9cd7af580d586316d368f74964cbc394f981.1630031207.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>pwm: stm32: Remove clutter from ternary operator</title>
<updated>2019-10-21T14:50:05Z</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2019-10-16T10:42:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8e53622594f5530b5a86094464937dda47fc6e3b'/>
<id>urn:sha1:8e53622594f5530b5a86094464937dda47fc6e3b</id>
<content type='text'>
Remove usage of the ternary operator to assign values for register
fields. Instead, parameterize the register and field offset macros
and pass the index to them.

This removes clutter and improves readability.

Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>mfd: stm32-timers: Fix pwm-stm32 linker issue with COMPILE_TEST</title>
<updated>2018-06-04T06:14:17Z</updated>
<author>
<name>Fabrice Gasnier</name>
<email>fabrice.gasnier@st.com</email>
</author>
<published>2018-05-18T15:24:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d95c9760d9c8e046b09b54a3bb6dd0c9aa7a0eff'/>
<id>urn:sha1:d95c9760d9c8e046b09b54a3bb6dd0c9aa7a0eff</id>
<content type='text'>
This is seen when COMPILE_TEST=y and MFD_STM32_TIMERS=n.
drivers/pwm/pwm-stm32.o: In function 'stm32_pwm_raw_capture':
pwm-stm32.c:... undefined reference to 'stm32_timers_dma_burst_read'
Fixes: 0c6609805b63 ("mfd: stm32-timers: Add support for DMAs")

Signed-off-by: Fabrice Gasnier &lt;fabrice.gasnier@st.com&gt;
Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;

Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
</feed>
