Re: [PATCH 3/7] gpio: mvebu: Add limited PWM support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 18, 2015 at 10:04:38AM +0000, Lee Jones wrote:
> On Thu, 15 Jan 2015, Linus Walleij wrote:
> 
> > On Tue, Jan 13, 2015 at 3:42 AM, Andrew Lunn <andrew@xxxxxxx> wrote:
> > 
> > > So i thought about this some more. What would an MFD based solution
> > > look like?
> > >
> > > First issue is backwards compatibility. There are currently around 90
> > > .dts files using this gpio driver. I could imagine a few of these
> > > being changed to make use of an MFD based driver to make us of the new
> > > features, but the rest expect backwards compatibility.
> > 
> > Good point.
> > 
> > > I think the only sensible way to achieve this is that the gpio driver
> > > keeps its existing binding.
> > 
> > Yup.
> > 
> > > This does not really describe the hardware. The hardware is more like:
> > >
> > >         gpio: gpio {
> > >                 compatible = "marvell,orion-gpio";
> > >                 reg = <0xd0018100 0x40>;
> > >                 ngpios = <32>;
> > >                 gio-controller;
> > >                 #gpio-cells = <2>;
> > >                 interrupt-controller;
> > >                 #interrupt-cells = <2>;
> > >                 interrupts = <16>, <17>, <18>, <19>;
> > >                 clocks = <&coreclk 0>;
> > >
> > >                 pwm: pwm {
> > >                         compatible = "marvell,armada-pwm";
> > >                         reg = <0xd00181c0 0x08>;
> > >                         #pwm-cells = <2>;
> > >                         clocks = <&coreclk 0>;
> > >                 };
> > >         };

I think you technically need an (empty) ranges property in the gpio node
so that the address can be properly translated.

> > >
> > > but i don't think MFD supports that sort of structure?
> > 
> > No it would have to be some custom DT code in the GPIO driver
> > spawning the PWM platform device.
> 
> of_platform_populate()?

Huh? I was under the impression that mfd_add_devices() would already
deal with this situation? Isn't that what's parsed based on the cells
parameter?

Thierry

Attachment: pgpyn4WsRNIUf.pgp
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux