All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Kamil Debski <k.debski@samsung.com>,
	'Anton Tikhomirov' <av.tikhomirov@samsung.com>,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org
Cc: kyungmin.park@samsung.com, Tomasz Figa <t.figa@samsung.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	gautam.vivek@samsung.com, mat.krawczuk@gmail.com,
	yulgon.kim@samsung.com, p.paneri@samsung.com,
	jg1.han@samsung.com, galak@codeaurora.org,
	matt.porter@linaro.org, tjakobi@math.uni-bielefeld.de,
	stern@rowland.harvard.edu, sander@humilis.net
Subject: Re: [PATCH v9 3/4] phy: Add new Exynos USB 2.0 PHY driver
Date: Thu, 6 Mar 2014 16:14:41 +0530	[thread overview]
Message-ID: <53185199.3090103@ti.com> (raw)
In-Reply-To: <193a01cf3926$4bef53f0$e3cdfbd0$%debski@samsung.com>

Hi,

On Thursday 06 March 2014 03:54 PM, Kamil Debski wrote:
> Hi Anton, Kishon,
>
>> From: Anton Tikhomirov [mailto:av.tikhomirov@samsung.com]
>> Sent: Thursday, March 06, 2014 9:26 AM
>>
>> Hi Kamil,
>>
>> ...
>>
>>> +| 3. Supporting SoCs
>>> ++--------------------
>>> +
>>> +To support a new SoC a new file should be added to the drivers/phy
>>> +directory. Each SoC's configuration is stored in an instance of the
>>> +struct samsung_usb2_phy_config.
>>> +
>>> +struct samsung_usb2_phy_config {
>>> +	const struct samsung_usb2_common_phy *phys;
>>> +	unsigned int num_phys;
>>> +	bool has_mode_switch;
>>
>> You missed rate_to_clk here.
>
> Thank you for spotting this.
>
> Kishon: I am sorry that this omission was made. I am happy to send an
> updated patchset. However, I want to give some time for any additional
> comments. Do you think that we have for this? Is today evening ok with you?

Would be great if you can send the patch in 2-3 hrs.. I'd like to give 
enough time for auto build to detect any errors.

>>
>>> +};
>>> +
>>
>> ...
>>
>>> diff --git a/drivers/phy/phy-samsung-usb2.c b/drivers/phy/phy-
>> samsung-
>>> usb2.c new file mode 100644 index 0000000..c3b7719
>>> --- /dev/null
>>> +++ b/drivers/phy/phy-samsung-usb2.c
>>> @@ -0,0 +1,222 @@
>>> +/*
>>> + * Samsung SoC USB 1.1/2.0 PHY driver
>>> + *
>>> + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
>>> + * Author: Kamil Debski <k.debski@samsung.com>
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>>> modify
>>> + * it under the terms of the GNU General Public License version 2 as
>>> + * published by the Free Software Foundation.
>>> + */
>>> +
>>> +#include <linux/clk.h>
>>> +#include <linux/mfd/syscon.h>
>>> +#include <linux/module.h>
>>> +#include <linux/of.h>
>>> +#include <linux/of_address.h>
>>> +#include <linux/phy/phy.h>
>>> +#include <linux/platform_device.h>
>>> +#include <linux/spinlock.h>
>>> +#include "phy-samsung-usb2.h"
>>> +
>>> +static int samsung_usb2_phy_power_on(struct phy *phy) {
>>> +	struct samsung_usb2_phy_instance *inst = phy_get_drvdata(phy);
>>> +	struct samsung_usb2_phy_driver *drv = inst->drv;
>>> +	int ret;
>>> +
>>> +	dev_dbg(drv->dev, "Request to power_on \"%s\" usb phy\n",
>>> +		inst->cfg->label);
>>> +	ret = clk_prepare_enable(drv->clk);
>>
>> clk_prepare_enable() can sleep, and therefore doesn't allow
>> samusng_usb2_phy_power_on() to be used in atomic context (e.g. inside
>> spin_lock-ed area), what sometimes may be desirable.
>> What about to prepare clock in probe, and just enable it here
>> (note: clk_enable() doesn't sleep).
>
>  From the onward discussion between you and Kishon, I draw the conclusion
> that this change is not necessary. Right?

right.

Cheers
Kishon

WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Kamil Debski <k.debski@samsung.com>,
	"'Anton Tikhomirov'" <av.tikhomirov@samsung.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-samsung-soc@vger.kernel.org>, <linux-usb@vger.kernel.org>,
	<devicetree@vger.kernel.org>
Cc: <kyungmin.park@samsung.com>, Tomasz Figa <t.figa@samsung.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	<gautam.vivek@samsung.com>, <mat.krawczuk@gmail.com>,
	<yulgon.kim@samsung.com>, <p.paneri@samsung.com>,
	<jg1.han@samsung.com>, <galak@codeaurora.org>,
	<matt.porter@linaro.org>, <tjakobi@math.uni-bielefeld.de>,
	<stern@rowland.harvard.edu>, <sander@humilis.net>
Subject: Re: [PATCH v9 3/4] phy: Add new Exynos USB 2.0 PHY driver
Date: Thu, 6 Mar 2014 16:14:41 +0530	[thread overview]
Message-ID: <53185199.3090103@ti.com> (raw)
In-Reply-To: <193a01cf3926$4bef53f0$e3cdfbd0$%debski@samsung.com>

Hi,

On Thursday 06 March 2014 03:54 PM, Kamil Debski wrote:
> Hi Anton, Kishon,
>
>> From: Anton Tikhomirov [mailto:av.tikhomirov@samsung.com]
>> Sent: Thursday, March 06, 2014 9:26 AM
>>
>> Hi Kamil,
>>
>> ...
>>
>>> +| 3. Supporting SoCs
>>> ++--------------------
>>> +
>>> +To support a new SoC a new file should be added to the drivers/phy
>>> +directory. Each SoC's configuration is stored in an instance of the
>>> +struct samsung_usb2_phy_config.
>>> +
>>> +struct samsung_usb2_phy_config {
>>> +	const struct samsung_usb2_common_phy *phys;
>>> +	unsigned int num_phys;
>>> +	bool has_mode_switch;
>>
>> You missed rate_to_clk here.
>
> Thank you for spotting this.
>
> Kishon: I am sorry that this omission was made. I am happy to send an
> updated patchset. However, I want to give some time for any additional
> comments. Do you think that we have for this? Is today evening ok with you?

Would be great if you can send the patch in 2-3 hrs.. I'd like to give 
enough time for auto build to detect any errors.

>>
>>> +};
>>> +
>>
>> ...
>>
>>> diff --git a/drivers/phy/phy-samsung-usb2.c b/drivers/phy/phy-
>> samsung-
>>> usb2.c new file mode 100644 index 0000000..c3b7719
>>> --- /dev/null
>>> +++ b/drivers/phy/phy-samsung-usb2.c
>>> @@ -0,0 +1,222 @@
>>> +/*
>>> + * Samsung SoC USB 1.1/2.0 PHY driver
>>> + *
>>> + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
>>> + * Author: Kamil Debski <k.debski@samsung.com>
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>>> modify
>>> + * it under the terms of the GNU General Public License version 2 as
>>> + * published by the Free Software Foundation.
>>> + */
>>> +
>>> +#include <linux/clk.h>
>>> +#include <linux/mfd/syscon.h>
>>> +#include <linux/module.h>
>>> +#include <linux/of.h>
>>> +#include <linux/of_address.h>
>>> +#include <linux/phy/phy.h>
>>> +#include <linux/platform_device.h>
>>> +#include <linux/spinlock.h>
>>> +#include "phy-samsung-usb2.h"
>>> +
>>> +static int samsung_usb2_phy_power_on(struct phy *phy) {
>>> +	struct samsung_usb2_phy_instance *inst = phy_get_drvdata(phy);
>>> +	struct samsung_usb2_phy_driver *drv = inst->drv;
>>> +	int ret;
>>> +
>>> +	dev_dbg(drv->dev, "Request to power_on \"%s\" usb phy\n",
>>> +		inst->cfg->label);
>>> +	ret = clk_prepare_enable(drv->clk);
>>
>> clk_prepare_enable() can sleep, and therefore doesn't allow
>> samusng_usb2_phy_power_on() to be used in atomic context (e.g. inside
>> spin_lock-ed area), what sometimes may be desirable.
>> What about to prepare clock in probe, and just enable it here
>> (note: clk_enable() doesn't sleep).
>
>  From the onward discussion between you and Kishon, I draw the conclusion
> that this change is not necessary. Right?

right.

Cheers
Kishon

  reply	other threads:[~2014-03-06 10:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 15:28 [PATCH v9 0/4] phy: Add new Exynos USB 2.0 PHY driver Kamil Debski
2014-03-05 15:28 ` [PATCH v9 1/4] phy: core: Add an exported of_phy_get function Kamil Debski
2014-03-05 16:03   ` Tomasz Figa
2014-03-05 15:28 ` [PATCH v9 2/4] phy: core: Add devm_of_phy_get to phy-core Kamil Debski
2014-03-05 16:04   ` Tomasz Figa
2014-03-05 15:28 ` [PATCH v9 3/4] phy: Add new Exynos USB 2.0 PHY driver Kamil Debski
2014-03-05 16:04   ` Tomasz Figa
2014-03-06  8:26   ` Anton Tikhomirov
2014-03-06  8:30     ` Kishon Vijay Abraham I
2014-03-06  8:30       ` Kishon Vijay Abraham I
2014-03-06  8:52       ` Anton Tikhomirov
     [not found]         ` <006201cf3919$5f760750$1e6215f0$%tikhomirov-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-06  8:56           ` Kishon Vijay Abraham I
2014-03-06  8:56             ` Kishon Vijay Abraham I
2014-03-06  9:02             ` Anton Tikhomirov
2014-03-06  9:19               ` Anton Tikhomirov
2014-03-06  9:27                 ` Kishon Vijay Abraham I
2014-03-06  9:27                   ` Kishon Vijay Abraham I
2014-03-07  5:16                   ` Anton Tikhomirov
2014-03-06 10:24     ` Kamil Debski
2014-03-06 10:44       ` Kishon Vijay Abraham I [this message]
2014-03-06 10:44         ` Kishon Vijay Abraham I
2014-03-05 15:28 ` [PATCH v9 4/4] phy: Add Exynos 5250 support to the " Kamil Debski
     [not found] ` <1394033288-5551-1-git-send-email-k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-05 23:08   ` [PATCH v9 0/4] phy: Add new " Tobias Jakobi
2014-03-05 23:08     ` Tobias Jakobi
2014-03-06 10:25     ` Kamil Debski

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=53185199.3090103@ti.com \
    --to=kishon@ti.com \
    --cc=av.tikhomirov@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gautam.vivek@samsung.com \
    --cc=jg1.han@samsung.com \
    --cc=k.debski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mat.krawczuk@gmail.com \
    --cc=matt.porter@linaro.org \
    --cc=p.paneri@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sander@humilis.net \
    --cc=stern@rowland.harvard.edu \
    --cc=t.figa@samsung.com \
    --cc=tjakobi@math.uni-bielefeld.de \
    --cc=yulgon.kim@samsung.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.