From: Andreas Larsson <andreas@gaisler.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
linux-can@vger.kernel.org, software@gaisler.com
Subject: Re: [PATCH v2] can: sja1000: Add support for listen-only mode and one-shot mode
Date: Wed, 19 Sep 2012 07:55:40 +0200 [thread overview]
Message-ID: <50595E5C.4000207@gaisler.com> (raw)
In-Reply-To: <5058AE27.5020406@hartkopp.net>
On 09/18/2012 07:23 PM, Oliver Hartkopp wrote:
> On 18.09.2012 19:17, Marc Kleine-Budde wrote:
> What about using just the constants:
>
> if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
> priv->write_reg(priv, REG_MOD, MOD_LOM);
> else
> priv->write_reg(priv, REG_MOD, 0x00);
>
> Which omits any experiments with extra variables ...
> The same here:
>
> if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT)
> sja1000_write_cmdreg(priv, CMD_TR|CMD_AT);
> else
> sja1000_write_cmdreg(priv, CMD_TR);
Yes, that looks nice.
Cheers,
Andreas
next prev parent reply other threads:[~2012-09-19 5:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 15:58 [PATCH] can: sja1000: Add support for listen-only mode and one-shot mode Andreas Larsson
2012-09-18 13:46 ` Marc Kleine-Budde
2012-09-18 14:11 ` Wolfgang Grandegger
2012-09-18 15:54 ` Andreas Larsson
2012-09-18 16:16 ` Ira W. Snyder
2012-09-18 16:20 ` Marc Kleine-Budde
2012-09-18 16:34 ` [PATCH v2] " Andreas Larsson
2012-09-18 17:17 ` Marc Kleine-Budde
2012-09-18 17:23 ` Oliver Hartkopp
2012-09-19 5:55 ` Andreas Larsson [this message]
2012-09-18 18:27 ` Wolfgang Grandegger
2012-09-19 5:56 ` Andreas Larsson
2012-09-19 7:12 ` [PATCH v3] " Andreas Larsson
2012-09-19 7:33 ` Wolfgang Grandegger
2012-09-19 10:24 ` [PATCH v4] " Andreas Larsson
2012-09-19 16:49 ` Oliver Hartkopp
2012-09-20 7:50 ` [PATCH v5] " Andreas Larsson
2012-09-21 8:08 ` Marc Kleine-Budde
2012-09-21 8:12 ` Andreas Larsson
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=50595E5C.4000207@gaisler.com \
--to=andreas@gaisler.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
--cc=software@gaisler.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.