From: Arnd Bergmann <arnd@arndb.de>
To: Tomasz Figa <tomasz.figa@gmail.com>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
"Tomasz Figa" <t.figa@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-pwm@vger.kernel.org,
"Kukjin Kim" <kgene.kim@samsung.com>,
"Olof Johansson" <olof@lixom.net>,
"Sylwester Nawrocki" <sylvester.nawrocki@gmail.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Mark Brown" <broonie@kernel.org>,
"Thomas Abraham" <thomas.abraham@linaro.org>
Subject: Re: [PATCH 08/15] pwm: Add new pwm-samsung driver
Date: Mon, 24 Jun 2013 22:55:12 +0200 [thread overview]
Message-ID: <201306242255.12540.arnd@arndb.de> (raw)
In-Reply-To: <8756440.8o3uDlCqg5@flatron>
On Monday 24 June 2013, Tomasz Figa wrote:
> Wouldn't adding a big comment about why this is enough for this platform
> and why anything more sophisticated would be just overengineering in this
> case be enough?
>
> As you could see in several versions of the series I linked in my previous
> replies, anything that looked decently simply added a lot of glue code and
> cross module dependencies without serving any useful purpose, other than
> just looking good.
>
> This driver is already a lot better than previous one, because as opposed
> to the old one, it gives synchronization that is technically correct. Not
> even saying about a lot of other things fixed, like multiplatform-
> awareness, OF support, coding style, proper handling of dividers, etc.,
> etc. It would be really bad if all this was put to waste...
I agree. The shared spinlock as the interface between the two drivers
is clearly a hack, but I think it is an appropriate hack in this special
case and that's why I suggested using that over the more complex solutions
that Tomasz suggested.
The important part is that the DT binding reasonable and could support
more complex scenarios even though they are highly unlikely.
We can always change the kernel code to something else if we need to,
but I could not come up with good *and* simple design. The most obvious
solution would be to make the clocksource driver the master that exports
an interface to the pwm driver, but that just adds complexity for the
common case that just uses the pwm driver but not the clocksource driver.
The attempt to create a separate MFD glue driver that abstracts the
interface in the way that pwm-tiecap does also was a failure here, because
one of the two consumers has to run very early, before we have access to
most of the device infrastructure the kernel provides.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/15] pwm: Add new pwm-samsung driver
Date: Mon, 24 Jun 2013 22:55:12 +0200 [thread overview]
Message-ID: <201306242255.12540.arnd@arndb.de> (raw)
In-Reply-To: <8756440.8o3uDlCqg5@flatron>
On Monday 24 June 2013, Tomasz Figa wrote:
> Wouldn't adding a big comment about why this is enough for this platform
> and why anything more sophisticated would be just overengineering in this
> case be enough?
>
> As you could see in several versions of the series I linked in my previous
> replies, anything that looked decently simply added a lot of glue code and
> cross module dependencies without serving any useful purpose, other than
> just looking good.
>
> This driver is already a lot better than previous one, because as opposed
> to the old one, it gives synchronization that is technically correct. Not
> even saying about a lot of other things fixed, like multiplatform-
> awareness, OF support, coding style, proper handling of dividers, etc.,
> etc. It would be really bad if all this was put to waste...
I agree. The shared spinlock as the interface between the two drivers
is clearly a hack, but I think it is an appropriate hack in this special
case and that's why I suggested using that over the more complex solutions
that Tomasz suggested.
The important part is that the DT binding reasonable and could support
more complex scenarios even though they are highly unlikely.
We can always change the kernel code to something else if we need to,
but I could not come up with good *and* simple design. The most obvious
solution would be to make the clocksource driver the master that exports
an interface to the pwm driver, but that just adds complexity for the
common case that just uses the pwm driver but not the clocksource driver.
The attempt to create a separate MFD glue driver that abstracts the
interface in the way that pwm-tiecap does also was a failure here, because
one of the two consumers has to run very early, before we have access to
most of the device infrastructure the kernel provides.
Arnd
next prev parent reply other threads:[~2013-06-24 20:55 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 21:18 [PATCH 00/15] Final Samsung PWM support cleanup Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 01/15] ARM: SAMSUNG: Unify base address definitions of timer block Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 02/15] ARM: SAMSUNG: Add new PWM platform device Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 03/15] ARM: SAMSUNG: Set PWM platform data Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 04/15] ARM: SAMSUNG: Move all platforms to new clocksource driver Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 05/15] ARM: SAMSUNG: Remove old samsung-time driver Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 06/15] ARM: SAMSUNG: Remove unused PWM timer IRQ chip code Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 07/15] pwm: samsung: Rename to pwm-samsung-legacy Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 08/15] pwm: Add new pwm-samsung driver Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-13 20:14 ` Heiko Stübner
2013-06-13 20:14 ` Heiko Stübner
2013-06-13 20:18 ` Tomasz Figa
2013-06-13 20:18 ` Tomasz Figa
2013-06-16 17:19 ` Tomasz Figa
2013-06-16 17:19 ` Tomasz Figa
2013-06-16 20:45 ` Kukjin Kim
2013-06-16 20:45 ` Kukjin Kim
2013-06-17 20:29 ` Thierry Reding
2013-06-17 20:29 ` Thierry Reding
2013-06-17 20:50 ` Tomasz Figa
2013-06-17 20:50 ` Tomasz Figa
2013-06-18 22:17 ` Thierry Reding
2013-06-18 22:17 ` Thierry Reding
2013-06-18 22:45 ` Tomasz Figa
2013-06-18 22:45 ` Tomasz Figa
2013-06-19 9:43 ` Thierry Reding
2013-06-19 9:43 ` Thierry Reding
2013-06-19 10:23 ` Tomasz Figa
2013-06-19 10:23 ` Tomasz Figa
2013-06-24 17:52 ` Tomasz Figa
2013-06-24 17:52 ` Tomasz Figa
2013-06-24 19:50 ` Thierry Reding
2013-06-24 19:50 ` Thierry Reding
2013-06-24 20:03 ` Tomasz Figa
2013-06-24 20:03 ` Tomasz Figa
2013-06-24 20:28 ` Thierry Reding
2013-06-24 20:28 ` Thierry Reding
2013-06-24 20:55 ` Arnd Bergmann [this message]
2013-06-24 20:55 ` Arnd Bergmann
2013-06-18 17:59 ` Tomasz Figa
2013-06-18 17:59 ` Tomasz Figa
2013-06-18 18:06 ` Kukjin Kim
2013-06-18 18:06 ` Kukjin Kim
2013-06-18 18:13 ` Tomasz Figa
2013-06-18 18:13 ` Tomasz Figa
2013-06-18 21:33 ` Thierry Reding
2013-06-18 21:33 ` Thierry Reding
2013-06-18 21:35 ` Tomasz Figa
2013-06-18 21:35 ` Tomasz Figa
2013-06-18 19:41 ` Tomasz Figa
2013-06-18 19:41 ` Tomasz Figa
2013-06-18 21:40 ` Thierry Reding
2013-06-18 21:40 ` Thierry Reding
2013-06-18 21:42 ` Tomasz Figa
2013-06-18 21:42 ` Tomasz Figa
2013-06-18 22:20 ` Thierry Reding
2013-06-18 22:20 ` Thierry Reding
2013-06-05 21:18 ` [PATCH 09/15] ARM: SAMSUNG: Rework private data handling in dev-backlight Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 10/15] ARM: SAMSUNG: Modify board files to use new PWM platform device Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 11/15] pwm: Remove superseded pwm-samsung-legacy driver Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 12/15] ARM: SAMSUNG: Remove old PWM timer platform devices Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 13/15] ARM: SAMSUNG: Remove pwm-clock infrastructure Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 14/15] ARM: SAMSUNG: Remove remaining uses of plat/regs-timer.h header Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-13 20:24 ` Heiko Stübner
2013-06-13 20:24 ` Heiko Stübner
2013-06-13 20:38 ` Tomasz Figa
2013-06-13 20:38 ` Tomasz Figa
2013-06-05 21:18 ` [PATCH 15/15] ARM: SAMSUNG: Remove " Tomasz Figa
2013-06-05 21:18 ` Tomasz Figa
2013-06-12 21:48 ` [PATCH 00/15] Final Samsung PWM support cleanup Tomasz Figa
2013-06-12 21:48 ` Tomasz Figa
2013-06-12 23:00 ` Olof Johansson
2013-06-12 23:00 ` Olof Johansson
2013-06-12 23:13 ` Tomasz Figa
2013-06-12 23:13 ` Tomasz Figa
2013-06-12 23:38 ` Heiko Stübner
2013-06-12 23:38 ` Heiko Stübner
2013-06-12 23:52 ` Sylwester Nawrocki
2013-06-12 23:52 ` Sylwester Nawrocki
2013-06-12 23:52 ` Sylwester Nawrocki
2013-06-13 9:07 ` Tomasz Figa
2013-06-13 9:07 ` Tomasz Figa
2013-06-13 20:17 ` Heiko Stübner
2013-06-13 20:17 ` Heiko Stübner
2013-06-13 20:17 ` Heiko Stübner
2013-06-13 22:27 ` Heiko Stübner
2013-06-13 22:27 ` Heiko Stübner
2013-06-13 22:27 ` Heiko Stübner
2013-06-13 0:25 ` Kukjin Kim
2013-06-13 0:25 ` Kukjin Kim
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=201306242255.12540.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=sylvester.nawrocki@gmail.com \
--cc=t.figa@samsung.com \
--cc=thierry.reding@gmail.com \
--cc=thomas.abraham@linaro.org \
--cc=tomasz.figa@gmail.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.