All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
Cc: Russell King - ARM Linux
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
	Thierry Reding
	<thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>,
	ARM kernel mailing list
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: Tegra board file deprecation schedule
Date: Sun, 29 Apr 2012 13:16:38 -0600	[thread overview]
Message-ID: <4F9D9396.9070009@wwwdotorg.org> (raw)
In-Reply-To: <1388911.4olGsS8Z0g@ax5200p>

On 04/29/2012 12:11 PM, Marc Dietrich wrote:
> On Saturday 28 April 2012 22:34:56 Russell King - ARM Linux wrote:
>> On Sat, Apr 28, 2012 at 06:09:32PM +0200, Marc Dietrich wrote:
>>> Another (maybe a bit off-topic) thing that puzzels me is the how to assign
>>> the clock to the nvec.
>>
>> What's the nvec?
> 
> it is the embedded controller used on many first gen tegra2 boards 
> (drivers/staging/nvec). Do you remember commit 55dc6ee7 ?
> 
>>> The device needs the clock (tegra-i2c.2) but there is no sane way to get
>>> it. I was thinking to add an device name alias (nvec = tegra-i2c.2) to
>>> the board file so I can use clk_get(&pdev->dev, NULL) instead of
>>> clk_get_sys which seems to be unwanted.
>>
>> clk_get() is preferred in drivers which have struct device's to get them.
>> And if you know the device name, then I see no problem with the aliasing
>> approach.
> 
> I'm just looking for a way to use clk_get if two devices, tegra-i2c and nvec 
> (or tegra-i2c-slave in the future) share the same clock. 

Oh, you mean the I2C controller clock.

The correct approach here is to remove all the I2C logic from the NVEC
driver and add I2C slave support to the real I2C driver. Then, NVEC
becomes just a protocol driver for the slave transactions. Then, there
is no clock to deal with.

WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: Tegra board file deprecation schedule
Date: Sun, 29 Apr 2012 13:16:38 -0600	[thread overview]
Message-ID: <4F9D9396.9070009@wwwdotorg.org> (raw)
In-Reply-To: <1388911.4olGsS8Z0g@ax5200p>

On 04/29/2012 12:11 PM, Marc Dietrich wrote:
> On Saturday 28 April 2012 22:34:56 Russell King - ARM Linux wrote:
>> On Sat, Apr 28, 2012 at 06:09:32PM +0200, Marc Dietrich wrote:
>>> Another (maybe a bit off-topic) thing that puzzels me is the how to assign
>>> the clock to the nvec.
>>
>> What's the nvec?
> 
> it is the embedded controller used on many first gen tegra2 boards 
> (drivers/staging/nvec). Do you remember commit 55dc6ee7 ?
> 
>>> The device needs the clock (tegra-i2c.2) but there is no sane way to get
>>> it. I was thinking to add an device name alias (nvec = tegra-i2c.2) to
>>> the board file so I can use clk_get(&pdev->dev, NULL) instead of
>>> clk_get_sys which seems to be unwanted.
>>
>> clk_get() is preferred in drivers which have struct device's to get them.
>> And if you know the device name, then I see no problem with the aliasing
>> approach.
> 
> I'm just looking for a way to use clk_get if two devices, tegra-i2c and nvec 
> (or tegra-i2c-slave in the future) share the same clock. 

Oh, you mean the I2C controller clock.

The correct approach here is to remove all the I2C logic from the NVEC
driver and add I2C slave support to the real I2C driver. Then, NVEC
becomes just a protocol driver for the slave transactions. Then, there
is no clock to deal with.

  parent reply	other threads:[~2012-04-29 19:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 21:24 Tegra board file deprecation schedule Stephen Warren
2012-04-27 21:24 ` Stephen Warren
     [not found] ` <4F9B0E7C.1060408-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-27 21:39   ` Olof Johansson
2012-04-27 21:39     ` Olof Johansson
     [not found]     ` <CAOesGMh3NY4cQERSQY-p0QsMtcCXyhkdGSGnnrckcz8-DPjbBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-27 21:53       ` Stephen Warren
2012-04-27 21:53         ` Stephen Warren
     [not found]         ` <4F9B1568.9070704-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-27 22:00           ` Fabio Estevam
2012-04-27 22:00             ` Fabio Estevam
     [not found]             ` <CAOMZO5Cnd9knDUuc4aZrPrtk5YKUwpr-oJhUnu=z94=9CfY1ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-27 22:20               ` Stephen Warren
2012-04-27 22:20                 ` Stephen Warren
2012-04-28 16:09       ` Marc Dietrich
2012-04-28 16:09         ` Marc Dietrich
2012-04-28 21:34         ` Russell King - ARM Linux
2012-04-28 21:34           ` Russell King - ARM Linux
     [not found]           ` <20120428213456.GD27792-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-04-29 18:11             ` Marc Dietrich
2012-04-29 18:11               ` Marc Dietrich
2012-04-29 18:56               ` Russell King - ARM Linux
2012-04-29 18:56                 ` Russell King - ARM Linux
2012-04-29 19:16               ` Stephen Warren [this message]
2012-04-29 19:16                 ` Stephen Warren
     [not found]                 ` <4F9D9396.9070009-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-30  8:58                   ` Marc Dietrich
2012-04-30  8:58                     ` Marc Dietrich
2012-04-30 15:58                     ` Stephen Warren
2012-04-30 15:58                       ` Stephen Warren
     [not found]                       ` <4F9EB68A.3080309-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-30 16:51                         ` Marc Dietrich
2012-04-30 16:51                           ` Marc Dietrich
2012-04-29 19:21         ` Stephen Warren
2012-04-29 19:21           ` Stephen Warren
     [not found]           ` <4F9D94B3.4070903-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-30  9:00             ` Marc Dietrich
2012-04-30  9:00               ` Marc Dietrich
2012-04-28 21:26   ` Lucas Stach
2012-04-28 21:26     ` Lucas Stach
2012-04-29 19:25     ` Stephen Warren
2012-04-29 19:25       ` Stephen Warren

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=4F9D9396.9070009@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marvin24-Mmb7MZpHnFY@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@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.