From: Matej Vasilevski <matej.vasilevski@seznam.cz>
To: Pavel Pisa <pisa@cmp.felk.cvut.cz>,
Ondrej Ille <ondrej.ille@gmail.com>,
Wolfgang Grandegger <wg@grandegger.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org,
Matej Vasilevski <matej.vasilevski@seznam.cz>
Subject: [PATCH v4 0/3] can: ctucanfd: hardware rx timestamps reporting
Date: Thu, 15 Sep 2022 01:39:41 +0200 [thread overview]
Message-ID: <20220914233944.598298-1-matej.vasilevski@seznam.cz> (raw)
Hello,
this is the v4 patch for CTU CAN FD hardware timestamps reporting.
Excuse my mistake, I'm sorry for the double post, but minutes after posting
patch v3 I've realized I forgot to update the pm_runtime method in error counter routine.
Even though pm_runtime_resume_and_get and pm_runtime_get_sync should be equivalent,
I want to have the code consistent.
Changes since v3: https://lore.kernel.org/all/20220914231249.593643-1-matej.vasilevski@seznam.cz/t/#u
- use pm_runtime_resume_and_get in error counter routine ctucan_get_berr_counter
Changes since v2: https://lore.kernel.org/all/20220801184656.702930-1-matej.vasilevski@seznam.cz/t/#u
- proper timestamping clock handling
- clocks manually enabled using clk_prepare_enable, then managed
by runtime PM (if runtime PM is enabled)
- driver should work even without CONFIG_PM
- access to the timecounter is now protected by a spinlock
- harmonized with Vincent's patch - TX timestamping capability is now
correctly reported
- work_delay_jiffies stored as unsigned long instead of u32
- max work delay limited to 3600 seconds (instead of 86k seconds)
- adressed the rest of the comments from the patch V2 review
Changes since v1: https://lore.kernel.org/all/20220512232706.24575-1-matej.vasilevski@seznam.cz/
- Removed kconfig option to enable/disable timestamps.
- Removed dt parameters ts-frequency and ts-used-bits. Now the user
only needs to add the timestamping clock phandle to clocks, and even
that is optional.
- Added SIOCSHWTSTAMP ioctl to enable/disable timestamps.
- Adressed comments from the RFC review.
Matej Vasilevski (3):
dt-bindings: can: ctucanfd: add another clock for HW timestamping
can: ctucanfd: add HW timestamps to RX and error CAN frames
doc: ctucanfd: RX frames timestamping for platform devices
.../bindings/net/can/ctu,ctucanfd.yaml | 19 +-
.../can/ctu/ctucanfd-driver.rst | 13 +-
drivers/net/can/ctucanfd/Makefile | 2 +-
drivers/net/can/ctucanfd/ctucanfd.h | 20 ++
drivers/net/can/ctucanfd/ctucanfd_base.c | 239 ++++++++++++++++--
drivers/net/can/ctucanfd/ctucanfd_pci.c | 5 +-
drivers/net/can/ctucanfd/ctucanfd_platform.c | 5 +-
drivers/net/can/ctucanfd/ctucanfd_timestamp.c | 70 +++++
8 files changed, 344 insertions(+), 29 deletions(-)
create mode 100644 drivers/net/can/ctucanfd/ctucanfd_timestamp.c
base-commit: c9ae520ac3faf2f272b5705b085b3778c7997ec8
--
2.25.1
next reply other threads:[~2022-09-14 23:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 23:39 Matej Vasilevski [this message]
2022-09-14 23:39 ` [PATCH v4 1/3] dt-bindings: can: ctucanfd: add another clock for HW timestamping Matej Vasilevski
2022-09-16 19:30 ` Rob Herring
2022-09-14 23:39 ` [PATCH v4 2/3] can: ctucanfd: add HW timestamps to RX and error CAN frames Matej Vasilevski
2022-09-15 10:50 ` Pavel Pisa
2022-09-18 22:00 ` Matej Vasilevski
2022-09-19 10:36 ` Marc Kleine-Budde
2022-09-28 20:40 ` Matej Vasilevski
2022-09-21 7:06 ` Marc Kleine-Budde
2022-09-14 23:39 ` [PATCH v4 3/3] doc: ctucanfd: RX frames timestamping for platform devices Matej Vasilevski
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=20220914233944.598298-1-matej.vasilevski@seznam.cz \
--to=matej.vasilevski@seznam.cz \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=ondrej.ille@gmail.com \
--cc=pabeni@redhat.com \
--cc=pisa@cmp.felk.cvut.cz \
--cc=robh+dt@kernel.org \
--cc=wg@grandegger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.