All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mugunthan V N <mugunthanvnm-l0cyMroinI0@public.gmane.org>
To: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Hebbar Gururaja <gururaja.hebbar-l0cyMroinI0@public.gmane.org>,
	benoit.cousson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
Subject: Re: [net-next PATCH v3 1/6] net: cpsw: enhance pinctrl support
Date: Thu, 30 May 2013 13:38:23 +0530	[thread overview]
Message-ID: <51A708F7.8010804@ti.com> (raw)
In-Reply-To: <51A4B995.9050203-l0cyMroinI0@public.gmane.org>

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-l0cyMroinI0@public.gmane.org> [130526 11:28]:
>>> From: Hebbar Gururaja <gururaja.hebbar-l0cyMroinI0@public.gmane.org>
>>>
>>> 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-l0cyMroinI0@public.gmane.org>
>>> Signed-off-by: Mugunthan V N <mugunthanvnm-l0cyMroinI0@public.gmane.org>
>>> ---
>>>   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?

Regards
Mugunthan V N

  parent reply	other threads:[~2013-05-30  8:08 UTC|newest]

Thread overview: 21+ 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 ` Mugunthan V N
2013-05-26 18:23 ` [net-next PATCH v3 1/6] net: cpsw: enhance pinctrl support Mugunthan V N
2013-05-26 18:23   ` Mugunthan V N
2013-05-27 21:36   ` Tony Lindgren
2013-05-28 14:05     ` Mugunthan V N
2013-05-28 14:05       ` Mugunthan V N
     [not found]       ` <51A4B995.9050203-l0cyMroinI0@public.gmane.org>
2013-05-30  8:08         ` Mugunthan V N [this message]
2013-06-05 15:49           ` Tony Lindgren
2013-06-05 16:43             ` Mugunthan V N
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   ` 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   ` 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   ` 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   ` 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
2013-05-26 18:23   ` 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=51A708F7.8010804@ti.com \
    --to=mugunthanvnm-l0cymroini0@public.gmane.org \
    --cc=benoit.cousson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=gururaja.hebbar-l0cyMroinI0@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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 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.