From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Heiny Subject: Re: [PATCH 01/05] input synaptics-rmi4: Split F01 definitions out into header file for use by reflash. Date: Mon, 10 Mar 2014 15:33:06 -0700 Message-ID: <531E3DA2.5090705@synaptics.com> References: <1394245795-17347-1-git-send-email-cheiny@synaptics.com> <20140310144658.GB18578@sonymobile.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from us-mx2.synaptics.com ([192.147.44.131]:3302 "EHLO us-mx2.synaptics.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752439AbaCJWdH (ORCPT ); Mon, 10 Mar 2014 18:33:07 -0400 In-Reply-To: <20140310144658.GB18578@sonymobile.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Courtney Cavin Cc: Dmitry Torokhov , Linux Input , Andrew Duggan , Vincent Huang , Vivian Ly , Daniel Rosenberg , Linus Walleij , Benjamin Tissoires , David Herrmann , Jiri Kosina On 03/10/2014 07:46 AM, Courtney Cavin wrote: > On Sat, Mar 08, 2014 at 03:29:51AM +0100, Christopher Heiny wrote: >> Signed-off-by: Christopher Heiny >> Cc: Dmitry Torokhov >> Cc: Benjamin Tissoires >> Cc: Linux Walleij >> Cc: David Herrmann >> Cc: Jiri Kosina >> >> --- >> >> drivers/input/rmi4/rmi_f01.c | 96 ++----------------------------------- >> drivers/input/rmi4/rmi_f01.h | 110 +++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 114 insertions(+), 92 deletions(-) > > $SUBJECT is 83 characters long. Please be more brief and provide a > description. OK. > > [...] >> +#define RMI_SLEEP_MODE_NORMAL 0x00 >> +#define RMI_SLEEP_MODE_SENSOR_SLEEP 0x01 >> +#define RMI_SLEEP_MODE_RESERVED0 0x02 >> +#define RMI_SLEEP_MODE_RESERVED1 0x03 >> + >> +#define RMI_IS_VALID_SLEEPMODE(mode) \ >> + (mode >= RMI_SLEEP_MODE_NORMAL && mode <= RMI_SLEEP_MODE_RESERVED1) >> + > > I might be missing something, but these seem like the only defines used > in the flash code. Why not keep these in the f01 driver, and export > a couple more functions, like rmi_f01_reset() and rmi_f01_set_sleep_mode() ? It seems better to me to have the information defined in a single place, rather than scattered hither and yon through the source files.