From: Tony Lindgren <tony@atomide.com>
To: Mugunthan V N <mugunthanvnm@ti.com>
Cc: netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
Hebbar Gururaja <gururaja.hebbar@ti.com>,
benoit.cousson@linaro.org, linux-omap@vger.kernel.org,
davem@davemloft.net
Subject: Re: [net-next PATCH v3 1/6] net: cpsw: enhance pinctrl support
Date: Wed, 5 Jun 2013 08:49:22 -0700 [thread overview]
Message-ID: <20130605154921.GW3331@atomide.com> (raw)
In-Reply-To: <51A708F7.8010804@ti.com>
* Mugunthan V N <mugunthanvnm@ti.com> [130530 01:14]:
> On 5/28/2013 7:35 PM, Mugunthan V N wrote:
> >On 5/28/2013 3:06 AM, Tony Lindgren wrote:
> >>* Mugunthan V N <mugunthanvnm@ti.com> [130526 11:28]:
> >>>From: Hebbar Gururaja <gururaja.hebbar@ti.com>
> >>>
> >>>Amend cpsw controller to optionally take a pin control handle and set
> >>>the state of the pins to:
> >>>
> >>>- "default" on boot, resume
> >>>- "sleep" on suspend()
> >>>
> >>>This should make it possible to optimize energy usage for the pins
> >>>for the suspend/resume cycle.
> >>>
> >>>If any of the above pin states are missing in dt, a warning message
> >>>about the missing state is displayed.
> >>>If certain pin-states are not available, to remove this warning message
> >>>pass respective state name with null phandler.
> >>>
> >>>Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
> >>>Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> >>>---
> >>> drivers/net/ethernet/ti/cpsw.c | 48
> >>>++++++++++++++++++++++++++++++++++++++++
> >>> 1 file changed, 48 insertions(+)
> >>>
> >>>diff --git a/drivers/net/ethernet/ti/cpsw.c
> >>>b/drivers/net/ethernet/ti/cpsw.c
> >>>index 21a5b29..c9ed730 100644
> >>>--- a/drivers/net/ethernet/ti/cpsw.c
> >>>+++ b/drivers/net/ethernet/ti/cpsw.c
> >>>@@ -35,6 +35,7 @@
> >>> #include <linux/if_vlan.h>
> >>> #include <linux/platform_data/cpsw.h>
> >>>+#include <linux/pinctrl/consumer.h>
> >>> #include "cpsw_ale.h"
> >>> #include "cpts.h"
> >>>@@ -351,6 +352,11 @@ struct cpsw_priv {
> >>> bool irq_enabled;
> >>> struct cpts *cpts;
> >>> u32 emac_port;
> >>>+
> >>>+ /* Two optional pin states - default & sleep */
> >>>+ struct pinctrl *pinctrl;
> >>>+ struct pinctrl_state *pins_def;
> >>>+ struct pinctrl_state *pins_sleep;
> >>> };
> >>Which pins do you need to dynamically remux? If it's not all
> >>the pins, you should have three sets: default, active and idle.
> >>This way the static pins in the default group don't need to be
> >>constantly toggled.
> >>
> >>Regards,
> >>
> >>Tony
> >Tony
> >
> >I am using this for all the pins, in probe all the cpsw pins will
> >be configured
> >and i have used the same in suspend/resume callback for power saving.
> >
> Tony
>
> Do you have any comments on this, or is it ok with two pinctrl_state nodes?
If you always need to remux all the pins, then yes that's fine with me.
Regards,
Tony
next prev parent reply other threads:[~2013-06-05 15:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-26 18:23 [net-next PATCH v3 0/6] Adding pinctrl PM support for CPSW and MDIO Mugunthan V N
2013-05-26 18:23 ` [net-next PATCH v3 1/6] net: cpsw: enhance pinctrl support Mugunthan V N
2013-05-27 21:36 ` Tony Lindgren
2013-05-28 14:05 ` Mugunthan V N
[not found] ` <51A4B995.9050203-l0cyMroinI0@public.gmane.org>
2013-05-30 8:08 ` Mugunthan V N
2013-06-05 15:49 ` Tony Lindgren [this message]
2013-06-05 16:43 ` Mugunthan V N
2013-05-26 18:23 ` [net-next PATCH v3 2/6] net: davinci_mdio: " Mugunthan V N
2013-05-26 18:23 ` [net-next PATCH v3 3/6] ARM: dts: AM33XX: Add pinmux configuration for CPSW to beaglebone Mugunthan V N
2013-05-26 18:23 ` [net-next PATCH v3 4/6] ARM: dts: AM33XX: Add CPSW phy_id device tree data to am335x-evmsk Mugunthan V N
2013-05-26 18:23 ` [net-next PATCH v3 5/6] ARM: dts: AM33XX: Add pinmux configuration for CPSW to EVMsk Mugunthan V N
2013-05-26 18:23 ` [net-next PATCH v3 6/6] ARM: dts: AM33XX: Add pinmux configuration for CPSW to am335x EVM Mugunthan V N
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=20130605154921.GW3331@atomide.com \
--to=tony@atomide.com \
--cc=benoit.cousson@linaro.org \
--cc=davem@davemloft.net \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=gururaja.hebbar@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/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).