[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y2uDifs0CkPl+P0X@smile.fi.intel.com>
Date: Wed, 9 Nov 2022 12:40:09 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Hans de Goede <hdegoede@...hat.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Thierry Reding <thierry.reding@...il.com>,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-pwm@...r.kernel.org
Subject: Re: [PATCH v2 6/6] pinctrl: intel: Enumerate PWM device when
community has a capabilitty
On Wed, Nov 09, 2022 at 11:08:04AM +0100, Linus Walleij wrote:
> On Wed, Nov 9, 2022 at 10:56 AM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > On Wed, Nov 09, 2022 at 10:08:51AM +0100, Linus Walleij wrote:
...
> > > I guess I can be convinced that this hack is the lesser evil :D
> > >
> > > What is it in the platform that makes this kind of hacks necessary?
> >
> > The PWM capability is discoverable by the looking for it in the pin
> > control IP MMIO, it's not a separate device, but a sibling (child?)
> > of the pin control, that's not a separate entity.
>
> OK I get it.
>
> > Moreover, not every pin control _community_ has that capability (capabilities
> > are on the Community level and depends on ACPI representation of the
> > communities themself - single device or device per community - the PWM may or
> > may not be easily attached.
>
> OK I think I understand it a bit, if ACPI thinks about the PWM
> as "some feature of the community" then that is how it is, we have
> this bad fit between device tree and Linux internals at times as well,
> then spawning a device from another one is the way to go, we need
> to consider the option that it is Linux that is weird at times, not the
> HW description.
The problem here is not the impossibility to do the things. The problem is
that things are done and validated on a Windows system. After that it close
to impossible to update the firmware or perform any architectural changes.
OTOH, announcing the separate device out of the existing MMIO space doesn't
sound right from the software point of view that should follow the hardware
representation.
Ideally, this should be an adaptive MFD-like device, but it makes things
even more complicated than has been discussed already. (Note, that some
of the pin control drivers are enumerated as platform devices, and that
code should also be taken into account)
...
> > That said, I agree that this looks not nice, but that's all what
> > Mika and me can come up with to make all this as little ugly and
> > intrusive as possible.
>
> I can live with it, rough consensus and running code.
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
Thank you!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists