public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sekhar Nori <nsekhar@ti.com>
To: "Philip, Avinash" <avinashphilip@ti.com>
Cc: "khilman@deeprootsystems.com" <khilman@deeprootsystems.com>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"davinci-linux-open-source@linux.davincidsp.com" 
	<davinci-linux-open-source@linux.davincidsp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/11] gpio: davinci: Modify to platform driver
Date: Thu, 13 Jun 2013 11:47:52 +0530	[thread overview]
Message-ID: <51B96410.7000807@ti.com> (raw)
In-Reply-To: <518397C60809E147AF5323E0420B992E3EADA252@DBDE04.ent.ti.com>

On 6/12/2013 5:40 PM, Philip, Avinash wrote:
> On Wed, Jun 12, 2013 at 13:13:59, Nori, Sekhar wrote:
>> On 6/11/2013 6:25 PM, Philip, Avinash wrote:
>>
>>> On Tue, Jun 11, 2013 at 17:26:06, Nori, Sekhar wrote:
>>
>>>> On 5/22/2013 12:40 PM, Philip Avinash wrote:
>>
>>>>> @@ -179,13 +204,10 @@ static int __init davinci_gpio_setup(void)
>>>>>  		gpiochip_add(&ctlrs[i].chip);
>>>>>  	}
>>>>>  
>>>>> -	soc_info->gpio_ctlrs = ctlrs;
>>>>
>>>>> -	soc_info->gpio_ctlrs_num = DIV_ROUND_UP(ngpio, 32);
>>>>
>>>> You drop setting gpio_ctlrs_num here and don't introduce it anywhere
>>>> else in the patchset so in effect you render the inline gpio get/set API
>>>> useless. Looks like this initialization should be moved to platform code?
>>>
>>> With [PATCH 08/11] ARM: davinci: start using gpiolib support gpio get/set API
>>> Has no more dependency on soc_info->gpio_ctlrs_num.
>>
>> With this series, you have removed support for inline gpio get/set API.
>> I see that the inline functions are still available for use on
>> tnetv107x. I wonder why it is important to keep these for tnetv107x when
>> not necessary for other DaVinci devices?
> 
> To support DT boot in da850, gpio davinci has to be converted to a driver and
> remove references to davinci_soc_info from driver. But tnetv107x has 
> separate GPIO driver and reference to davinci_soc_info can also be removed.
> But I didn't found defconfig support for tnetv107x platforms and left untouched.
> As I will not be able to build and test on tnetv107x, I prefer to not touch it.

You can always build it by enabling it in menuconfig. Its an ARMv6
platform so you will have to disable other ARMv5 based platforms from
while enabling it. ARMv5 and ARMv6 cannot co-exist in the same image.

> 
>>
>> When you are removing this feature, please note it prominently in your
>> cover letter and patch description.
> 
> Ok
> 
>> Also, please provide some data on 
>> how the latency now compares to that of inline access earlier. This is
>> important especially for the read.
> 
> I am not sure whether I understood correctly or not? Meanwhile I had done
> an experiment by reading printk timing before and after gpio_get_value from
> a test module. I think this will help in software latency for inline access over
> gpiolib specific access.
> 
> gpio_get_value latency testing code
> 
> +
> +       local_irq_disable();
> +       pr_emerg("%d %x\n", __LINE__, jiffies);
> +       gpio_get_value(gpio_num);
> +       pr_emerg("%d %x\n", __LINE__, jiffies);
> +       local_irq_enable();
> 
> inline gpio functions with interrupt disabled
> [   29.734337] 81 ffff966c
> [   29.736847] 83 ffff966c
> 
> Time diff = 	0.00251
> 
> gpio library with interrupt disabled
> 
> [  272.876763] 81 fffff567
> [  272.879291] 83 fffff567
> 
> Time diff =	0.002528
> 
> Inline function takes less time as expected.

Okay, please note these experiments in your cover letter. Its an 18usec
difference. I have no reference to say if that will affect any
application, but it will at least serve as information for someone who
may get affected by it.

> 
>> For the writes, gpio clock will
>> mostly determine how soon the value changes on the pin.
>>
>> I am okay with removing the inline access feature. It helps simplify
>> code and most arm machines don't use them. I would just like to see some
>> data for justification as this can be seen as feature regression. Also,
>> if we are removing it, its better to also remove it completely and get
>> the LOC savings instead of just stopping its usage.
> 
> I see build failure with below patch for tnetv107x
> [v6,6/6] Davinci: tnetv107x default configuration 

Where is this patch? What is the commit-id if it is in mainline? Where
is the failure log?

> 
> So I prefer to leave tnetv107x platform for now.

I don't think that's acceptable. At least by me.

Thanks,
Sekhar

  reply	other threads:[~2013-06-13  6:18 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22  7:10 [PATCH 00/11] Convert GPIO Davinci to platform driver Philip Avinash
2013-05-22  7:10 ` [PATCH 01/11] ARM: davinci: GPIO: Add platform data structure Philip Avinash
2013-05-30 18:06   ` Linus Walleij
2013-06-11 10:36   ` Sekhar Nori
2013-06-11 11:10     ` Sergei Shtylyov
2013-06-11 12:53     ` Philip, Avinash
2013-05-22  7:10 ` [PATCH 02/11] gpio: davinci: coding style correction Philip Avinash
2013-05-22 12:59   ` Sergei Shtylyov
2013-05-23  6:27     ` Philip, Avinash
2013-05-22 14:40   ` Russell King - ARM Linux
2013-05-23  6:27     ` Philip, Avinash
2013-06-11 11:42   ` Sekhar Nori
2013-05-22  7:10 ` [PATCH 03/11] gpio: davinci: Modify to platform driver Philip Avinash
2013-05-30 18:12   ` Linus Walleij
2013-06-11 11:56   ` Sekhar Nori
2013-06-11 12:55     ` Philip, Avinash
2013-06-12  7:43       ` Sekhar Nori
2013-06-12 12:10         ` Philip, Avinash
2013-06-13  6:17           ` Sekhar Nori [this message]
2013-06-13  7:32             ` Philip, Avinash
2013-06-13  8:29               ` Sekhar Nori
2013-06-13  9:18                 ` Philip, Avinash
2013-05-22  7:10 ` [PATCH 04/11] ARM: davinci: da8xx: creation of gpio platform device Philip Avinash
2013-05-30 18:14   ` Linus Walleij
2013-05-22  7:10 ` [PATCH 05/11] ARM: davinci: creation of gpio platform device for dm platforms Philip Avinash
2013-05-30 18:15   ` Linus Walleij
2013-05-22  7:10 ` [PATCH 06/11] ARM: davinci: da8xx: gpio device creation Philip Avinash
2013-05-30 18:16   ` Linus Walleij
2013-05-22  7:10 ` [PATCH 07/11] ARM: davinci: create davinci gpio device for dm platforms Philip Avinash
2013-05-30 18:16   ` Linus Walleij
2013-05-22  7:10 ` [PATCH 08/11] ARM: davinci: start using gpiolib support Philip Avinash
2013-05-30 18:19   ` Linus Walleij
2013-05-22  7:10 ` [PATCH 09/11] gpio: davinci: DT changes for driver Philip Avinash
2013-05-30 18:25   ` Linus Walleij
2013-06-10 11:45     ` Philip, Avinash
2013-05-22  7:10 ` [PATCH 10/11] ARM: davinci: da850: add GPIO DT entries Philip Avinash
2013-05-22  7:10 ` [PATCH 11/11] ARM: davinci: da850 evm: add GPIO DT data Philip Avinash
2013-05-30 18:26   ` Linus Walleij
2013-05-30 18:04 ` [PATCH 00/11] Convert GPIO Davinci to platform driver Linus Walleij
2013-06-07  8:10 ` Sekhar Nori
2013-06-10  9:02   ` Philip, Avinash
2013-06-11  4:39     ` Sekhar Nori
2013-06-11  6:49       ` Philip, Avinash
2013-06-11 11:40         ` Sekhar Nori

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=51B96410.7000807@ti.com \
    --to=nsekhar@ti.com \
    --cc=avinashphilip@ti.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=grant.likely@secretlab.ca \
    --cc=khilman@deeprootsystems.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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