From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755234AbbGTNGi (ORCPT ); Mon, 20 Jul 2015 09:06:38 -0400 Received: from mail1.bemta3.messagelabs.com ([195.245.230.175]:36441 "EHLO mail1.bemta3.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753013AbbGTNGf convert rfc822-to-8bit (ORCPT ); Mon, 20 Jul 2015 09:06:35 -0400 X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-4.tower-38.messagelabs.com!1437397544!10469752!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked From: "Opensource [Steve Twiss]" To: Dmitry Torokhov CC: DEVICETREE , LINUXINPUT , LINUXKERNEL , RTCLINUX , David Dajun Chen , Ian Campbell , "Kumar Gala" , Lee Jones , Mark Rutland , Pawel Moll , Rob Herring , Samuel Ortiz , "Support Opensource" Subject: RE: [PATCH RFC V1 2/3] onkey: da9063: Add DA9062 OnKey capability to DA9063 OnKey driver Thread-Topic: [PATCH RFC V1 2/3] onkey: da9063: Add DA9062 OnKey capability to DA9063 OnKey driver Thread-Index: AQHQvjbWx9sW4eV5b0CnyDDeO9vnv53gONMAgAQd9lA= Date: Mon, 20 Jul 2015 13:05:43 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7014B251D0A@SW-EX-MBX02.diasemi.com> References: <37d843a776028807e94e513a34847a34d821bf81.1436879270.git.stwiss.opensource@diasemi.com> <20150717225042.GF39282@dtor-ws> In-Reply-To: <20150717225042.GF39282@dtor-ws> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.77] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17 July 2015 23:51, Dmitry Torokhov wrote: > Hi Steve, > On Tue, Jul 14, 2015 at 02:07:50PM +0100, S Twiss wrote: > > From: S Twiss > > Add DA9062 OnKey support into the existing DA9063 OnKey driver component by > > using generic access tables for common register and bit mask definitions. > > > > The following change will add generic register and bit mask support to the > > DA9063 OnKey. > > > > The following alterations have been made to the DA9063 OnKey: > > > > - Addition of a da9063_compatible_onkey_regmap structure to hold all > > generic registers and bitmasks for this type of OnKey component. > > - Addition of an struct of_device_id table for DA9063 and DA9062 > > defaults > > - Refactoring functions to use struct da9063_compatible_onkey accesses > > to generic registers/masks instead of using defines from registers.h > > - Re-work of da9063_onkey_probe() to use of_match_node() and > > dev_get_regmap() to provide initialisation of generic registers and > > masks and access to regmap > > > > Signed-off-by: Steve Twiss > > Looks generally good, just a few comments. > Hi Dmitry, Thanks for taking the time to review this. [...] > > diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig > > index d4f0a81..42860f9 100644 > > --- a/drivers/input/misc/Kconfig > > +++ b/drivers/input/misc/Kconfig > > @@ -612,10 +612,10 @@ config INPUT_DA9055_ONKEY > > > > config INPUT_DA9063_ONKEY > > tristate "Dialog DA9063 OnKey" > > "Dialog DA9062/63 OnKey" maybe? Yep. I can do that. [...] > > > > -struct da9063_onkey { > > - struct da9063 *hw; > > +struct da9063_compatible_onkey_regmap { > > Maybe call it da906x_chip_config? I will do this. > > + /* REGS */ > > + int onkey_status; > > + int onkey_pwr_signalling; > > + int onkey_fault_log; > > + int onkey_shutdown; > > + /* MASKS */ > > + int onkey_nonkey_mask; > > + int onkey_nonkey_lock_mask; > > + int onkey_key_reset_mask; > > + int onkey_shutdown_mask; > > + /* NAMES */ > > + char *name; > > const char *? > Sure -- I'll change that. > > +}; > > + > > +struct da9063_compatible_onkey { > > If you did not rename the structure your diff would be smaller. Yep. I can rename this back to what it was previously. [...] I'll submit a PATCH V2 with those changes. Regards, Steve