From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752651AbcD2HmJ (ORCPT ); Fri, 29 Apr 2016 03:42:09 -0400 Received: from mail-ob0-f182.google.com ([209.85.214.182]:36307 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750719AbcD2HmH (ORCPT ); Fri, 29 Apr 2016 03:42:07 -0400 MIME-Version: 1.0 In-Reply-To: <1461845589-4826-7-git-send-email-patrice.chotard@st.com> References: <1461845589-4826-1-git-send-email-patrice.chotard@st.com> <1461845589-4826-7-git-send-email-patrice.chotard@st.com> Date: Fri, 29 Apr 2016 09:42:06 +0200 Message-ID: Subject: Re: [PATCH v2 06/10] mfd: stmpe: rework registers access From: Linus Walleij To: Patrice CHOTARD Cc: Lee Jones , Alexandre Courbot , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Maxime Coquelin , amelie.delaunay@st.com, Shawn Guo , Sascha Hauer , Dinh Nguyen , Viresh Kumar , Shiraz Hashim , Thierry Reding , Marcel Ziswiler , Stefan Agner , dev@lynxeye.de Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 28, 2016 at 2:13 PM, wrote: > From: Patrice Chotard > > 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 Yep this is so much clearer! Reviewed-by: Linus Walleij Yours, Linus Walleij