From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [net-next PATCH v3 1/6] net: cpsw: enhance pinctrl support Date: Mon, 27 May 2013 14:36:01 -0700 Message-ID: <20130527213600.GO13507@atomide.com> References: <1369592616-23972-1-git-send-email-mugunthanvnm@ti.com> <1369592616-23972-2-git-send-email-mugunthanvnm@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1369592616-23972-2-git-send-email-mugunthanvnm@ti.com> Sender: linux-omap-owner@vger.kernel.org To: Mugunthan V N Cc: netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, Hebbar Gururaja , benoit.cousson@linaro.org, linux-omap@vger.kernel.org, davem@davemloft.net List-Id: devicetree@vger.kernel.org * Mugunthan V N [130526 11:28]: > From: Hebbar Gururaja > > 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 > Signed-off-by: Mugunthan V N > --- > 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 > > #include > +#include > > #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