From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Cc: "Marc Kleine-Budde" <mkl@pengutronix.de>,
"Kołłątaj, Remigiusz" <remigiusz.kollataj@mobica.com>,
"Uwe Bonnes" <bon@elektron.ikp.physik.tu-darmstadt.de>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
"Oliver Hartkopp" <socketcan@hartkopp.net>
Subject: Re: Adding new CAN driver
Date: Wed, 02 Nov 2016 17:08:45 +0100 [thread overview]
Message-ID: <1490105.s3iJfGbYsS@ws-stein> (raw)
In-Reply-To: <SG2PR06MB1038F0416E850F0C09BC5CCEC3A00@SG2PR06MB1038.apcprd06.prod.outlook.com>
On Wednesday 02 November 2016 15:49:50, Ramesh Shanmugasundaram wrote:
> > > > > I didn't get a chance to work on adding support for termination to
> > > > > "ip". Before investing any effort I would prefer to get
> > > > > confirmation from Oliver of Marc that the direction is right.
> > > > > Anyway setting up termination via sysfs works just fine. It is
> > > > > described in readme file in repository.
> > > >
> > > > I'd like to see a netlink interface for this. Oliver what about
> > > > adding it to CTRL_MODE?
> > >
> > > Is it about the CAN bus termination? Why the driver need to be aware of
> >
> > it?
> >
> > > If it needed for some reason shouldn't it be a device tree property of
> > > that device/bridge node?
> >
> > I would consider this as a feature, which has to be enabled or disabled on
> > demand dynamically, depending on current physical connection, especially
> > regarding USB devices. In thise cases there is also no device tree
> > applicable.
>
> OK. My question was on the lines - "Is the termination information is needed
> on a register of the CAN device that the driver manages?" There are cases
> where the termination is provided by the D-sub connector. The controller
> should just see bus error when improperly terminated. I don't know about
> USB based devices and please forgive me if this is the norm.
No problem, I just wanted to point out that device tree is not suitable in
this case.
> But this is physical layer information as Oliver mentioned. The CAN
> transceiver may even require some start-up state that may be enabled by
> setting couple of GPIOs (as on my board). Yes, it is part of the CAN
> interface configuration but it not part of the CAN controller driver. I
> think we could map it to Ethernet MAC & PHY case - isn't it?
The transceiver might be managed by regulators as done by e.g. flexcan. This
is part of the hardware description, so device tree here is fine.
But in my opinion bus termination is an end user configuration which might
change rather often than not. It might be independent of the controller driver
as e.g. in flexcan, but it might be part of the device as in USB hardware
which requires some specific command to change bus termination.
IMHO it makes no sense to split an USB interface driver into two parts using
the same interface in the end.
Best regards,
Alexander
next prev parent reply other threads:[~2016-11-02 16:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 9:11 Adding new CAN driver Kołłątaj, Remigiusz
2016-10-21 16:37 ` Oliver Hartkopp
2016-10-21 18:47 ` Kołłątaj, Remigiusz
2016-10-22 11:57 ` Oliver Hartkopp
2016-10-23 9:39 ` Kołłątaj, Remigiusz
2016-11-01 9:48 ` Uwe Bonnes
2016-11-02 7:23 ` Kołłątaj, Remigiusz
2016-11-02 8:48 ` Marc Kleine-Budde
2016-11-02 9:37 ` Oliver Hartkopp
2016-11-02 13:38 ` Ramesh Shanmugasundaram
2016-11-02 13:59 ` Marc Kleine-Budde
2016-11-02 14:14 ` Alexander Stein
2016-11-02 15:49 ` Ramesh Shanmugasundaram
2016-11-02 16:08 ` Alexander Stein [this message]
2016-11-02 18:03 ` Kołłątaj, Remigiusz
2016-11-03 15:50 ` Oliver Hartkopp
2016-11-03 21:24 ` Kurt Van Dijck
2016-11-04 11:06 ` Ramesh Shanmugasundaram
2016-11-07 21:24 ` Oliver Hartkopp
2016-11-08 9:36 ` Ramesh Shanmugasundaram
2016-11-08 20:19 ` Oliver Hartkopp
2016-11-10 9:18 ` Kurt Van Dijck
2016-11-11 5:40 ` Tom Evans
2016-11-11 8:04 ` Ramesh Shanmugasundaram
2016-11-25 14:16 ` CAN Termination API - was " Oliver Hartkopp
2016-12-21 17:54 ` Kołłątaj, Remigiusz
2016-12-22 9:39 ` Ramesh Shanmugasundaram
2016-12-30 19:20 ` Kurt Van Dijck
2017-01-05 13:52 ` Oliver Hartkopp
2016-11-02 19:41 ` termination? Kurt Van Dijck
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=1490105.s3iJfGbYsS@ws-stein \
--to=alexander.stein@systec-electronic.com \
--cc=bon@elektron.ikp.physik.tu-darmstadt.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=ramesh.shanmugasundaram@bp.renesas.com \
--cc=remigiusz.kollataj@mobica.com \
--cc=socketcan@hartkopp.net \
/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.