[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <53452B97.8020700@samsung.com>
Date: Wed, 09 Apr 2014 13:14:31 +0200
From: Tomasz Stanislawski <t.stanislaws@...sung.com>
To: Rahul Sharma <r.sh.open@...il.com>,
Andrzej Hajda <a.hajda@...sung.com>
Cc: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
sunil joshi <joshi@...sung.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Kishon Vijay Abraham I <kishon@...com>,
Rob Herring <robh+dt@...nel.org>,
Kyungmin Park <kyungmin.park@...sung.com>,
Kukjin Kim <kgene.kim@...sung.com>,
Grant Likely <grant.likely@...aro.org>,
Sylwester Nawrocki <sylvester.nawrocki@...il.com>,
Rahul Sharma <rahul.sharma@...sung.com>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>
Subject: Re: [PATCHv2 1/3] phy: Add exynos-simple-phy driver
Hi Rahul,
On 04/09/2014 11:12 AM, Rahul Sharma wrote:
> Hi Tomasz,
>
> On 9 April 2014 14:07, Andrzej Hajda <a.hajda@...sung.com> wrote:
>> Hi Tomasz,
>>
>> On 04/08/2014 04:37 PM, Tomasz Stanislawski wrote:
>>> Add exynos-simple-phy driver to support a single register
>>> PHY interfaces present on Exynos4 SoC.
>>>
>>> Signed-off-by: Tomasz Stanislawski <t.stanislaws@...sung.com>
[snip]
>>> +
>>> + regs = devm_ioremap(dev, res->start, res->end - res->start);
>>> + if (!regs) {
>>> + dev_err(dev, "failed to ioremap registers\n");
>>> + return -EFAULT;
>>> + }
>>
>> Why not devm_ioremap_resource? If not, resource_size function calculates
>> length of resource correctly.
>>
>> Anyway I like the idea of implementing multiple phys in one driver.
>> The only drawback I see is that some phys will be created even there are
>> no consumers for them. To avoid such situation you can try to use
>> lazy approach - create phy only if there is request for it,
>> exynos_phy_xlate callback should allow this.
>>
>> Regards
>> Andrzej
>>
>
> Idea looks good. How about keeping compatible which is independent
> of SoC, something like "samsung,exynos-simple-phy" and provide Reg
> and Bit through phy provider node. This way we can avoid SoC specific
> hardcoding in phy driver and don't need to look into dt bindings for
> each new SoC.
A very nice idea BUT there is a very strong pressure from DT guys
to avoid adding any bit fields/offsets/masks in DT nodes.
Hopefully, as long as driver name starts with "exynos-" prefix
one can hide SoCs specific tricks deep inside driver code.
The idea behind this driver was not to create a generic phy for 1-bit
devices but rather to hide SoC-specific issues from client drivers
like DRM-HDMI.
>
> We can use syscon interface to access PMU bits like USB phy.
> PMU is already registered as system controller
>
Ok. I will try to use it in PATCHv3.
> Regards,
> Rahul Sharma.
>
Regards,
Tomasz Stanislawski
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists