Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650272

Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device

From Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Newsgroups linux.kernel
Subject Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device
Date 2017-05-25 10:10 +0200
Message-ID <tKW0j-5FH-21@gated-at.bofh.it> (permalink)
References (1 earlier) <tJYnw-80c-25@gated-at.bofh.it> <tJYnw-80c-33@gated-at.bofh.it> <tK0fD-HF-7@gated-at.bofh.it> <tKbb4-7G0-9@gated-at.bofh.it> <tKVnA-5du-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>> "Crap origin" here is that in vast majority of cases, polarity is
>> per-chip, not per-chip-use, knowledge. And proper location for per-chip
>> knowledge is chip's driver.  Moving this knowledge to per-chip-use
>> location in device trees only provides a source for errors, with little
>> gain.
>>
>> Vladimir Barinov mentions possibility that signal can be inverted by
>> board between gpio provider and chip's pin ...   but do we have at least
>> one practical case of this?  And if we even do, it's quite uncommon, and
>> something special should be required in device tree for these special
>> cases and not for "normal" cases.
> 
> I disagree.  Not for hi8435, but I have seen quite some board designs
> invert GPIOs before getting them into board level components.  That's
> why we should define those xxx-gpios properties on board level DTS,
> where polarity can be chosen per board design.

Even if such, still board specific knowledge is "is gpio as-is or
inverted", but knowledge if chip expects signal to be active low or
active high, remains chip-specific.

I'm thinking of proposing new flags in gpio binding, say
GPIO_NATIVE_POLARITY / GPIO_INVERTED_POLARITY,  that could be used
instead of GPIO_ACTIVE_HIGH / GPIO_ACTIVE_LOW, and leave knowledge about
signal polarity to chip's driver, while still allow to describe
inversion of needed.

Nikita

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-22 15:20 +0200
  Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Stefan Agner <stefan@agner.ch> - 2017-05-22 18:30 +0200
    Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-22 18:30 +0200
      Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Andrew Lunn <andrew@lunn.ch> - 2017-05-22 20:30 +0200
        Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-23 08:10 +0200
          Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Shawn Guo <shawnguo@kernel.org> - 2017-05-25 09:30 +0200
            Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-25 10:10 +0200
              Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Jonathan Cameron <jic23@kernel.org> - 2017-05-28 17:20 +0200
  Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Shawn Guo <shawnguo@kernel.org> - 2017-05-25 09:10 +0200
    Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2017-05-25 10:10 +0200
      Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device Shawn Guo <shawnguo@kernel.org> - 2017-05-25 10:30 +0200

csiph-web