All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux USB List <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 4/5] phy: add Marvell HSIC 28nm PHY
Date: Tue, 26 May 2015 11:36:54 +0530	[thread overview]
Message-ID: <55640D7E.8020501@ti.com> (raw)
In-Reply-To: <CAL_JsqJxkOXNJ1wkoKAdFpGeaKcjCN2k0vBFWsY=wcuMEDVUOg@mail.gmail.com>

Hi,

On Saturday 23 May 2015 01:24 AM, Rob Herring wrote:
> On Thu, May 21, 2015 at 7:51 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>> On Thursday 21 May 2015 06:15 PM, Kishon Vijay Abraham I wrote:
>>>
>>> Hi,
>>>
>>> On Thursday 14 May 2015 04:18 AM, Rob Herring wrote:
>>>>
>>>> Add PHY driver for the Marvell HSIC 28nm PHY. This PHY is found in
>>>> PXA1928
>>>> SOC.
>
> [...]
>
>>>> +       writel(readl(base + PHY_28NM_HSIC_CTRL) &
>>>> ~PHY_28NM_HSIC_S2H_HSIC_EN,
>>>> +               base + PHY_28NM_HSIC_CTRL);
>>>> +
>>>> +       clk_disable_unprepare(mv_phy->clk);
>>>> +       return 0;
>>>> +}
>>>> +
>>>> +static const struct phy_ops hsic_ops = {
>>>> +       .init           = mv_hsic_phy_init,
>>>> +       .power_on       = mv_hsic_phy_power_on,
>>>> +       .power_off      = mv_hsic_phy_power_off,
>>>
>>>
>>> exit callback is missing? Shouldn't we turn off the PLLs in exit callback?
>
> I really don't understand the division of the ops functions. It seems
> backwards to me. Don't you need to power on the phy before you can
> initialize it? Or init is supposed to be s/w init of some kind.

Generally the order is init and then power on. During init the driver can 
perform the various setting for initializing the PHY which includes PLL 
programming, calibration etc.. And then power on which actually starts the PHY 
so that PHY can now transfer and receive data.
> AFAICT, all the drivers just call init and power_on back to back.
>
>>
>> Also add the .owner member since this driver can be used as module.
>
> Strange. Generally an ops struct just has ops.

phy-core has a call to try_module_get with this .owner so that the module is 
not removed after phy_get. Maybe we can make phy-core to handle it in some 
other way. Need to check.

Thanks
Kishon

  reply	other threads:[~2015-05-26  6:07 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 22:48 [PATCH 0/5] Marvell PXA1928 USB support Rob Herring
2015-05-13 22:48 ` Rob Herring
2015-05-13 22:48 ` [PATCH 1/5] dt-bindings: Add Marvell PXA1928 USB and HSIC PHY bindings Rob Herring
2015-05-13 22:48   ` Rob Herring
2015-05-13 22:48 ` [PATCH 2/5] dt-bindings: Add Marvell PXA1928 USB EHCI controller binding Rob Herring
2015-05-13 22:48 ` [PATCH 3/5] phy: Add Marvell USB 2.0 OTG 28nm PHY Rob Herring
2015-05-13 22:48   ` Rob Herring
2015-05-21 12:33   ` Kishon Vijay Abraham I
2015-05-21 12:33     ` Kishon Vijay Abraham I
2015-05-13 22:48 ` [PATCH 4/5] phy: add Marvell HSIC " Rob Herring
2015-05-21 12:45   ` Kishon Vijay Abraham I
2015-05-21 12:45     ` Kishon Vijay Abraham I
2015-05-21 12:51     ` Kishon Vijay Abraham I
2015-05-21 12:51       ` Kishon Vijay Abraham I
2015-05-22 19:54       ` Rob Herring
2015-05-22 19:54         ` Rob Herring
2015-05-26  6:06         ` Kishon Vijay Abraham I [this message]
2015-05-13 22:49 ` [PATCH 5/5] usb: add pxa1928 ehci support Rob Herring
2015-05-14  8:24   ` Paul Bolle
2015-05-14 10:42     ` Arnd Bergmann
2015-05-14 13:25       ` Rob Herring
2015-05-14 13:25         ` Rob Herring
2015-05-14 10:43   ` Arnd Bergmann
2015-05-14 14:56   ` Alan Stern
2015-05-14 14:56     ` Alan Stern
2015-05-14 16:36     ` Rob Herring
2015-05-14 16:36       ` Rob Herring
2015-05-14 17:06       ` Alan Stern
2015-05-14 17:06         ` Alan Stern
2015-05-14 15:55   ` Alan Stern
2015-05-14 15:55     ` Alan Stern
2015-05-15  9:32     ` Arnd Bergmann
2015-05-15  9:55 ` [PATCH 0/5] Marvell PXA1928 USB support Sebastian Hesselbarth
2015-05-15  9:55   ` Sebastian Hesselbarth
2015-05-15 12:48   ` Rob Herring
2015-05-15 12:48     ` Rob Herring
2015-05-15 14:11     ` Arnd Bergmann
2015-05-15 16:04       ` Rob Herring
2015-05-15 16:04         ` Rob Herring

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=55640D7E.8020501@ti.com \
    --to=kishon@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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.