All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sekhar Nori <nsekhar@ti.com>
To: David Lechner <david@lechnology.com>,
	Kevin Hilman <khilman@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: Axel Haslam <ahaslam@baylibre.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 22:43:04 +0530	[thread overview]
Message-ID: <2100252f-0165-96e7-2403-20e1f2d6e4e9@ti.com> (raw)
In-Reply-To: <0302c410-4b05-3a5b-3801-5ab73089a9e2@lechnology.com>

On Wednesday 26 October 2016 10:07 PM, David Lechner wrote:
> On 10/26/2016 02:59 AM, Sekhar Nori wrote:
>> On Wednesday 26 October 2016 08:36 AM, David Lechner wrote:
>>> Up to this point, the USB phy clock configuration was handled
>>> manually in
>>> the board files and in the usb drivers. This adds proper clocks so that
>>> the usb drivers can use clk_get and clk_enable and not have to worry
>>> about
>>> the details. Also, the related code is removed from the board files and
>>> replaced with the new clock registration functions.
>>>
>>> Signed-off-by: David Lechner <david@lechnology.com>
>>> Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
>>> ---
>>>
>>> I have added "ARM: davinci: da8xx: Enable the usb20 "per" clk on
>>> phy_clk_enable"
>>> from Axel Haslam to this patch.
>>>
>>> In the review of Axel's patch, Sekhar said:
>>>
>>>> We should not be using a NULL device pointer here. Can you pass the
>>>> musb
>>>> device pointer available in the same file? Also, da850_clks[] in
>>>> da850.c
>>>> needs to be fixed to add the matching device name.
>>>
>>> However, the musb device may not be registered. The usb20_clk can be
>>> used to
>>> supply a 48MHz clock to USB 1.1 (ohci) without using the musb device.
>>> So, I am
>>> inclined to leave this as NULL.
>>
>> But clock look-up has nothing to do with device being registered AFAICT.
>> It is used to identify the clock consumer. Passing NULL there means the
>> clock is not associated with any device. Which is not correct as we are
>> specifically looking at MUSB module clock.
>>
>> Thanks,
>> Sekhar
>>
> 
> FWIW, clk_get() uses dev_name() to get the device name, which will
> return NULL until after the platform device is registered.

I believe you can set init_name in the device to setup an initial name
until registration.

> 
> I can add the device references anyway. However, this is complicated by
> the fact that the musb platform device declaration is inside of an #if
> IS_ENABLED(CONFIG_USB_MUSB_HDRC). I can either remove the #if or add
> more #if's. Do you have a preference on this?

Please remove the #if's. Usually device registration is never done
conditionally based on whether the driver is built or not. So this seems
incorrect anyway.

Thanks,
Sekhar

WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
To: David Lechner <david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>,
	Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Axel Haslam <ahaslam-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Sergei Shtylyov
	<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 22:43:04 +0530	[thread overview]
Message-ID: <2100252f-0165-96e7-2403-20e1f2d6e4e9@ti.com> (raw)
In-Reply-To: <0302c410-4b05-3a5b-3801-5ab73089a9e2-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>

On Wednesday 26 October 2016 10:07 PM, David Lechner wrote:
> On 10/26/2016 02:59 AM, Sekhar Nori wrote:
>> On Wednesday 26 October 2016 08:36 AM, David Lechner wrote:
>>> Up to this point, the USB phy clock configuration was handled
>>> manually in
>>> the board files and in the usb drivers. This adds proper clocks so that
>>> the usb drivers can use clk_get and clk_enable and not have to worry
>>> about
>>> the details. Also, the related code is removed from the board files and
>>> replaced with the new clock registration functions.
>>>
>>> Signed-off-by: David Lechner <david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
>>> Signed-off-by: Axel Haslam <ahaslam-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>>> ---
>>>
>>> I have added "ARM: davinci: da8xx: Enable the usb20 "per" clk on
>>> phy_clk_enable"
>>> from Axel Haslam to this patch.
>>>
>>> In the review of Axel's patch, Sekhar said:
>>>
>>>> We should not be using a NULL device pointer here. Can you pass the
>>>> musb
>>>> device pointer available in the same file? Also, da850_clks[] in
>>>> da850.c
>>>> needs to be fixed to add the matching device name.
>>>
>>> However, the musb device may not be registered. The usb20_clk can be
>>> used to
>>> supply a 48MHz clock to USB 1.1 (ohci) without using the musb device.
>>> So, I am
>>> inclined to leave this as NULL.
>>
>> But clock look-up has nothing to do with device being registered AFAICT.
>> It is used to identify the clock consumer. Passing NULL there means the
>> clock is not associated with any device. Which is not correct as we are
>> specifically looking at MUSB module clock.
>>
>> Thanks,
>> Sekhar
>>
> 
> FWIW, clk_get() uses dev_name() to get the device name, which will
> return NULL until after the platform device is registered.

I believe you can set init_name in the device to setup an initial name
until registration.

> 
> I can add the device references anyway. However, this is complicated by
> the fact that the musb platform device declaration is inside of an #if
> IS_ENABLED(CONFIG_USB_MUSB_HDRC). I can either remove the #if or add
> more #if's. Do you have a preference on this?

Please remove the #if's. Usually device registration is never done
conditionally based on whether the driver is built or not. So this seems
incorrect anyway.

Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 22:43:04 +0530	[thread overview]
Message-ID: <2100252f-0165-96e7-2403-20e1f2d6e4e9@ti.com> (raw)
In-Reply-To: <0302c410-4b05-3a5b-3801-5ab73089a9e2@lechnology.com>

On Wednesday 26 October 2016 10:07 PM, David Lechner wrote:
> On 10/26/2016 02:59 AM, Sekhar Nori wrote:
>> On Wednesday 26 October 2016 08:36 AM, David Lechner wrote:
>>> Up to this point, the USB phy clock configuration was handled
>>> manually in
>>> the board files and in the usb drivers. This adds proper clocks so that
>>> the usb drivers can use clk_get and clk_enable and not have to worry
>>> about
>>> the details. Also, the related code is removed from the board files and
>>> replaced with the new clock registration functions.
>>>
>>> Signed-off-by: David Lechner <david@lechnology.com>
>>> Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
>>> ---
>>>
>>> I have added "ARM: davinci: da8xx: Enable the usb20 "per" clk on
>>> phy_clk_enable"
>>> from Axel Haslam to this patch.
>>>
>>> In the review of Axel's patch, Sekhar said:
>>>
>>>> We should not be using a NULL device pointer here. Can you pass the
>>>> musb
>>>> device pointer available in the same file? Also, da850_clks[] in
>>>> da850.c
>>>> needs to be fixed to add the matching device name.
>>>
>>> However, the musb device may not be registered. The usb20_clk can be
>>> used to
>>> supply a 48MHz clock to USB 1.1 (ohci) without using the musb device.
>>> So, I am
>>> inclined to leave this as NULL.
>>
>> But clock look-up has nothing to do with device being registered AFAICT.
>> It is used to identify the clock consumer. Passing NULL there means the
>> clock is not associated with any device. Which is not correct as we are
>> specifically looking at MUSB module clock.
>>
>> Thanks,
>> Sekhar
>>
> 
> FWIW, clk_get() uses dev_name() to get the device name, which will
> return NULL until after the platform device is registered.

I believe you can set init_name in the device to setup an initial name
until registration.

> 
> I can add the device references anyway. However, this is complicated by
> the fact that the musb platform device declaration is inside of an #if
> IS_ENABLED(CONFIG_USB_MUSB_HDRC). I can either remove the #if or add
> more #if's. Do you have a preference on this?

Please remove the #if's. Usually device registration is never done
conditionally based on whether the driver is built or not. So this seems
incorrect anyway.

Thanks,
Sekhar

  reply	other threads:[~2016-10-26 17:14 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26  3:06 [PATCH v6 0/5] da8xx USB PHY platform devices and clocks David Lechner
2016-10-26  3:06 ` David Lechner
2016-10-26  3:06 ` David Lechner
2016-10-26  3:06 ` [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  7:59   ` Sekhar Nori
2016-10-26  7:59     ` Sekhar Nori
2016-10-26  7:59     ` Sekhar Nori
2016-10-26 16:37     ` David Lechner
2016-10-26 16:37       ` David Lechner
2016-10-26 16:37       ` David Lechner
2016-10-26 17:13       ` Sekhar Nori [this message]
2016-10-26 17:13         ` Sekhar Nori
2016-10-26 17:13         ` Sekhar Nori
2016-10-26  9:24   ` Sekhar Nori
2016-10-26  9:24     ` Sekhar Nori
2016-10-26  9:24     ` Sekhar Nori
2016-10-26  3:06 ` [PATCH v6 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  9:58   ` Sekhar Nori
2016-10-26  9:58     ` Sekhar Nori
2016-10-26  9:58     ` Sekhar Nori
2016-10-26  3:06 ` [PATCH v6 3/5] ARM: davinci: da8xx: Add USB PHY " David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  3:06 ` [PATCH v6 4/5] ARM: DTS: da850: Add cfgchip syscon node David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26 10:19   ` Sekhar Nori
2016-10-26 10:19     ` Sekhar Nori
2016-10-26 10:19     ` Sekhar Nori
2016-10-26 16:08   ` David Lechner
2016-10-26 16:08     ` David Lechner
2016-10-26 16:08     ` David Lechner
2016-10-28  8:21     ` Sekhar Nori
2016-10-28  8:21       ` Sekhar Nori
2016-10-28  8:21       ` Sekhar Nori
2016-10-28 17:08       ` Kevin Hilman
2016-10-28 17:08         ` Kevin Hilman
2016-10-28 17:08         ` Kevin Hilman
2016-10-28 17:24         ` David Lechner
2016-10-28 17:24           ` David Lechner
2016-10-28 17:24           ` David Lechner
2016-10-28 20:53           ` Kevin Hilman
2016-10-28 20:53             ` Kevin Hilman
2016-10-26  3:06 ` [PATCH v6 5/5] ARM: DTS: da850: Add usb phy node David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26 10:26   ` Sekhar Nori
2016-10-26 10:26     ` Sekhar Nori
2016-10-26 10:26     ` Sekhar Nori
2016-10-27 15:55     ` David Lechner
2016-10-27 15:55       ` David Lechner

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=2100252f-0165-96e7-2403-20e1f2d6e4e9@ti.com \
    --to=nsekhar@ti.com \
    --cc=ahaslam@baylibre.com \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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.