From patchwork Wed Oct 26 16:56:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Twiss X-Patchwork-Id: 9397791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2FAA260231 for ; Wed, 26 Oct 2016 17:20:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 232D328B79 for ; Wed, 26 Oct 2016 17:20:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17F6229186; Wed, 26 Oct 2016 17:20:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA7D328B79 for ; Wed, 26 Oct 2016 17:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934471AbcJZRTq (ORCPT ); Wed, 26 Oct 2016 13:19:46 -0400 Received: from mail1.bemta3.messagelabs.com ([195.245.230.176]:5263 "EHLO mail1.bemta3.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755427AbcJZRTb (ORCPT ); Wed, 26 Oct 2016 13:19:31 -0400 Received: from [85.158.137.19] by server-16.bemta-3.messagelabs.com id E5/93-01653-F95E0185; Wed, 26 Oct 2016 17:19:27 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIKsWRWlGSWpSXmKPExsUSt3Opse78pwI RBs1XZCymPnzCZjH/yDlWi8OLXjBazL9yjdXi/tejjBbfrnQwWdz89I3V4vKuOWwWn3uPMFrc WLeP3eLJwjNMFkuvX2SyaN17BMh92MdmcXliJ7vFrRkvWB0EPNbMW8PosXPWXXaPa5vFPBbve cnksWlVJ5vHnWt72Dx2fm9g9/i8SS6AI4o1My8pvyKBNePJ9bnsBQukKo7MusfcwPhOtIuRi0 NIYD2jxNtDL5m6GDmBnAqJd92LWEFsXoFkibuTDrGB2JwCjhKzn81hhahxkDhw4jcjiM0mYCg x7817MJtFQFViwu+3YHOEBUwlFjbNYgNZICLQwSjRNvcjE4jDLPCLWaK/6So7xAZBiZMzn7CA 2MwCEhIHX7xg7mLkANqgJbH8WCRIWELAXmL6+6tgYQkBfYnGY7EQYUOJ77O+sUCEzSUWTdWcw Cg4C8nMWUhmLmBkWsWoUZxaVJZapGtorJdUlJmeUZKbmJmja2hgrJebWlycmJ6ak5hUrJecn7 uJERh1DECwg3Hbds9DjJIcTEqivA+eCEQI8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuCdApITLEp NT61Iy8wBxj9MWoKDR0mE9xBImre4IDG3ODMdInWKUVFKnDcLJCEAksgozYNrg6WcS4yyUsK8 jECHCPEUpBblZpagyr9iFOdgVBLmPQ8yhSczrwRu+iugxUxAi6engy0uSURISTUwhu3mZZiiN vXp2/NLvp+XE/5wmbNX8W7F7TkXX0gdFtfI0xbMYdK7WfkhTm5FnMOzyYuFfIz2HhaI/jM5Ty 6wXsFplVfvpVyz850C/rJGGgfOfnNRW2Pbetn8d0mMlqvHgnlptiHeX7e3bHZIfvL2V1OxlEp G8bubE2MktvbI6u1TDLI8l1CnxFKckWioxVxUnAgAVcKJtDQDAAA= X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-9.tower-39.messagelabs.com!1477502364!57764713!9 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 591 invoked from network); 26 Oct 2016 17:19:27 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-9.tower-39.messagelabs.com with AES128-SHA encrypted SMTP; 26 Oct 2016 17:19:27 -0000 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.248.2; Wed, 26 Oct 2016 18:19:25 +0100 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22547) id F13E13FBF4; Wed, 26 Oct 2016 18:19:23 +0100 (BST) Message-ID: <29f73d4d4718cc5848c0414ea60f865ef39bd2cf.1477501000.git.stwiss.opensource@diasemi.com> In-Reply-To: References: From: Steve Twiss Date: Wed, 26 Oct 2016 17:56:39 +0100 Subject: [PATCH V2 07/10] Input: da9061: onkey driver To: Dmitry Torokhov , LINUX-INPUT , LINUX-KERNEL CC: DEVICETREE , Eduardo Valentin , Guenter Roeck , LINUX-PM , LINUX-WATCHDOG , Lee Jones , Liam Girdwood , Mark Brown , Mark Rutland , Rob Herring , Support Opensource , Wim Van Sebroeck , Zhang Rui MIME-Version: 1.0 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-ServerInfo: sw-ex-cashub01.diasemi.com, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 26/10/2016 13:31:00 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Steve Twiss Copyright header is updated to add DA9061 in its description and the module description macro is extended to include DA9061. Minor change to the code, alters dev_dbg() statements to report a generic "PMIC" instead of DA9063. This device driver is compatible with DA9061, DA9062 and DA9063. Kconfig is updated to reflect support for DA9061/62/63. Signed-off-by: Steve Twiss --- This patch applies against linux-next and v4.8 v1 -> v2 - Patch renamed from [PATCH V1 03/10] to [PATCH V2 07/10] -- these changes were made to fix checkpatch warnings caused by the patch set dependency order - Revert changes for DA9061 specific compatible changes. Dmitry, Alterations made in accordance with previous e-mail thread on the use of compatible strings: https://lkml.org/lkml/2016/10/7/641 Now assuming the use of a fallback compatible string in the DT. compatible = "dlg,da9061-onkey", "dlg,da9062-onkey"; Regards, Steve Twiss, Dialog Semiconductor Ltd. drivers/input/misc/Kconfig | 7 ++++--- drivers/input/misc/da9063_onkey.c | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index efb0ca8..57cc9c2 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -613,11 +613,12 @@ config INPUT_DA9055_ONKEY will be called da9055_onkey. config INPUT_DA9063_ONKEY - tristate "Dialog DA9062/63 OnKey" + tristate "Dialog DA9063/62/61 OnKey" depends on MFD_DA9063 || MFD_DA9062 help - Support the ONKEY of Dialog DA9063 and DA9062 Power Management ICs - as an input device capable of reporting the power button status. + Support the ONKEY of Dialog DA9063, DA9062 and DA9061 Power + Management ICs as an input device capable of reporting the + power button status. To compile this driver as a module, choose M here: the module will be called da9063_onkey. diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c index bb863e0..dff6fe5 100644 --- a/drivers/input/misc/da9063_onkey.c +++ b/drivers/input/misc/da9063_onkey.c @@ -1,5 +1,5 @@ /* - * OnKey device driver for DA9063 and DA9062 PMICs + * OnKey device driver for DA9063, DA9062 and DA9061 PMICs * Copyright (C) 2015 Dialog Semiconductor Ltd. * * This program is free software; you can redistribute it and/or @@ -149,13 +149,13 @@ static void da9063_poll_on(struct work_struct *work) * and then send shutdown command */ dev_dbg(&onkey->input->dev, - "Sending SHUTDOWN to DA9063 ...\n"); + "Sending SHUTDOWN to PMIC ...\n"); error = regmap_write(onkey->regmap, config->onkey_shutdown, config->onkey_shutdown_mask); if (error) dev_err(&onkey->input->dev, - "Cannot SHUTDOWN DA9063: %d\n", + "Cannot SHUTDOWN PMIC: %d\n", error); } } @@ -300,6 +300,6 @@ static struct platform_driver da9063_onkey_driver = { module_platform_driver(da9063_onkey_driver); MODULE_AUTHOR("S Twiss "); -MODULE_DESCRIPTION("Onkey device driver for Dialog DA9063 and DA9062"); +MODULE_DESCRIPTION("Onkey device driver for Dialog DA9063, DA9062 and DA9061"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:" DA9063_DRVNAME_ONKEY);