From patchwork Thu Jun 28 15:08:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 141570 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2304644ljj; Thu, 28 Jun 2018 08:09:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKxQWYPsYd6MNaNTIWHzT1L/h5hsch+RjJnENNTAZ2qCnYI1bxDs86UZ3TYhYozjceTeHgh X-Received: by 2002:a63:2505:: with SMTP id l5-v6mr9450472pgl.40.1530198590683; Thu, 28 Jun 2018 08:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530198590; cv=none; d=google.com; s=arc-20160816; b=vIwtAp6YhSUVZ/WNae/KUtN6g9pioZd3PuD792iyaieiaA4dA6dXV2B6qf7zk47Y7f gk7f8X4ubHYhjFoCDnS8BL9LrbHoyzBw3BpbhzWFe2FmvNEaevKiLGb9pNd0UiS2ZHGh LJ9RRwZ+0QA1eySJR5Kfz4/HH8jmfon5pTt93r/Zch4GqC/O0C15zOOweRTs9ZCjIU0x lGb6fWQuKEq1OYKURzQciJoW9uAI1Z5Uu0vU+9qm7slheaCDiZi827Xo00oZ3thVnTzQ p5MVQ7JhgIQCooCIueYA3Kxq3c8f5NwzLyT5w8AGZlcTsi1L7/dvnbtE4AwM6UXs5SdN /Qqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=mGg+xUQc988INa1Yg+XHJsMMlCBYs/5NmxG9CgKR1MU=; b=z8Ck96sl3938pLkc6LJR1jibMlQsHzxe+YoSdQAwTgPOcCURRG2srfB3ZWlisBMYmt WVXk6oUK6OJtgmWqS7sRtPxNNUl0aWcxeslqdDnYkKm7ivapy0mj25mwJOkUv5FIZkKQ tzUXsyWpYFu6uFZto1SCbgju4KuIg3da6OMD/+kpUVipaluEdkoiP5QqeinLc2xr/Hp7 /aLC02oAvlNH3mGudPCu05Sth1EdOxkk+5ftaREJkkS8hRjefmkze1ai1h51h7YlN/Z+ KEJajcqKqc6u+B+oKiFwrZTbzisaByFL7S/hDhhr7TqsPlDk7xzR0IlkZqZ65qLn+/En iDaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=default header.b=EFf3PTP9; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14-v6si6681332plr.365.2018.06.28.08.09.50 for ; Thu, 28 Jun 2018 08:09:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=default header.b=EFf3PTP9; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967026AbeF1PJs (ORCPT ); Thu, 28 Jun 2018 11:09:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:37918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966685AbeF1PJm (ORCPT ); Thu, 28 Jun 2018 11:09:42 -0400 Received: from localhost.localdomain (unknown [106.201.104.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6143D24832; Thu, 28 Jun 2018 15:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530198581; bh=18zSlxLW6hAhdBXWIFXD/MmFR9Mxa1xrsMWvFj3m/Bk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EFf3PTP9hy+MpGhQPMlSLUBtDHph/WH7OdFQsGznBsry7LF6m0Gy2rsrxCw/4eAXC PssJD+TjtQHRVnSYhTrgKravEFfVQD82FJcq1Zc+GeQ77AMEgknX/7I0lTxQv6+xpX pKorp67P4RgK3EdjRgul59AqJDOaCD+S81sgvDnw= From: Vinod Koul To: linux-input@vger.kernel.org, linux-pm@vger.kernel.org Cc: Bjorn Andersson , Dmitry Torokhov , Rob Herring , Sebastian Reichel , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul Subject: [PATCH v5 6/6] input: pm8941-pwrkey: Add resin entry Date: Thu, 28 Jun 2018 20:38:50 +0530 Message-Id: <20180628150850.15358-7-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180628150850.15358-1-vkoul@kernel.org> References: <20180628150850.15358-1-vkoul@kernel.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Since handling is abstracted in this driver, we need to add resin entry in id table along with pwrkey_data. Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul --- drivers/input/misc/pm8941-pwrkey.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.14.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c index 2047e34c0982..6547a57f5222 100644 --- a/drivers/input/misc/pm8941-pwrkey.c +++ b/drivers/input/misc/pm8941-pwrkey.c @@ -29,6 +29,7 @@ #define PON_RT_STS 0x10 #define PON_KPDPWR_N_SET BIT(0) +#define PON_RESIN_N_SET BIT(1) #define PON_PS_HOLD_RST_CTL 0x5a #define PON_PS_HOLD_RST_CTL2 0x5b @@ -39,6 +40,7 @@ #define PON_PULL_CTL 0x70 #define PON_KPDPWR_PULL_UP BIT(1) +#define PON_RESIN_PULL_UP BIT(0) #define PON_DBC_CTL 0x71 #define PON_DBC_DELAY_MASK 0x7 @@ -306,8 +308,14 @@ static const struct pm8941_data pwrkey_data = { .status_bit = PON_KPDPWR_N_SET, }; +static const struct pm8941_data resin_data = { + .pull_up_bit = PON_RESIN_PULL_UP, + .status_bit = PON_RESIN_N_SET, +}; + static const struct of_device_id pm8941_pwr_key_id_table[] = { { .compatible = "qcom,pm8941-pwrkey", .data = &pwrkey_data }, + { .compatible = "qcom,pm8941-resin", .data = &resin_data }, { } }; MODULE_DEVICE_TABLE(of, pm8941_pwr_key_id_table);