From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34506C27C76 for ; Sun, 22 Jan 2023 15:21:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3554A85657; Sun, 22 Jan 2023 16:21:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mtnC7aLq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B8DF856A2; Sun, 22 Jan 2023 16:21:39 +0100 (CET) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B31A085657 for ; Sun, 22 Jan 2023 16:21:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dsankouski@gmail.com Received: by mail-ed1-x536.google.com with SMTP id s3so11889582edd.4 for ; Sun, 22 Jan 2023 07:21:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=55E7mQnptVShjsiYwSaznX2COXJf6RzUpR+ZQHKbKqM=; b=mtnC7aLq+nAWWdowBfGsUyzgNK3vkErYAvxx8XERURjxGYjB9/CRGqNZfEawKcJ+CP 3fC8GsNpNcHbuEQk7E8sOoo3fyKhTmAu8Hza1a8nIlI0jtHMet6XDMSqtFrZgHBwL1oL Xnbqz03/I9+uj6AKTDJoAy+mqnln3vd+qkXpyMgiMFXxNXpbdovvt0bDD4sH1bJNBpgS 8g/Ul3kiHE8C3S5dKeQxvCWNYV1W8gxxEEGCLXBdOpOWK0QoIogILpB1yvHvmCTqYS6Y r4XBDoPM0Oh1UwsjPNTzWAiooWbX2Woxx6u0jyjrT/eqYjA+21LKjZMf3Bkse4g5IX8M bYsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=55E7mQnptVShjsiYwSaznX2COXJf6RzUpR+ZQHKbKqM=; b=7DwQvJNkzoTINL6sMsJeQoN2bAvg7GOCPBMIRBTHvrLTuWhG1uTKOs4j1ZXps2Ljis Y2dTiTnMpeSrLpGGVTDPeSoB0PZlUyouj2jFldPVjcUBSArSVk+/CgP7yoxaUOmn9nn1 LpJyhUOljCeujwyOcuWGaGAfx6FsEEQlUUStUPprG82ckav+WVMQSwX7rk+2LSgTl42i mFbPDxYyKwlOMa2+7aUoIvPAKGvN85EvGbpV1+u/BMrMBXZjqkl2CER5KtZh1H41ifdC bSxKS4TfxXdVQAEPC2NKc4BCCvQ4xuzW0JG2ccy2Qi/b9MaHTGnszLXc09B0BL5egvOA Yksw== X-Gm-Message-State: AFqh2krEciv/yZUpj7+2k8p8sb7UvrhB3vhSCw1p2qJTpnEVLVmawHKd pG6ubA8zn+kai9XttfY/1IF12kkpYZs= X-Google-Smtp-Source: AMrXdXvNrr7qUT+MNB4Hanofs6LyVwNX8Aed62HpvW2L4KuaTk+B09AWXXuUXb0IpssupIkRSBaFkQ== X-Received: by 2002:a05:6402:5507:b0:49d:efdc:4f77 with SMTP id fi7-20020a056402550700b0049defdc4f77mr29979452edb.38.1674400896123; Sun, 22 Jan 2023 07:21:36 -0800 (PST) Received: from localhost.localdomain ([46.216.42.4]) by smtp.googlemail.com with ESMTPSA id a8-20020aa7d908000000b0049dfd6bdc25sm11190075edr.84.2023.01.22.07.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jan 2023 07:21:35 -0800 (PST) From: Dzmitry Sankouski To: u-boot@lists.denx.de Cc: Dzmitry Sankouski , Sumit Garg Subject: [PATCH v3 1/5] gpio: qcom: add direction functions for pwrkey Date: Sun, 22 Jan 2023 18:21:21 +0300 Message-Id: <20230122152125.858085-2-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230122152125.858085-1-dsankouski@gmail.com> References: <20230122152125.858085-1-dsankouski@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean GPIO button driver requires direction functions to probe button gpio. Those functions are blank, since pwrkey is not really gpio, and don't support direction settings. Signed-off-by: Dzmitry Sankouski Reviewed-by: Sumit Garg --- Changes for v2: - none Changes for v3: - KDPWR and RESIN not gpio: fix comment and commit message drivers/gpio/qcom_pmic_gpio.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpio/qcom_pmic_gpio.c b/drivers/gpio/qcom_pmic_gpio.c index 3be1be8692..65feb453eb 100644 --- a/drivers/gpio/qcom_pmic_gpio.c +++ b/drivers/gpio/qcom_pmic_gpio.c @@ -303,9 +303,25 @@ static int qcom_pwrkey_get_value(struct udevice *dev, unsigned offset) } } +/* + * Since pmic buttons modelled as GPIO, we need empty direction functions + * to trick u-boot button driver + */ +static int qcom_pwrkey_direction_input(struct udevice *dev, unsigned int offset) +{ + return 0; +} + +static int qcom_pwrkey_direction_output(struct udevice *dev, unsigned int offset, int value) +{ + return -EOPNOTSUPP; +} + static const struct dm_gpio_ops qcom_pwrkey_ops = { .get_value = qcom_pwrkey_get_value, .get_function = qcom_pwrkey_get_function, + .direction_input = qcom_pwrkey_direction_input, + .direction_output = qcom_pwrkey_direction_output, }; static int qcom_pwrkey_probe(struct udevice *dev) -- 2.30.2