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 1AB81C00A5A for ; Thu, 19 Jan 2023 17:19:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A871785676; Thu, 19 Jan 2023 18:18:53 +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="JDBBv5Rq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 162028566D; Thu, 19 Jan 2023 18:18:46 +0100 (CET) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 B4DD585673 for ; Thu, 19 Jan 2023 18:18:43 +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-x531.google.com with SMTP id w14so3730825edi.5 for ; Thu, 19 Jan 2023 09:18:43 -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=z1/9VZGe/EyyPJBMWAzCor/AoJVAS1r3eohIqH8uZKo=; b=JDBBv5Rq02tb7akhp6wIkew2XiyqnLzAzmHb9fYFko3nJGR1vYWLU//YBODVk1PXpl 8i/7Fg0ECzLgfj4NzBWnWDfCSWYFxQmEPmIDJ2krG5nACJV4O4kTzzcaHHU9tD6PNUou EXL3pSuHK+Bt/Kjz52EuBRZVap96HtTQy+xKCoTHVCacixAvIdLfgzGfeFLUuKgSQUcr RQqgb/w1EkEM5n2gshDod5QqSPoN1SemR+bjklTRAa2GO1zPrP54v/9bbTGvmALzec5q GhKHUqJ7uZWj3b59cFqnOyrXQ89I/MvepWIwMtBOeEonjVKH/aXqZam1+b73qMwXDc4r eK5A== 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=z1/9VZGe/EyyPJBMWAzCor/AoJVAS1r3eohIqH8uZKo=; b=cX8TsoxHk/zS7CbKtHrpX19S+oKXK5/Hv2nHGISyL5euVB99CtwDmb2OHSWAXip19A lAhhTcXEl07w+YIIj1wXXsOmU9yHk58oL0/nxGvr3DqP8vTBmoc/0NIlVVRuRho4kGut yH48Ylmux1rfHWh7GrqYVx8ZKrHCEMvJ1pOzEggovigGjhAE1BxgizyWJkbUptZiB0sz VrE0D7+ayLOfkzjttJbDAh5bzyPVl4do2+Y3gkoTM5vk47xyrxxNM6xAmQJ+2b8xYfyc 189bnswM5939sDs7ksC9h0lSqzaTprQzi6DG4nhR70X2zh9YIoLX6PtGlNWhPbxcB4qq AYSQ== X-Gm-Message-State: AFqh2kqr5KXVWM2/BRHSFmuQe20E7EiWh33EE330T1iR2syuJ7KJcmUa xpkrmFBfv4gTe2h5f0NnI0Mr+74L5oI= X-Google-Smtp-Source: AMrXdXtN95p/doDZJI+mteOMtvRWcOfTEbxOE38Y3IaPV6UNDD7nta2BS0ZO27e8YFAxaTQer6jyAw== X-Received: by 2002:a05:6402:10c6:b0:497:d4ca:457d with SMTP id p6-20020a05640210c600b00497d4ca457dmr11420783edu.34.1674148723247; Thu, 19 Jan 2023 09:18:43 -0800 (PST) Received: from localhost.localdomain ([46.216.42.4]) by smtp.googlemail.com with ESMTPSA id d22-20020a50fe96000000b0049c6c7670easm8235077edt.70.2023.01.19.09.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 09:18:42 -0800 (PST) From: Dzmitry Sankouski To: u-boot@lists.denx.de Cc: Dzmitry Sankouski , Sumit Garg Subject: [PATCH v2 1/4] gpio: qcom: add direction functions for pwrkey Date: Thu, 19 Jan 2023 20:18:27 +0300 Message-Id: <20230119171830.702266-2-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230119171830.702266-1-dsankouski@gmail.com> References: <20230119171830.702266-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 gpio configured earlier not by u-boot. Signed-off-by: Dzmitry Sankouski --- Changes for v2: - none drivers/gpio/qcom_pmic_gpio.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpio/qcom_pmic_gpio.c b/drivers/gpio/qcom_pmic_gpio.c index 3be1be8692..e46377ce3b 100644 --- a/drivers/gpio/qcom_pmic_gpio.c +++ b/drivers/gpio/qcom_pmic_gpio.c @@ -303,9 +303,24 @@ static int qcom_pwrkey_get_value(struct udevice *dev, unsigned offset) } } +/* + * Power button already configured as input by previous bootloader. + */ +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