2022-01-07 08:13:21

by Dario Binacchi

[permalink] [raw]
Subject: [RFC PATCH 0/2] Add the first documentation for a CAN driver

The series was born from the need to document the enabling at runtime
reception of RTR frames for the Flexcan CAN controller.
For more details see https://lore.kernel.org/all/[email protected]/


Dario Binacchi (2):
docs: networking: device drivers: add can sub-folder
docs: networking: device drivers: can: add flexcan

.../device_drivers/can/freescale/flexcan.rst | 25 +++++++++++++++++++
.../networking/device_drivers/can/index.rst | 20 +++++++++++++++
.../networking/device_drivers/index.rst | 1 +
3 files changed, 46 insertions(+)
create mode 100644 Documentation/networking/device_drivers/can/freescale/flexcan.rst
create mode 100644 Documentation/networking/device_drivers/can/index.rst

--
2.32.0



2022-01-07 08:13:32

by Dario Binacchi

[permalink] [raw]
Subject: [RFC PATCH 1/2] docs: networking: device drivers: add can sub-folder

Add the container for CAN drivers documentation.

Signed-off-by: Dario Binacchi <[email protected]>
---

.../networking/device_drivers/can/index.rst | 18 ++++++++++++++++++
.../networking/device_drivers/index.rst | 1 +
2 files changed, 19 insertions(+)
create mode 100644 Documentation/networking/device_drivers/can/index.rst

diff --git a/Documentation/networking/device_drivers/can/index.rst b/Documentation/networking/device_drivers/can/index.rst
new file mode 100644
index 000000000000..218276818968
--- /dev/null
+++ b/Documentation/networking/device_drivers/can/index.rst
@@ -0,0 +1,18 @@
+.. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+Controller Area Network (CAN) Device Drivers
+============================================
+
+Device drivers for CAN devices.
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+.. only:: subproject and html
+
+ Indices
+ =======
+
+ * :ref:`genindex`
diff --git a/Documentation/networking/device_drivers/index.rst b/Documentation/networking/device_drivers/index.rst
index 3a5a1d46e77e..5f5cfdb2a300 100644
--- a/Documentation/networking/device_drivers/index.rst
+++ b/Documentation/networking/device_drivers/index.rst
@@ -11,6 +11,7 @@ Contents:
appletalk/index
atm/index
cable/index
+ can/index
cellular/index
ethernet/index
fddi/index
--
2.32.0


2022-01-07 08:13:34

by Dario Binacchi

[permalink] [raw]
Subject: [RFC PATCH 2/2] docs: networking: device drivers: can: add flexcan

Add initial documentation for Flexcan driver.

Signed-off-by: Dario Binacchi <[email protected]>

---

.../device_drivers/can/freescale/flexcan.rst | 25 +++++++++++++++++++
.../networking/device_drivers/can/index.rst | 2 ++
2 files changed, 27 insertions(+)
create mode 100644 Documentation/networking/device_drivers/can/freescale/flexcan.rst

diff --git a/Documentation/networking/device_drivers/can/freescale/flexcan.rst b/Documentation/networking/device_drivers/can/freescale/flexcan.rst
new file mode 100644
index 000000000000..1a5bb2ed08a3
--- /dev/null
+++ b/Documentation/networking/device_drivers/can/freescale/flexcan.rst
@@ -0,0 +1,25 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+=============================
+Flexcan CAN Controller driver
+=============================
+
+Authors: Marc Kleine-Budde <[email protected]>,
+Dario Binacchi <[email protected]>
+
+On/off RTR frames reception
+===========================
+
+ 1. interface down::
+
+ ethtool --set-priv-flags can0 rx-rtr {off|on}
+
+ 2. interface up::
+
+ ip link set dev can0 down
+ ethtool --set-priv-flags can0 rx-rtr {off|on}
+ ip link set dev can0 up
+
+Note. For the Flexcan on i.MX25, i.Mx28, i.MX35 and i.Mx53 SOCs, the reception
+of RTR frames is possible only if the controller is configured in RxFIFO mode.
+In this mode only 6 of the 64 message buffers are used for reception.
diff --git a/Documentation/networking/device_drivers/can/index.rst b/Documentation/networking/device_drivers/can/index.rst
index 218276818968..58b6e0ad3030 100644
--- a/Documentation/networking/device_drivers/can/index.rst
+++ b/Documentation/networking/device_drivers/can/index.rst
@@ -10,6 +10,8 @@ Contents:
.. toctree::
:maxdepth: 2

+ freescale/flexcan
+
.. only:: subproject and html

Indices
--
2.32.0


2022-01-07 19:20:33

by Marc Kleine-Budde

[permalink] [raw]
Subject: Re: [RFC PATCH 0/2] Add the first documentation for a CAN driver

On 07.01.2022 09:13:04, Dario Binacchi wrote:
> The series was born from the need to document the enabling at runtime
> reception of RTR frames for the Flexcan CAN controller.
> For more details see https://lore.kernel.org/all/[email protected]/

Thanks for the work, looks good. I've added some more text and send a
v3.

regards,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


Attachments:
(No filename) (630.00 B)
signature.asc (488.00 B)
Download all attachments