From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Hartkopp Subject: Re: [PATCH] can: flexcan: add PM support Date: Tue, 08 May 2012 19:38:31 +0200 Message-ID: <4FA95A17.8090406@hartkopp.net> References: <1336489937-29645-1-git-send-email-eric@eukrea.com> <4FA9394A.90303@pengutronix.de> <20120508173001.31ce8f0c@eb-e6520> <4FA93FC1.7030808@pengutronix.de> <20120508191459.703c4369@eb-e6520> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mo-p00-ob.rzone.de ([81.169.146.161]:64043 "EHLO mo-p00-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757Ab2EHRie (ORCPT ); Tue, 8 May 2012 13:38:34 -0400 In-Reply-To: <20120508191459.703c4369@eb-e6520> Sender: linux-can-owner@vger.kernel.org List-ID: To: =?ISO-8859-1?Q?Eric_B=E9nard?= Cc: Marc Kleine-Budde , linux-can@vger.kernel.org, Sascha Hauer , Wolfgang Grandegger On 08.05.2012 19:14, Eric B=E9nard wrote: > Le Tue, 08 May 2012 17:46:09 +0200, > Marc Kleine-Budde a =E9crit : >=20 >> On 05/08/2012 05:30 PM, Eric B=E9nard wrote: >>> Hi Marc, >>> >>> Le Tue, 08 May 2012 17:18:34 +0200, >>> Marc Kleine-Budde a =E9crit : >>> >>>> On 05/08/2012 05:12 PM, Eric B=E9nard wrote: >>>>> tested on an i.MX257 >>>> >>>> What about the transceiver? Does is make sense to switch it off, t= oo? >>>> >>> 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 s= ame >> as in open/close. (btw: the flexcan driver switches the transceiver >> on/off on open/close.) I haven't implemented any network driver pm y= et, >> 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 th= e > 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 (t= rx) with the entire system power management. E.g. if you take the TJA1054A as an example, you can switch the trx int= o 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 sy= stem. Even if you don't switch the power supply with the INH pin the trx wake= s up with CAN traffic in this mode. To me switching the trx modes only makes sense to implement system powe= r management states. IMO there's no need to switch them when setting the interface to up/down state. Or did i miss anything? Regards, Oliver