From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: buserror-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
augulis.darius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
christer-rKHMIqA5R6gwFerOooGFRg@public.gmane.org,
sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
kwangwoo.lee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
mcuelenaere-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
ghcstop-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org,
jekhor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org
Subject: Re: [PATCH v4 04/14] mfd: Add Samsung PWM/timer master driver
Date: Thu, 11 Apr 2013 00:35:47 +0200 [thread overview]
Message-ID: <201304110035.47776.arnd@arndb.de> (raw)
In-Reply-To: <5357756.gKmBOZlWcd@flatron>
On Monday 08 April 2013, Tomasz Figa wrote:
> On Saturday 06 of April 2013 00:24:18 Tomasz Figa wrote:
> > On Friday 05 of April 2013 21:54:21 Arnd Bergmann wrote:
> > > On Friday 05 April 2013, Tomasz Figa wrote:
> >
> > I'm not sure what you mean by a register-level interface. Something like
> > samsung_pwm_update_reg(reg, mask, val), which modifies bitfields
> > according to the mask and value with appropriate synchronization? If
> > yes, this solves only the problem of access to shared registers.
> >
> > The other problems that remain:
> >
> > - negotiation of PWM channels to use for clock source and clock events,
> > because each board can use different channels for PWM outputs,
> >
> > - code duplication caused by both of the drivers doing mostly the same
> > things and or having to parse the same data from device tree,
> >
> > - both non-DT and DT platforms must be supported,
> >
> > - how to keep the ability to load PWM driver as a module (or not load it
> > at all when PWM is not used on particular board), while retaining
> > everything that is needed for the clocksource driver in kernel,
> >
> > - some platforms can't use PWM timers as system clocksources, while on
> > others this is the only timekeeping hardware available.
> >
>
> Hmm. Does anybody have an idea of a better way of implementing this PWM
> timer support, which solves the above problems?
>
> This series is a dependency for moving Universal C210 board to DT-based
> description and it's already almost out of time to get this included for
> 3.10...
>
Sorry for not replying earlier. My idea for the register level interface
was to create a platform_device for each PWM, e.g. using the mfd_cell
infrastructure. You can then pass a "struct regmap" as the platform
data for each child of the timer node, and all the DT handling code
can stay in the parent driver.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 04/14] mfd: Add Samsung PWM/timer master driver
Date: Thu, 11 Apr 2013 00:35:47 +0200 [thread overview]
Message-ID: <201304110035.47776.arnd@arndb.de> (raw)
In-Reply-To: <5357756.gKmBOZlWcd@flatron>
On Monday 08 April 2013, Tomasz Figa wrote:
> On Saturday 06 of April 2013 00:24:18 Tomasz Figa wrote:
> > On Friday 05 of April 2013 21:54:21 Arnd Bergmann wrote:
> > > On Friday 05 April 2013, Tomasz Figa wrote:
> >
> > I'm not sure what you mean by a register-level interface. Something like
> > samsung_pwm_update_reg(reg, mask, val), which modifies bitfields
> > according to the mask and value with appropriate synchronization? If
> > yes, this solves only the problem of access to shared registers.
> >
> > The other problems that remain:
> >
> > - negotiation of PWM channels to use for clock source and clock events,
> > because each board can use different channels for PWM outputs,
> >
> > - code duplication caused by both of the drivers doing mostly the same
> > things and or having to parse the same data from device tree,
> >
> > - both non-DT and DT platforms must be supported,
> >
> > - how to keep the ability to load PWM driver as a module (or not load it
> > at all when PWM is not used on particular board), while retaining
> > everything that is needed for the clocksource driver in kernel,
> >
> > - some platforms can't use PWM timers as system clocksources, while on
> > others this is the only timekeeping hardware available.
> >
>
> Hmm. Does anybody have an idea of a better way of implementing this PWM
> timer support, which solves the above problems?
>
> This series is a dependency for moving Universal C210 board to DT-based
> description and it's already almost out of time to get this included for
> 3.10...
>
Sorry for not replying earlier. My idea for the register level interface
was to create a platform_device for each PWM, e.g. using the mfd_cell
infrastructure. You can then pass a "struct regmap" as the platform
data for each child of the timer node, and all the DT handling code
can stay in the parent driver.
Arnd
next prev parent reply other threads:[~2013-04-10 22:35 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 16:36 [PATCH v4 00/14] ARM: samsung-time: Prepare for multiplatform support Tomasz Figa
2013-04-04 16:36 ` Tomasz Figa
2013-04-04 16:36 ` [PATCH v4 01/14] ARM: SAMSUNG: Move samsung-time to drivers/clocksource Tomasz Figa
2013-04-04 16:36 ` Tomasz Figa
2013-04-04 16:36 ` [PATCH v4 02/14] clocksource: samsung-time: Drop useless defines from public header Tomasz Figa
2013-04-04 16:36 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 03/14] clocksource: samsung-time: Use local register definitions Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 04/14] mfd: Add Samsung PWM/timer master driver Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-05 16:39 ` Samuel Ortiz
2013-04-05 16:39 ` Samuel Ortiz
2013-04-05 16:53 ` Tomasz Figa
2013-04-05 16:53 ` Tomasz Figa
2013-04-05 17:05 ` Arnd Bergmann
2013-04-05 17:05 ` Arnd Bergmann
2013-04-05 17:35 ` Tomasz Figa
2013-04-05 17:35 ` Tomasz Figa
2013-04-05 19:54 ` Arnd Bergmann
2013-04-05 19:54 ` Arnd Bergmann
2013-04-05 22:24 ` Tomasz Figa
2013-04-05 22:24 ` Tomasz Figa
2013-04-08 16:53 ` Tomasz Figa
2013-04-08 16:53 ` Tomasz Figa
2013-04-10 22:35 ` Arnd Bergmann [this message]
2013-04-10 22:35 ` Arnd Bergmann
2013-04-11 16:28 ` Mark Brown
2013-04-11 16:28 ` Mark Brown
2013-04-11 16:44 ` Tomasz Figa
2013-04-11 16:44 ` Tomasz Figa
2013-04-11 21:08 ` Arnd Bergmann
2013-04-11 21:08 ` Arnd Bergmann
2013-04-04 16:37 ` [PATCH v4 05/14] ARM: SAMSUNG: Unify base address definitions of timer block Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 06/14] ARM: SAMSUNG: Add new PWM platform device Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 07/14] ARM: SAMSUNG: Set PWM platform data Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 08/14] clocksource: samsung-time: Use Samsung PWM/timer master driver Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 09/14] clocksource: samsung-time: Use variant data to get SoC-specific bits Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 10/14] clocksource: samsung-time: Use master driver to configure dividers Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 11/14] clocksource: samsung-time: Use clk_prepare_enable Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 12/14] clocksource: samsung-time: Use master driver to control PWM channels Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 13/14] clocksource: samsung-time: Move IRQ mask/ack handling to the driver Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 16:37 ` [PATCH v4 14/14] ARM: SAMSUNG: Remove unused PWM timer IRQ chip code Tomasz Figa
2013-04-04 16:37 ` Tomasz Figa
2013-04-04 23:15 ` [PATCH v4 00/14] ARM: samsung-time: Prepare for multiplatform support Heiko Stübner
2013-04-04 23:15 ` Heiko Stübner
2013-04-05 10:33 ` Tomasz Figa
2013-04-05 10:33 ` Tomasz Figa
2013-04-05 22:57 ` Tomasz Figa
2013-04-05 22:57 ` Tomasz Figa
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=201304110035.47776.arnd@arndb.de \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=augulis.darius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=buserror-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=christer-rKHMIqA5R6gwFerOooGFRg@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=ghcstop-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jekhor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kwangwoo.lee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=mcuelenaere-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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.