From patchwork Mon Jun 18 14:35:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 138979 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4029889lji; Mon, 18 Jun 2018 07:36:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLcKg+salrluaLizDokqV9KWnvmuIEZtbvr2sH95cwsKfgrX1biIU/KZafV6WPURnycJyCE X-Received: by 2002:a17:902:981:: with SMTP id 1-v6mr14515334pln.11.1529332589290; Mon, 18 Jun 2018 07:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529332589; cv=none; d=google.com; s=arc-20160816; b=CT+oHFilERLqAzD75zEtbEBWPLUINW0i6QkN5JbjVIQNz8W53I3VJiaUrgCWG2spHa MM1ke7BgleL7P1l74RdB+SPzwvbNsH3a/541CtOuz7pn+7DRTRwRw7a3tCQAQdlf46Fa 7yMQ+uSakTCr7Wh767A3i5xzbxQaI6tl3sTn0VqszM7nSkHZdMjndLLVlll1yDEd6uGE jfxo5B1ouJvcNsGBpd4EXJ+joolXwcl6FaZqXkiRVQYxwjckJf9Cv7bXD8VIJ0xxyMLU UP+f5C8+qyx+VNvlUax/x3Ssv10kHBwjBzMs1Yq1N8usQPhIcaLHiSfBIvE7ZXPi+FmX y8ow== 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=xq/mmP3YM5b6TYnQuPdZvJoYeNIY2Et6Ay4tl96/FBI=; b=SpvOlHP/dJM0DOET+NfP3QbYgqpUuARkuy4EKuc84uNI8Y8A1tGqc994UwhVLuBKqt ZLSbz+cChvcwdr2nmDYp3k4kWYyn4r1wEj2hiWm0gxLP5J1O49YK/JA+zLWr5RSrMlP+ ZBG3kyfLBlyBSH0aSdcOEpMLr0sr6OAljfhGF4AvOOMqq5HxHoLXWE1bs8L6VSuhq7u5 /8nSCy54rQTIGrdhWS/lgRKbQmUrzTFKsC3FQWPXxcvdwUUBbEpotpWAqRElzhtIluwZ KaSOK3W8qyY6cVzkpdOthKK6QQ0ZdgIXOxyU3LvUgwXieQKVZKv4uPRWrr3vXd+KhKId 9aBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PuYNmg4m; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j189-v6si13741056pfg.351.2018.06.18.07.36.29; Mon, 18 Jun 2018 07:36:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=@linaro.org header.s=google header.b=PuYNmg4m; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934667AbeFROgZ (ORCPT + 13 others); Mon, 18 Jun 2018 10:36:25 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43971 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934711AbeFROgX (ORCPT ); Mon, 18 Jun 2018 10:36:23 -0400 Received: by mail-pl0-f68.google.com with SMTP id c41-v6so9138798plj.10 for ; Mon, 18 Jun 2018 07:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sxHOaIOKDL0C9xkCvI3V+zEaAB0OrpFLYwGIYL9Hok8=; b=PuYNmg4m7DnodfTD1e+1WhTC9aCVZmly85e18xcL8elrgelyuZU1v0OUdJbsUOAfIb IxGjJY4ffcRf8DpPaKWkX++2Gd0pAgeexi98SHGBdNb14OH8iyOYdjSE2Z+9vIhuxWGF G+PxJzZG1+QopB8OX+tZOyYnplMtDqZrjCHCE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sxHOaIOKDL0C9xkCvI3V+zEaAB0OrpFLYwGIYL9Hok8=; b=mHajsPIZyjFetzC8fBYaO8eH5kiujcMN0W9fRd8aFwcsOIhzYBBn/LbnVupdfkx2AV vuZmqhLjM2YcMWQfdss/ABu0GzuMBX/1aea/HljhSxhU60sqr2rOK7aTfxPDGFLSTMRt PjpCzE9JMvOyuaByZk5BvmqCiMZo4Aw4L+idTx7ji2E7lm4k9JvRo7OrhSkMvYgA7f/+ a3jK5n7JLh5Oijdvjh3j+LIUSg3AYqwlFclAZjfK53wKUVhQoO1rEz9XmtrDO0gaIxZo 5g5Z/WhT4EP2BcxkWhKlKiwuCgbbkHP4WmIhh8GDVmrlxpqlZlJatw8BcQEBOvuRXAeI dkfA== X-Gm-Message-State: APt69E0pRlctXeGQasxY3cqeGOCJeUwvdZqBN7qmHNYGrmt3bb6Qk9mR xGYVlUaB7WkDBtF/C1cCQrxFJg== X-Received: by 2002:a17:902:be0d:: with SMTP id r13-v6mr14358236pls.299.1529332582704; Mon, 18 Jun 2018 07:36:22 -0700 (PDT) Received: from localhost.localdomain ([27.59.118.133]) by smtp.gmail.com with ESMTPSA id n10-v6sm28163604pfb.27.2018.06.18.07.36.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 07:36:22 -0700 (PDT) From: Vinod Koul X-Google-Original-From: Vinod Koul To: linux-input@vger.kernel.org, linux-pm@vger.kernel.org Cc: Dmitry Torokhov , Rob Herring , Sebastian Reichel , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul Subject: [PATCH 5/5] input: pm8941-pwrkey: Add resin entry Date: Mon, 18 Jun 2018 20:05:48 +0530 Message-Id: <20180618143548.29900-6-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180618143548.29900-1-vkoul@kernel.org> References: <20180618143548.29900-1-vkoul@kernel.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since handling is abstracted in this driver, we need to add resin entry in id table along with pwrkey_data. 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-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Bjorn Andersson diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c index aedb6ea2b50a..913405404a92 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 @@ -307,8 +309,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);