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


Groups > linux.kernel > #1390836

Re: [PATCH v2 07/10] gpio: stmpe: rework registers access

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 07/10] gpio: stmpe: rework registers access
Date 2016-04-29 09:50 +0200
Message-ID <rtblw-28S-19@gated-at.bofh.it> (permalink)
References <rsT5g-2UV-5@gated-at.bofh.it> <rsT5i-2UV-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 28, 2016 at 2:13 PM,  <patrice.chotard@st.com> wrote:

> From: Patrice Chotard <patrice.chotard@st.com>
>
> This update allows to use registers map as following :
> regs[reg_index + offset] instead of
> regs[reg_index] + offset
>
> This makes code clearer and will facilitate the addition of STMPE1600
> on which LSB and MSB registers are respectively located at addr and addr + 1.
> Despite for all others STMPE variant, LSB and MSB registers are respectively
> located in reverse order at addr + 1 and addr.
>
> For variant which have 3 registers's bank, we use LSB,CSB and MSB indexes
> which contains respectively LSB (or LOW), CSB (or MID) and MSB (or HIGH)
> register addresses (STMPE1801/STMPE24xx).
> For variant which have 2 registers's bank, we use LSB and CSB indexes only.
> In this case the CSB index contains the MSB regs address (STMPE 1601).
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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


Thread

[PATCH v2 00/10] STMPE fixes/rework and add STMPE1600 support <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
  [PATCH v2 02/10] mfd: stmpe: Add reset support for all STMPE variant <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
  [PATCH v2 01/10] mfd: stmpe: Add STMPE_IDX_SYS_CTRL/2 enum <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
  [PATCH v2 10/10] gpio: stmpe: Add STMPE1600 support <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
    Re: [PATCH v2 10/10] gpio: stmpe: Add STMPE1600 support Linus Walleij <linus.walleij@linaro.org> - 2016-04-29 09:50 +0200
  [PATCH v2 03/10] gpio: stmpe: fix edge and rising/falling edge detection <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
  [PATCH v2 08/10] Documentation: dt: add stmpe1600 compatible string to stmpe mfd <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
  [PATCH v2 06/10] mfd: stmpe: rework registers access <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
    Re: [PATCH v2 06/10] mfd: stmpe: rework registers access Linus Walleij <linus.walleij@linaro.org> - 2016-04-29 09:50 +0200
  [PATCH v2 05/10] mfd: stmpe: use generic bit mask name <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
  [PATCH v2 09/10] mfd: Add STMPE1600 support <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
  [PATCH v2 07/10] gpio: stmpe: rework registers access <patrice.chotard@st.com> - 2016-04-28 14:20 +0200
    Re: [PATCH v2 07/10] gpio: stmpe: rework registers access Linus Walleij <linus.walleij@linaro.org> - 2016-04-29 09:50 +0200
  Re: [PATCH v2 00/10] STMPE fixes/rework and add STMPE1600 support Linus Walleij <linus.walleij@linaro.org> - 2016-04-29 09:50 +0200
  Re: [PATCH v2 00/10] STMPE fixes/rework and add STMPE1600 support Marcel Ziswiler <marcel.ziswiler@toradex.com> - 2016-04-29 21:30 +0200

csiph-web