Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752864AbbGNNOc (ORCPT ); Tue, 14 Jul 2015 09:14:32 -0400 Received: from mail1.bemta14.messagelabs.com ([193.109.254.119]:13180 "EHLO mail1.bemta14.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752405AbbGNNNT (ORCPT ); Tue, 14 Jul 2015 09:13:19 -0400 X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-6.tower-193.messagelabs.com!1436879590!29497796!1 X-Originating-IP: [82.210.246.133] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked Message-ID: From: S Twiss Date: Tue, 14 Jul 2015 14:07:50 +0100 Subject: [PATCH RFC V1 0/3] da9062: Add DA9062 OnKey support using the existing DA9063 OnKey driver To: DEVICETREE , Dmitry Torokhov , Ian Campbell , Kumar Gala , LINUXINPUT , LINUXKERNEL , Lee Jones , Mark Rutland , Pawel Moll , RTCLINUX , Rob Herring , "S Twiss" , Samuel Ortiz CC: David Dajun Chen , Support Opensource MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: 8d172408-bd6a-42b1-8e53-daaedf35a5af Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3030 Lines: 69 From: S Twiss This patch set adds OnKey support for the Dialog DA9062 Power Management IC. Changes are made to the existing DA9063 OnKey component so that functionality in this device driver can be re-used to support the DA9062 OnKey. This following patch set is the proposed method for re-using the existing kernel OnKey drivers for chips whose OnKey blocks are functionally similar to the DA9063 OnKey. The main points for the MFD core and device tree changes are as follows. - Alteration of the DA9063 OnKey Kconfig needs to be updated to depend on both MFD_DA9063 "or" MFD_DA9062. There is no explicit DA9062 OnKey Kconfig. - The DA9062 MFD core should add a new OnKey resource as usual and an entry in the mfd_cell to support a component name and of_compatible for "da9062-onkey" and "dlg,da9062-onkey". - The device tree binding support should include a compatible string for "dlg,da9062-onkey" The main points for the OnKey changes are as follows: A generic structure is used (called da9063_compatible_onkey_regmap) to hold all generic registers and bitmasks for use with this type of OnKey component. Functions in the DA9063 OnKey will be refactored to use this compatibility struct and all accesses to generic registers/masks will be made through this table look-up instead of using defines from the register header files directly Linkage between the DA9062 MFD and the DA9063 OnKey driver is created through the use of an of_match_table entry in the platform_driver structure. A re-work of da9063_onkey_probe() is necessary to use the of_match_node() and dev_get_regmap() functions: this will provide initialisation of the generic registers and masks and allow access to the regmap according to the correct device tree specification. The addition of a of_device_id table for DA9063 and DA9062 default data is created. In this patch set the following is provided: - [PATCH V1 1/3]: MFD changes in DA9062 to support OnKey - [PATCH V1 2/3]: Update existing DA9063 OnKey to add DA9062 support - [PATCH V1 3/3]: Device tree bindings for DA9062 OnKey component This patch applies against linux-next and next-20150708 Thank you, Steve Twiss, Dialog Semiconductor Ltd. S Twiss (3): mfd: da9062: Support for the DA9063 OnKey in the DA9062 core onkey: da9063: Add DA9062 OnKey capability to DA9063 OnKey driver devicetree: da9062: Add device tree bindings for DA9062 OnKey Documentation/devicetree/bindings/mfd/da9062.txt | 18 +++ drivers/input/misc/Kconfig | 6 +- drivers/input/misc/da9063_onkey.c | 139 ++++++++++++++++++----- drivers/mfd/da9062-core.c | 11 ++ 4 files changed, 141 insertions(+), 33 deletions(-) -- end-of-patch for PATCH RFC V1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/