From: Thierry Reding <thierry.reding@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Jian Yuan <yuanjian12@hisilicon.com>,
mark.rutland@arm.com, linux-pwm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
xuejiancheng@hisilicon.com, kevin.lixu@hisilicon.com,
jalen.hsu@hisilicon.com
Subject: Re: [PATCH v4] pwm: add pwm driver for HiSilicon BVT SOCs
Date: Fri, 21 Oct 2016 09:34:57 +0200 [thread overview]
Message-ID: <20161021073457.GF2670@ulmo.ba.sec> (raw)
In-Reply-To: <20161021072236.GD2670@ulmo.ba.sec>
[-- Attachment #1: Type: text/plain, Size: 2960 bytes --]
On Fri, Oct 21, 2016 at 09:22:36AM +0200, Thierry Reding wrote:
> On Mon, Oct 10, 2016 at 04:53:39PM -0500, Rob Herring wrote:
> > On Mon, Oct 10, 2016 at 07:05:16PM +0800, Jian Yuan wrote:
> > > From: yuanjian <yuanjian12@hisilicon.com>
> > >
> > > Add PWM driver for the PWM controller found on HiSilicon BVT SOCs, like Hi3519V100, Hi3516CV300, etc.
> > > The PWM controller is primarily in charge of controlling P-Iris lens.
> > >
> > > Reviewed-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
> > > Signed-off-by: Jian Yuan <yuanjian12@hisilicon.com>
> > > ---
> > > Change Log:
> > > v4:
> > > Add #pwm-cells in the bindings document.
> > > v3:
> > > fixed issues pointed by thierry.
> > > Add PWM compatible string for Hi3519V100.
> > > Implement .apply() function which support atomic, instead of .enable()/.disable()/.config().
> > > v2:
> > > The number of PWMs is change to be probeable based on the compatible string.
> > >
> > > .../devicetree/bindings/pwm/pwm-hibvt.txt | 23 ++
> > > drivers/pwm/Kconfig | 9 +
> > > drivers/pwm/Makefile | 1 +
> > > drivers/pwm/pwm-hibvt.c | 270 +++++++++++++++++++++
> > > 4 files changed, 303 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/pwm/pwm-hibvt.txt
> > > create mode 100644 drivers/pwm/pwm-hibvt.c
> > >
> > > diff --git a/Documentation/devicetree/bindings/pwm/pwm-hibvt.txt b/Documentation/devicetree/bindings/pwm/pwm-hibvt.txt
> > > new file mode 100644
> > > index 0000000..609284f
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/pwm/pwm-hibvt.txt
> > > @@ -0,0 +1,23 @@
> > > +Hisilicon PWM controller
> > > +
> > > +Required properties:
> > > +-compatible: should contain one SoC specific compatible string and one generic compatible
> > > +string "hisilicon, hibvt-pwm". The SoC specific strings supported including:
> >
> > Extra space ^
> >
> > With that, for the binding:
> >
> > Acked-by: Rob Herring <robh@kernel.org>
>
> I'm wondering what the use is of the generic compatible string? Not only
> is the driver not listing it, nor is it in any way useful since there is
> nothing the driver could do based on the generic compatible string (each
> version of the IP currently supported has a different number of PWM
> channels).
Actually it's worse. The driver does have an entry for the generic
compatible string but it doesn't assign .data in that case (which is
really what I was saying above). Now according to the bindings it is
disallowed to have only the generic compatible string, which is good
because doing so would crash the driver on probe.
So, if it's not allowed to have only the generic compatible string,
why even have one at all? We always have an SoC-specific compatible
string as well, so the generic one is completely redundant.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2016-10-21 7:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 11:05 [PATCH v4] pwm: add pwm driver for HiSilicon BVT SOCs Jian Yuan
2016-10-10 21:53 ` Rob Herring
2016-10-21 7:22 ` Thierry Reding
2016-10-21 7:34 ` Thierry Reding [this message]
2016-10-28 2:56 ` Jian Yuan
2016-10-28 2:48 ` Jian Yuan
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=20161021073457.GF2670@ulmo.ba.sec \
--to=thierry.reding@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jalen.hsu@hisilicon.com \
--cc=kevin.lixu@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh@kernel.org \
--cc=xuejiancheng@hisilicon.com \
--cc=yuanjian12@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).