public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: "Eric Bénard" <eric@eukrea.com>,
	linux-can@vger.kernel.org, "Sascha Hauer" <kernel@pengutronix.de>,
	"Wolfgang Grandegger" <wg@grandegger.com>
Subject: Re: [PATCH] can: flexcan: add PM support
Date: Tue, 08 May 2012 20:34:56 +0200	[thread overview]
Message-ID: <4FA96750.6020206@pengutronix.de> (raw)
In-Reply-To: <4FA95A17.8090406@hartkopp.net>

[-- Attachment #1: Type: text/plain, Size: 2727 bytes --]

On 05/08/2012 07:38 PM, Oliver Hartkopp wrote:
> On 08.05.2012 19:14, Eric Bénard wrote:
> 
>> Le Tue, 08 May 2012 17:46:09 +0200,
>> Marc Kleine-Budde <mkl@pengutronix.de> a écrit :
>>
>>> On 05/08/2012 05:30 PM, Eric Bénard wrote:
>>>> Hi Marc,
>>>>
>>>> Le Tue, 08 May 2012 17:18:34 +0200,
>>>> Marc Kleine-Budde <mkl@pengutronix.de> a écrit :
>>>>
>>>>> On 05/08/2012 05:12 PM, Eric Bénard wrote:
>>>>>> tested on an i.MX257
>>>>>
>>>>> What about the transceiver? Does is make sense to switch it off, too?
>>>>>
>>>> this could make sense on platform which have a transceiver with an
>>>> enable input. I can add flexcan_transceiver_switch after/before
>>>> flexcan_chip_disable/enable but won't be able to test that feature.
>>>
>>> I looked at two ethernet drivers: ethernet/intel/ixgbe/ixgbe_main.c and
>>> ethernet/intel/ixgbe/ixgbe_main.c and AFAICS they basically do the same
>>> as in open/close. (btw: the flexcan driver switches the transceiver
>>> on/off on open/close.) I haven't implemented any network driver pm yet,
>>> but what is a driver supposed to do in suspend/resume?
>>>
>> concerning the transceiver : that depends if you need to resume when
>> receiving a message on the CAN bus in which case you can't disable the
>> transceiver (btw, I have an other patch which enable wakeup when
>> receiving a message on the CAN bus, but I need to clean and test it
>> again).
> 
> 
> I wonder if you mix up the enabling/disabling of the CAN transceiver (trx)
> with the entire system power management.
> 
> E.g. if you take the TJA1054A as an example, you can switch the trx into a
> mode that switches off the power supply (INH-line) in order to wake up with a
> received CAN frame, which switches on the power supply and boots the system.
> 
> Even if you don't switch the power supply with the INH pin the trx wakes up
> with CAN traffic in this mode.
> 
> To me switching the trx modes only makes sense to implement system power
> management states. IMO there's no need to switch them when setting the
> interface to up/down state. Or did i miss anything?

In the current implementation you can register a callback via
platform_data to enable/disable the transceiver. It's up to the board to
do something useful with it.

I think for now I'll take Eric's patch as it is, until we've implemented
something more complicated to support automotive style transceivers :)

Marc

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  parent reply	other threads:[~2012-05-08 18:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08 15:12 [PATCH] can: flexcan: add PM support Eric Bénard
2012-05-08 15:18 ` Marc Kleine-Budde
2012-05-08 15:30   ` Eric Bénard
2012-05-08 15:46     ` Marc Kleine-Budde
2012-05-08 17:14       ` Eric Bénard
2012-05-08 17:38         ` Oliver Hartkopp
2012-05-08 18:02           ` Eric Bénard
2012-05-08 18:34           ` Marc Kleine-Budde [this message]
2012-05-09  8:16             ` Kurt Van Dijck
2012-05-09 14:35               ` Oliver Hartkopp
2012-05-09 14:53                 ` [PATCH] can: trx support Kurt Van Dijck
2012-05-08 19:09 ` [PATCH] can: flexcan: add PM support Marc Kleine-Budde

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=4FA96750.6020206@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=eric@eukrea.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox