linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 0/5] Make gpio_keys accept board descriptors
Date: Fri, 24 Nov 2017 10:30:40 +0100	[thread overview]
Message-ID: <20171124093045.5961-1-linus.walleij@linaro.org> (raw)

The goal I'm working toward is to rid the kernel of the global
GPIO numberspace.

This means GPIO lines should be references by the local offset
on the GPIO chip.

This patch set starts to move gpio_keys toward using GPIO
look-up tables instead of global GPIO numbers to find their
GPIOs.

As an example I did (I think) the necessary patches to
convert DaVinci and i.MX to use this. There are several users
also x86 platform devices.

Strategy:

- Merge the patch to input/keyboard/gpio_keys* to support
  using descriptors from board files.

- Refactor the whole universe to get proper names on GPIO
  chips, and reference the GPIO lines with local offsets using
  tables, as in the example patches in this series. These
  can trickle in after the first patch is merged in Input.
  The work to be done can be seen if you type:
  git grep gpio_keys_platform_data

- When all are refactored, remove the "gpio" and "active low"
  members from the platform data and delete the associated
  legacy GPIO handling in the input driver for gpio_keys.

Posting this with the examples to get buy-in from Dmitry
before I go and spend time refactoring the world.

I.e. I'm happy if patch 1 gets merged, the rest I will push
through ARM SoC etc, or if nothing else works (like
nonresponsive maintainers) I can push it through the GPIO
tree without bothering Dmitry.

Linus Walleij (5):
  Input: gpio-keys: Support getting descriptors from board
  gpio: pca953x: Name the gpiochip after the I2C address
  ARM: davinci: Switch DA850EVM to use GPIO descriptors
  ARM: imx: Give all GPIO chips a unique name
  ARM: imx: Use GPIO descriptors for gpio_keys

 arch/arm/mach-davinci/board-da850-evm.c     | 57 ++++++++++++++---
 arch/arm/mach-imx/mach-armadillo5x0.c       | 19 ++++--
 arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 26 ++++++--
 arch/arm/mach-imx/mach-pcm037_eet.c         | 52 +++++++++++----
 arch/arm/mach-imx/mach-vpr200.c             | 99 ++++++++++++++++++++++++-----
 arch/arm/mach-imx/mm-imx21.c                | 12 ++--
 arch/arm/mach-imx/mm-imx27.c                | 12 ++--
 arch/arm/mach-imx/mm-imx3.c                 | 12 ++--
 drivers/gpio/gpio-pca953x.c                 | 17 ++++-
 drivers/input/keyboard/gpio_keys.c          | 14 +++-
 drivers/input/keyboard/gpio_keys_polled.c   | 10 +++
 11 files changed, 259 insertions(+), 71 deletions(-)

-- 
2.14.3


             reply	other threads:[~2017-11-24  9:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24  9:30 Linus Walleij [this message]
2017-11-24  9:30 ` [PATCH 1/5] Input: gpio-keys: Support getting descriptors from board Linus Walleij
2017-11-24  9:30 ` [PATCH 2/5] gpio: pca953x: Name the gpiochip after the I2C address Linus Walleij
2017-11-24 14:26   ` Andrew Lunn
2017-11-30 14:45     ` Linus Walleij
2017-11-24  9:30 ` [PATCH 3/5] ARM: davinci: Switch DA850EVM to use GPIO descriptors Linus Walleij
2017-11-24  9:30 ` [PATCH 4/5] ARM: imx: Give all GPIO chips a unique name Linus Walleij
2017-11-24  9:30 ` [PATCH 5/5] ARM: imx: Use GPIO descriptors for gpio_keys Linus Walleij
2017-11-25 23:33 ` [PATCH 0/5] Make gpio_keys accept board descriptors Dmitry Torokhov
2017-11-30 15:44   ` Linus Walleij
2020-08-26 13:20   ` Linus Walleij
2020-08-26 14:35     ` Heikki Krogerus
2020-08-26 16:12       ` Dmitry Torokhov
2020-08-26 23:31         ` Linus Walleij

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=20171124093045.5961-1-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.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;
as well as URLs for NNTP newsgroup(s).