From: Thierry Reding <thierry.reding@gmail.com>
To: Naidu Tellapati <Naidu.Tellapati@imgtec.com>
Cc: "naidu.tellapati@gmail.com" <naidu.tellapati@gmail.com>,
"abrestic@chromium.org" <abrestic@chromium.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"arnd@arndb.de" <arnd@arndb.de>,
James Hartley <James.Hartley@imgtec.com>,
Ezequiel Garcia <Ezequiel.Garcia@imgtec.com>,
James Hogan <James.Hogan@imgtec.com>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Arul Ramasamy <Arul.Ramasamy@imgtec.com>,
Sai Masarapu <Sai.Masarapu@imgtec.com>
Subject: Re: [PATCH RESEND v4 1/4] pwm: Imagination Technologies PWM DAC driver
Date: Mon, 24 Nov 2014 13:28:09 +0100 [thread overview]
Message-ID: <20141124122807.GA4061@ulmo.nvidia.com> (raw)
In-Reply-To: <27E62D98F903554192E3C13AFCC91C3C2F52EE89@hbmail01.hb.imgtec.org>
[-- Attachment #1: Type: text/plain, Size: 2929 bytes --]
On Mon, Nov 24, 2014 at 11:22:31AM +0000, Naidu Tellapati wrote:
> Hi Thierry,
>
> Many thanks for the review.
>
> > On Sat, Nov 22, 2014 at 07:23:29AM +0530, naidu.tellapati@gmail.com wrote:
> >> From: Naidu Tellapati <Naidu.Tellapati@imgtec.com>
> >>
> >> The Pistachio SOC from Imagination Technologies includes a Pulse Width
> >> Modulation DAC which produces 1 to 4 digital bit-outputs which represent
> >> digital waveforms. These PWM outputs are primarily in charge of controlling
> >> backlight LED devices.
> >>
> >> Signed-off-by: Naidu Tellapati <Naidu.Tellapati@imgtec.com>
> >> Signed-off-by: Sai Masarapu <Sai.Masarapu@imgtec.com>
> >> ---
> >> drivers/pwm/Kconfig | 12 ++
> >> drivers/pwm/Makefile | 1 +
> >> drivers/pwm/pwm-img.c | 270 +++++++++++++++++++++++++++++++++++++++++++++++++
> >> 3 files changed, 283 insertions(+), 0 deletions(-)
> >> create mode 100644 drivers/pwm/pwm-img.c
> >>
> >> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> >> index ef2dd2e..6b4581a 100644
> >> --- a/drivers/pwm/Kconfig
> >> +++ b/drivers/pwm/Kconfig
> >> @@ -110,6 +110,18 @@ config PWM_FSL_FTM
> >> To compile this driver as a module, choose M here: the module
> >> will be called pwm-fsl-ftm.
> >>
> >> +config PWM_IMG
>
> > This sounds really generic to me. Basically this says that every PWM IP
> > developed by Imagination Technologies will be compatible with this one.
> > It's typical to name modules after <vendor>-<soc> to avoid this type of
> > ambiguity.
>
> > Is there any reason why this can't be called PWM_IMG_PISTACHIO?
>
> At this moment, this IP Block is available at least on one more SOC from Imagination Technologies.
> It is possible that the IP will be available on more SOCs in future.
>
> Shall we go ahead with PWM_IMG?
Alright, if ever there's a different PWM IP block from Imagination
Technologies, the driver for that can have a more specific name.
> >> +
> >> + val = img_pwm_readl(pwm_chip, CR_PWM_CTRL_CFG);
> >> + val |= BIT(pwm->hwpwm);
> >> + img_pwm_writel(pwm_chip, CR_PWM_CTRL_CFG, val);
> >> +
> >> + regmap_update_bits(pwm_chip->periph_regs, CR_PERIP_PWM_PDM_CONTROL,
> >> + CR_PERIP_PWM_PDM_CONTROL_CH_MASK <<
> >> + CR_PERIP_PWM_PDM_CONTROL_CH_SHIFT(pwm->hwpwm), 0);
>
> > This smells like pinmux and should probably be a separate driver.
>
> Hope you are suggesting us to have a separate driver for pin muxing (might already have one for Pistachio)
> and call the pin muxing driver APIs from here.
>
> Please correct me if my understanding is wrong?
I don't think you need to call the pinmux API from here. Rather I'll
assume that the muxing is fixed on a given board, so this configuration
would be part of the static board-level pinmux so it will automatically
be applied at boot time.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-11-24 12:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-22 1:53 [PATCH RESEND v4 0/4] Initial support for ImgTec PWM DAC and PDM DAC naidu.tellapati
2014-11-22 1:53 ` [PATCH RESEND v4 1/4] pwm: Imagination Technologies PWM DAC driver naidu.tellapati
2014-11-24 10:13 ` Thierry Reding
2014-11-24 11:22 ` Naidu Tellapati
2014-11-24 12:28 ` Thierry Reding [this message]
2014-11-24 14:19 ` Naidu Tellapati
2014-11-24 18:19 ` Andrew Bresticker
2014-11-24 19:09 ` James Hartley
2014-11-27 16:03 ` Naidu Tellapati
2014-11-24 17:47 ` Andrew Bresticker
2014-11-22 1:53 ` [PATCH RESEND v4 2/4] DT: pwm: Add binding document for IMG PWM DAC naidu.tellapati
2014-11-24 10:14 ` Thierry Reding
2014-11-24 11:26 ` Naidu Tellapati
2014-11-22 1:53 ` [PATCH RESEND v4 3/4] pdm: Imagination Technologies PDM DAC driver naidu.tellapati
2014-11-22 1:53 ` [PATCH RESEND v4 4/4] DT: pdm: Add binding document for IMG PDM DAC naidu.tellapati
-- strict thread matches above, loose matches on Subject: below --
2014-11-21 20:13 [PATCH RESEND v4 0/4] Initial support for ImgTec PWM DAC and " Naidu.Tellapati
2014-11-21 20:13 ` [PATCH RESEND v4 1/4] pwm: Imagination Technologies PWM DAC driver Naidu.Tellapati
2014-11-21 21:23 ` Andrew Bresticker
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=20141124122807.GA4061@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=Arul.Ramasamy@imgtec.com \
--cc=Ezequiel.Garcia@imgtec.com \
--cc=James.Hartley@imgtec.com \
--cc=James.Hogan@imgtec.com \
--cc=Naidu.Tellapati@imgtec.com \
--cc=Sai.Masarapu@imgtec.com \
--cc=abrestic@chromium.org \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-pwm@vger.kernel.org \
--cc=naidu.tellapati@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.