linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>, linux-can@vger.kernel.org
Subject: Re: [PATCH v5 4/6] can: introduce the data bitrate configuration for CAN FD
Date: Thu, 27 Feb 2014 19:05:30 +0100	[thread overview]
Message-ID: <530F7E6A.4050307@hartkopp.net> (raw)
In-Reply-To: <530EFAA0.4090000@pengutronix.de>

On 27.02.2014 09:43, Marc Kleine-Budde wrote:

>> +		if (priv->do_set_data_bittiming) {
>> +			/* Finally, set the bit-timing registers */
>> +			err = priv->do_set_data_bittiming(dev);
>> +			if (err)
>> +				return err;
>> +		}
> 
> Do we really need the do_set_data_bittiming() callback? Allmost all
> drivers set the bitrate during open and not asynchronously (when the
> interface is down) via the set_bittiming() callback. If there is a
> driver which really needs this callback, we can introduce it.

No. I assume you did not check the current implementation %-)

The bitrate is always set via do_set[_data]_bittiming() when the interface is
down - and *not* during the open process.

In the open process only the availability of the bitrate(s) is checked before
the controller is set into operational mode.

It is pretty straight forward to introduce do_set_data_bittiming() as a
different register set is addressed for CAN FD.

Regards,
Oliver

  reply	other threads:[~2014-02-27 18:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 22:10 [PATCH v5 0/6] Add CAN FD infrastructure for CAN driver Oliver Hartkopp
2014-02-26 22:10 ` [PATCH v5 1/6] can: preserve skbuff protocol in can_put_echo_skb Oliver Hartkopp
2014-02-26 22:10 ` [PATCH v5 2/6] can: only send bitrate data via netlink when available Oliver Hartkopp
2014-02-26 22:10 ` [PATCH v5 3/6] can: provide a separate bittiming_const parameter to bittiming functions Oliver Hartkopp
2014-02-26 22:11 ` [PATCH v5 4/6] can: introduce the data bitrate configuration for CAN FD Oliver Hartkopp
2014-02-27  8:43   ` Marc Kleine-Budde
2014-02-27 18:05     ` Oliver Hartkopp [this message]
2014-02-28 10:56       ` Marc Kleine-Budde
2014-02-28 12:20         ` Oliver Hartkopp
2014-02-28 12:30           ` Marc Kleine-Budde
2014-02-28 12:33             ` Oliver Hartkopp
2014-02-28 12:52               ` Marc Kleine-Budde
2014-02-28 12:58                 ` Oliver Hartkopp
2014-02-28 13:05                   ` Marc Kleine-Budde
2014-02-28 13:09                     ` Oliver Hartkopp
2014-02-28 13:18                       ` Marc Kleine-Budde
2014-03-04 20:44                     ` Marc Kleine-Budde
2014-02-26 22:11 ` [PATCH v5 5/6] can: allow to change the device mtu for CAN FD capable devices Oliver Hartkopp
2014-02-26 22:11 ` [PATCH v5 6/6] can: add bittiming check at interface open for CAN FD Oliver Hartkopp

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=530F7E6A.4050307@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).