From patchwork Fri Mar 31 16:15:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Riegel X-Patchwork-Id: 9656683 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 CC413601D2 for ; Fri, 31 Mar 2017 16:16:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEE83285B8 for ; Fri, 31 Mar 2017 16:16:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3ADC286E1; Fri, 31 Mar 2017 16:16:43 +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=ham 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 69389285B8 for ; Fri, 31 Mar 2017 16:16:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933126AbdCaQQm (ORCPT ); Fri, 31 Mar 2017 12:16:42 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:36864 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933127AbdCaQQk (ORCPT ); Fri, 31 Mar 2017 12:16:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id D68779C1BC9; Fri, 31 Mar 2017 12:16:38 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oxNNCBGIFQCi; Fri, 31 Mar 2017 12:16:38 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 3860B9C1B9A; Fri, 31 Mar 2017 12:16:38 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4XaedBBtpomP; Fri, 31 Mar 2017 12:16:37 -0400 (EDT) Received: from workotop.mtl.sfl (unknown [192.168.49.100]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id D60109C1BA7; Fri, 31 Mar 2017 12:16:37 -0400 (EDT) From: Damien Riegel To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Rob Herring , Mark Rutland , kernel@savoirfairelinux.com, Damien Riegel Subject: [PATCH 6/6] Input: pm8xxx-vib: add support for pm8916's vibrator Date: Fri, 31 Mar 2017 12:15:38 -0400 Message-Id: <20170331161538.11657-6-damien.riegel@savoirfairelinux.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170331161538.11657-1-damien.riegel@savoirfairelinux.com> References: <20170331161538.11657-1-damien.riegel@savoirfairelinux.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add pm8xxx_regs for this PMIC and the device tree match table entry. Signed-off-by: Damien Riegel --- drivers/input/misc/Kconfig | 2 +- drivers/input/misc/pm8xxx-vibrator.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 5b6c52210d20..79d0be9885c5 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -143,7 +143,7 @@ config INPUT_PM8941_PWRKEY config INPUT_PM8XXX_VIBRATOR tristate "Qualcomm PM8XXX vibrator support" - depends on MFD_PM8XXX + depends on MFD_PM8XXX || MFD_SPMI_PMIC select INPUT_FF_MEMLESS help This option enables device driver support for the vibrator diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c index 803bc75d5531..96d18a300e7a 100644 --- a/drivers/input/misc/pm8xxx-vibrator.c +++ b/drivers/input/misc/pm8xxx-vibrator.c @@ -43,6 +43,15 @@ static struct pm8xxx_regs pm8058_regs = { .drv_en_manual_mask = 0xfc, }; +static struct pm8xxx_regs pm8916_regs = { + .enable_addr = 0x46, + .enable_mask = BIT(7), + .drv_addr = 0x41, + .drv_mask = 0x1F, + .drv_shift = 0, + .drv_en_manual_mask = 0, +}; + /** * struct pm8xxx_vib - structure to hold vibrator data * @vib_input_dev: input device supporting force feedback @@ -258,6 +267,7 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_vib_pm_ops, pm8xxx_vib_suspend, NULL); static const struct of_device_id pm8xxx_vib_id_table[] = { { .compatible = "qcom,pm8058-vib", .data = &pm8058_regs }, { .compatible = "qcom,pm8921-vib", .data = &pm8058_regs }, + { .compatible = "qcom,pm8916-vib", .data = &pm8916_regs }, { } }; MODULE_DEVICE_TABLE(of, pm8xxx_vib_id_table);