devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Olof Johansson <olof@lixom.net>
Cc: caesar <caesar.wang@rock-chips.com>,
	Doug Anderson <dianders@chromium.org>,
	linux-pwm@vger.kernel.org,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] pwm: add this patch to support the new pwm of Rockchip SoCs
Date: Tue, 29 Jul 2014 12:23:43 +0200	[thread overview]
Message-ID: <20140729102341.GC21182@ulmo.nvidia.com> (raw)
In-Reply-To: <CAOesGMgPDOQ0Z5b+d8nCiT4q_OGcYfv0zCb1naZVAqapaOtnPw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2680 bytes --]

On Mon, Jul 28, 2014 at 09:58:22AM -0700, Olof Johansson wrote:
> On Mon, Jul 28, 2014 at 4:19 AM, caesar <caesar.wang@rock-chips.com> wrote:
> > Doug,
> > 在 2014年07月28日 12:01, Doug Anderson 写道:
> >
> >> Caesar,
> >>
> >> On Sun, Jul 27, 2014 at 7:00 AM, caesar <caesar.wang@rock-chips.com>
> >> wrote:
> >>>
> >>> /*I think will be show the faill log:->
> >>>
> >>> * rockchip-pwm ff9301a0.pwm: can't request region for resource [mem
> >>> 0xff9301a0-0xff93019f]
> >>> */
> >>>
> >>> pc->base = devm_ioremap_resource(dev, regs);
> >>
> >> Did you actually code this up and try it and get this error?
> >
> > Yeah.
> >
> >> I hadn't
> >> tried it but I researched other dts files and it looked as if there
> >> was one example that was doing this.  ...but perhaps it wasn't
> >> actually doing the ioremap_resource on both ranges.
> >>
> >> I'd imagine that this is _probably_ equivalent to what Thierry was
> >> suggesting, so if it didn't work then maybe Thierry's won't work
> >> either?
> >>
> >> I don't have any other great suggestions other than doing two memory
> >> ranges for lcdc:
> >>
> >>           lcdc@ff930000 {
> >>                   compatible = "rockchip,rk3288-lcdc";
> >>                   reg = <0xff930000 0x1a0>, <0xff9301b0 0xfe50>;
> >>                   ...
> >>           };
> >>           pwm@ff9301a0 {
> >>                   compatible = "rockchip,vop-pwm";
> >>                   reg = <0xff9301a0 0x10>;
> >>                   ...
> >>           };
> >>
> >> ...but I am certainly nowhere near an expert on this stuff...
> >>
> >> -Doug
> >>
> >>
> >>
> > I has solve in lcdc driver,but I always feel awkward. I think a good way to
> > solve in pwm driver.
> > Unfortunately that  so far ,I have not a good idle in pwm driver.
> >
> > Maybe,I  let do it that way in lcdc driver.
> 
> I think there's an easier way to do this, by not focusing _too_ much
> on the device tree:
> 
> * Define a platform_data structure for the PWM driver, which contains
> readl/writel accessors as well as the device type (i.e. what you use
> the compatible field and the lookup table for today).
> * Populate the platform_device in the clcd driver, and register that
> * Make the PWM driver probe as a regular platform device if pdata is passed
> * Make a readl/writel wrapper that either falls back to native
> readl/writel when there aren't any passed in, or make the DT code fill
> in the pdata with the native versions in that case.

That's one option, but it isn't going to work if you ever want to refer
to the PWM subdevice by phandle, since no phandle will exist.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-07-29 10:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19 12:55 [PATCH v2 0/2] This series adds support for Rockchip SoCs integrated PWM Caesar Wang
2014-07-19 12:55 ` [PATCH v2 1/2] pwm: add this patch to introduce for rk-pwm and vop-pwm Caesar Wang
2014-07-21  8:57   ` Thierry Reding
2014-07-21 10:39     ` caesar
2014-07-19 12:55 ` [PATCH v2 2/2] pwm: add this patch to support the new pwm of Rockchip SoCs Caesar Wang
2014-07-21  8:50   ` Thierry Reding
     [not found]     ` <53CD0E82.6030901@rock-chips.com>
2014-07-21 13:27       ` Thierry Reding
2014-07-21 14:10         ` caesar
2014-07-25 10:29         ` caesar
2014-07-27  4:59           ` Doug Anderson
     [not found]             ` <53D50601.1020106@rock-chips.com>
2014-07-28  4:01               ` Doug Anderson
2014-07-28 11:19                 ` caesar
     [not found]                   ` <53D631B6.1050603-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-07-28 16:58                     ` Olof Johansson
2014-07-29  9:35                       ` caesar
2014-07-29 10:23                       ` Thierry Reding [this message]
2014-07-29 10:22                   ` Thierry Reding
2014-07-29 11:09                     ` caesar
2014-07-29 11:38                       ` Thierry Reding
2014-07-29 14:17                         ` caesar
2014-07-29 10:25             ` Thierry Reding

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=20140729102341.GC21182@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=caesar.wang@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=olof@lixom.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).