public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Damien Riegel <damien.riegel@savoirfairelinux.com>
Cc: linux-input@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	kernel@savoirfairelinux.com
Subject: Re: [PATCH 2/6] Input: pm8xxx-vib: sync device tree bindings doc with the driver
Date: Sat, 1 Apr 2017 11:06:07 -0700	[thread overview]
Message-ID: <20170401180607.GM17130@dtor-ws> (raw)
In-Reply-To: <20170401175127.3nt5gujkvgyoh2tc@workotop.localdomain>

On Sat, Apr 01, 2017 at 01:51:27PM -0400, Damien Riegel wrote:
> On Sat, Apr 01, 2017 at 09:54:09AM -0700, Dmitry Torokhov wrote:
> > On Fri, Mar 31, 2017 at 12:15:34PM -0400, Damien Riegel wrote:
> > > The driver uses a hardcoded value for the register, so the parameter set
> > > in the device tree is not actually used.
> > > 
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: Mark Rutland <mark.rutland@arm.com>
> > > Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
> > > ---
> > >  Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt
> > > index 4ed467b1e402..86ce95fc6cf8 100644
> > > --- a/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt
> > > +++ b/Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt
> > > @@ -12,7 +12,8 @@ PROPERTIES
> > >  - reg:
> > >  	Usage: required
> > >  	Value type: <prop-encoded-array>
> > > -	Definition: address of vibration control register
> > > +	Definition: address of vibration control register. This value is
> > > +		    actually ignored and hardcoded in the driver to value 0x4a
> > 
> > I do not think we need to commit that the value is hard coded, it is
> > implementation detail of current version of Linux driver, whereas DT
> > bindings should be independent of OS as much as reasonably possible.
> > 
> > Also, I think you can change the code to actually read and use it from
> > DT to support your other device use case.
> 
> I was hesitant to do that because that might break stuff for people who
> use a device tree with reg != 0x4a, but if you tell me that's okay I'll
> send a v2 that reads device tree for all pm8xxx vibrators.

Actually, I was looking at the rest of the code and I now I wonder if we
should be doing this for any of the devices. The registers are
chip-specific and we get chip data from compatible string, so the driver
is fine to simply use static mappings. It is only if we start using a
common compatible string for different chips we would need to start
parsing DT data.

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-04-01 18:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 16:15 [PATCH 1/6] Input: pm8xxx-vib: reorder header alphabetically Damien Riegel
2017-03-31 16:15 ` [PATCH 2/6] Input: pm8xxx-vib: sync device tree bindings doc with the driver Damien Riegel
2017-04-01 16:54   ` Dmitry Torokhov
2017-04-01 17:51     ` Damien Riegel
2017-04-01 18:06       ` Dmitry Torokhov [this message]
2017-04-01 18:57         ` Damien Riegel
2017-04-03 18:31           ` Dmitry Torokhov
2017-03-31 16:15 ` [PATCH 3/6] Input: pm8xxx-vib: parametrize " Damien Riegel
2017-04-01 17:04   ` Dmitry Torokhov
2017-03-31 16:15 ` [PATCH 4/6] Input: pm8xxx-vib: handle separate enable register Damien Riegel
2017-04-01 17:06   ` Dmitry Torokhov
2017-03-31 16:15 ` [PATCH 5/6] Input: pm8xxx-vib: add pm8916-vib device tree bindings Damien Riegel
2017-03-31 16:15 ` [PATCH 6/6] Input: pm8xxx-vib: add support for pm8916's vibrator Damien Riegel

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=20170401180607.GM17130@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=damien.riegel@savoirfairelinux.com \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-input@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox