All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Luciano Coelho <coelho@ti.com>, <tony@atomide.com>,
	<linux-omap@vger.kernel.org>, <linux@arm.linux.org.uk>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [[PATCH v2]] OMAP: omap4-panda: add WiLink shared transport power functions
Date: Thu, 17 Jan 2013 11:34:31 +0200	[thread overview]
Message-ID: <20130117093417.GH10814@arwen.pp.htv.fi> (raw)
In-Reply-To: <50F7C4A7.5060202@ti.com>

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

On Thu, Jan 17, 2013 at 10:30:15AM +0100, Peter Ujfalusi wrote:
> Hi Luca,
> 
> On 01/16/2013 10:45 PM, Luciano Coelho wrote:
> > The code to enable and disable the WiLink shared transport has been
> > removed from the TI-ST driver, so it must be implemented in the board
> > files instead.  Add the relevant operations to Panda's board file.
> > 
> > Additionally, add the UART2 muxing data, so it's properly configured.
> > 
> > Cc: stable <stable@vger.kernel.org> [3.7]
> > Signed-off-by: Luciano Coelho <coelho@ti.com>
> > ---
> > 
> > In v2: use gpio_request_one() instead of gpio_request() and
> > gpio_direction_output(). (Thanks Fabio!)
> > 
> >  arch/arm/mach-omap2/board-omap4panda.c |   50 +++++++++++++++++++++++++++++---
> >  1 file changed, 46 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> > index 5c8e9ce..f44fccf 100644
> > --- a/arch/arm/mach-omap2/board-omap4panda.c
> > +++ b/arch/arm/mach-omap2/board-omap4panda.c
> > @@ -51,18 +51,50 @@
> >  #define GPIO_HUB_NRESET		62
> >  #define GPIO_WIFI_PMENA		43
> >  #define GPIO_WIFI_IRQ		53
> > +#define GPIO_BT_EN		46
> >  
> >  /* wl127x BT, FM, GPS connectivity chip */
> > +static int plat_kim_chip_enable(struct kim_data_s *kim_data)
> > +{
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +	mdelay(5);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_HIGH);
> > +	mdelay(100);
> > +
> > +	return 0;
> > +}
> > +
> > +static int plat_kim_chip_disable(struct kim_data_s *kim_data)
> > +{
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +	mdelay(1);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_HIGH);
> > +	mdelay(1);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +
> > +	return 0;
> > +}
> > +
> >  static struct ti_st_plat_data wilink_platform_data = {
> > -	.nshutdown_gpio	= 46,
> >  	.dev_name	= "/dev/ttyO1",
> >  	.flow_cntrl	= 1,
> >  	.baud_rate	= 3000000,
> > -	.chip_enable	= NULL,
> > -	.suspend	= NULL,
> > -	.resume		= NULL,
> > +	.chip_enable	= plat_kim_chip_enable,
> > +	.chip_disable	= plat_kim_chip_disable,
> 
> I just wonder how this is going to work with DT... You are not going to have
> the ability to use callback in this form.
> I think the GPIO handling should be done in the driver itself rather than in
> the board file.

that can (should ?) be moved to ti-st eventually. In fact I don't know
why it was removed in the first place, we would need Pavan to help us
with that query.

Still, for -rc, the minimal patch had to be cooked, right ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@ti.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Luciano Coelho <coelho@ti.com>,
	tony@atomide.com, linux-omap@vger.kernel.org,
	linux@arm.linux.org.uk, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [[PATCH v2]] OMAP: omap4-panda: add WiLink shared transport power functions
Date: Thu, 17 Jan 2013 11:34:31 +0200	[thread overview]
Message-ID: <20130117093417.GH10814@arwen.pp.htv.fi> (raw)
In-Reply-To: <50F7C4A7.5060202@ti.com>

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

On Thu, Jan 17, 2013 at 10:30:15AM +0100, Peter Ujfalusi wrote:
> Hi Luca,
> 
> On 01/16/2013 10:45 PM, Luciano Coelho wrote:
> > The code to enable and disable the WiLink shared transport has been
> > removed from the TI-ST driver, so it must be implemented in the board
> > files instead.  Add the relevant operations to Panda's board file.
> > 
> > Additionally, add the UART2 muxing data, so it's properly configured.
> > 
> > Cc: stable <stable@vger.kernel.org> [3.7]
> > Signed-off-by: Luciano Coelho <coelho@ti.com>
> > ---
> > 
> > In v2: use gpio_request_one() instead of gpio_request() and
> > gpio_direction_output(). (Thanks Fabio!)
> > 
> >  arch/arm/mach-omap2/board-omap4panda.c |   50 +++++++++++++++++++++++++++++---
> >  1 file changed, 46 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> > index 5c8e9ce..f44fccf 100644
> > --- a/arch/arm/mach-omap2/board-omap4panda.c
> > +++ b/arch/arm/mach-omap2/board-omap4panda.c
> > @@ -51,18 +51,50 @@
> >  #define GPIO_HUB_NRESET		62
> >  #define GPIO_WIFI_PMENA		43
> >  #define GPIO_WIFI_IRQ		53
> > +#define GPIO_BT_EN		46
> >  
> >  /* wl127x BT, FM, GPS connectivity chip */
> > +static int plat_kim_chip_enable(struct kim_data_s *kim_data)
> > +{
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +	mdelay(5);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_HIGH);
> > +	mdelay(100);
> > +
> > +	return 0;
> > +}
> > +
> > +static int plat_kim_chip_disable(struct kim_data_s *kim_data)
> > +{
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +	mdelay(1);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_HIGH);
> > +	mdelay(1);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +
> > +	return 0;
> > +}
> > +
> >  static struct ti_st_plat_data wilink_platform_data = {
> > -	.nshutdown_gpio	= 46,
> >  	.dev_name	= "/dev/ttyO1",
> >  	.flow_cntrl	= 1,
> >  	.baud_rate	= 3000000,
> > -	.chip_enable	= NULL,
> > -	.suspend	= NULL,
> > -	.resume		= NULL,
> > +	.chip_enable	= plat_kim_chip_enable,
> > +	.chip_disable	= plat_kim_chip_disable,
> 
> I just wonder how this is going to work with DT... You are not going to have
> the ability to use callback in this form.
> I think the GPIO handling should be done in the driver itself rather than in
> the board file.

that can (should ?) be moved to ti-st eventually. In fact I don't know
why it was removed in the first place, we would need Pavan to help us
with that query.

Still, for -rc, the minimal patch had to be cooked, right ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [[PATCH v2]] OMAP: omap4-panda: add WiLink shared transport power functions
Date: Thu, 17 Jan 2013 11:34:31 +0200	[thread overview]
Message-ID: <20130117093417.GH10814@arwen.pp.htv.fi> (raw)
In-Reply-To: <50F7C4A7.5060202@ti.com>

On Thu, Jan 17, 2013 at 10:30:15AM +0100, Peter Ujfalusi wrote:
> Hi Luca,
> 
> On 01/16/2013 10:45 PM, Luciano Coelho wrote:
> > The code to enable and disable the WiLink shared transport has been
> > removed from the TI-ST driver, so it must be implemented in the board
> > files instead.  Add the relevant operations to Panda's board file.
> > 
> > Additionally, add the UART2 muxing data, so it's properly configured.
> > 
> > Cc: stable <stable@vger.kernel.org> [3.7]
> > Signed-off-by: Luciano Coelho <coelho@ti.com>
> > ---
> > 
> > In v2: use gpio_request_one() instead of gpio_request() and
> > gpio_direction_output(). (Thanks Fabio!)
> > 
> >  arch/arm/mach-omap2/board-omap4panda.c |   50 +++++++++++++++++++++++++++++---
> >  1 file changed, 46 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> > index 5c8e9ce..f44fccf 100644
> > --- a/arch/arm/mach-omap2/board-omap4panda.c
> > +++ b/arch/arm/mach-omap2/board-omap4panda.c
> > @@ -51,18 +51,50 @@
> >  #define GPIO_HUB_NRESET		62
> >  #define GPIO_WIFI_PMENA		43
> >  #define GPIO_WIFI_IRQ		53
> > +#define GPIO_BT_EN		46
> >  
> >  /* wl127x BT, FM, GPS connectivity chip */
> > +static int plat_kim_chip_enable(struct kim_data_s *kim_data)
> > +{
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +	mdelay(5);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_HIGH);
> > +	mdelay(100);
> > +
> > +	return 0;
> > +}
> > +
> > +static int plat_kim_chip_disable(struct kim_data_s *kim_data)
> > +{
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +	mdelay(1);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_HIGH);
> > +	mdelay(1);
> > +	gpio_set_value(GPIO_BT_EN, GPIO_LOW);
> > +
> > +	return 0;
> > +}
> > +
> >  static struct ti_st_plat_data wilink_platform_data = {
> > -	.nshutdown_gpio	= 46,
> >  	.dev_name	= "/dev/ttyO1",
> >  	.flow_cntrl	= 1,
> >  	.baud_rate	= 3000000,
> > -	.chip_enable	= NULL,
> > -	.suspend	= NULL,
> > -	.resume		= NULL,
> > +	.chip_enable	= plat_kim_chip_enable,
> > +	.chip_disable	= plat_kim_chip_disable,
> 
> I just wonder how this is going to work with DT... You are not going to have
> the ability to use callback in this form.
> I think the GPIO handling should be done in the driver itself rather than in
> the board file.

that can (should ?) be moved to ti-st eventually. In fact I don't know
why it was removed in the first place, we would need Pavan to help us
with that query.

Still, for -rc, the minimal patch had to be cooked, right ?

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130117/fcb572ec/attachment.sig>

  reply	other threads:[~2013-01-17  9:34 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 21:45 [[PATCH v2]] OMAP: omap4-panda: add WiLink shared transport power functions Luciano Coelho
2013-01-16 21:45 ` Luciano Coelho
2013-01-16 21:45 ` Luciano Coelho
2013-01-17  9:30 ` Peter Ujfalusi
2013-01-17  9:30   ` Peter Ujfalusi
2013-01-17  9:30   ` Peter Ujfalusi
2013-01-17  9:34   ` Felipe Balbi [this message]
2013-01-17  9:34     ` Felipe Balbi
2013-01-17  9:34     ` Felipe Balbi
2013-01-17  9:55     ` Peter Ujfalusi
2013-01-17  9:55       ` Peter Ujfalusi
2013-01-17  9:55       ` Peter Ujfalusi
2013-01-17 10:05       ` Felipe Balbi
2013-01-17 10:05         ` Felipe Balbi
2013-01-17 10:05         ` Felipe Balbi
2013-01-17 10:09         ` Felipe Balbi
2013-01-17 10:09           ` Felipe Balbi
2013-01-17 10:09           ` Felipe Balbi
2013-01-17 10:35           ` Luciano Coelho
2013-01-17 10:35             ` Luciano Coelho
2013-01-17 10:35             ` Luciano Coelho
2013-01-17 10:40             ` Peter Ujfalusi
2013-01-17 10:40               ` Peter Ujfalusi
2013-01-17 10:40               ` Peter Ujfalusi
2013-01-17 17:31               ` Tony Lindgren
2013-01-17 17:31                 ` Tony Lindgren
2013-01-17 17:57                 ` Luciano Coelho
2013-01-17 17:57                   ` Luciano Coelho
2013-01-17 17:57                   ` Luciano Coelho
2013-01-17 23:16                   ` Tony Lindgren
2013-01-17 23:16                     ` Tony Lindgren
2013-01-18  8:58                     ` Luciano Coelho
2013-01-18  8:58                       ` Luciano Coelho
2013-01-18  8:58                       ` Luciano Coelho
2013-01-18 17:36                       ` Tony Lindgren
2013-01-18 17:36                         ` Tony Lindgren
2013-01-18 17:54                         ` Felipe Balbi
2013-01-18 17:54                           ` Felipe Balbi
2013-01-18 17:54                           ` Felipe Balbi
2013-01-18 18:05                           ` Tony Lindgren
2013-01-18 18:05                             ` Tony Lindgren
2013-01-18 19:08                         ` Luciano Coelho
2013-01-18 19:08                           ` Luciano Coelho
2013-01-18 19:08                           ` Luciano Coelho
2013-01-18 19:22                           ` Tony Lindgren
2013-01-18 19:22                             ` Tony Lindgren
2013-01-18 10:11                     ` Peter Ujfalusi
2013-01-18 10:11                       ` Peter Ujfalusi
2013-01-18 10:11                       ` Peter Ujfalusi
2013-01-18 17:49                       ` Tony Lindgren
2013-01-18 17:49                         ` Tony Lindgren
2013-01-23  8:55                         ` Peter Ujfalusi
2013-01-23  8:55                           ` Peter Ujfalusi
2013-01-23  8:55                           ` Peter Ujfalusi
2013-01-17  9:35   ` Luciano Coelho
2013-01-17  9:35     ` Luciano Coelho
2013-01-17  9:35     ` Luciano Coelho
2013-01-17  9:59     ` Peter Ujfalusi
2013-01-17  9:59       ` Peter Ujfalusi
2013-01-17  9:59       ` Peter Ujfalusi

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=20130117093417.GH10814@arwen.pp.htv.fi \
    --to=balbi@ti.com \
    --cc=coelho@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=peter.ujfalusi@ti.com \
    --cc=tony@atomide.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 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.