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 374FFC46467 for ; Wed, 11 Jan 2023 10:20:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C29B1854AE; Wed, 11 Jan 2023 11:19: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="m9Gh3nlM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9444385463; Wed, 11 Jan 2023 11:19:40 +0100 (CET) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 BC6F08540C for ; Wed, 11 Jan 2023 11:19:37 +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-ej1-x62c.google.com with SMTP id l22so5880283eja.12 for ; Wed, 11 Jan 2023 02:19:37 -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=XeFEonZcgAI9q4iB1Sbqh1vnFRdqCaL0oqziLSb0cf4=; b=m9Gh3nlMwkyNX/I4GGd79lBmHHg3Fdb9SxJb0wclbtgC0Wb8mgm37htd75nawxxidW 3aEJFnOsX5ex9rQBGFoAIE5katPqhmjcUoOUNCphQsSEDL7MaVO46DqU2mT/Fe0ZDWSp YTWNOw43DPogZ2+ZdPiqeaQ3TiZtE3i1ixT+rnZuTN7tG/t998R+AtAJMXk2Dq8CEnPr meOdcGNVIgfdCh+MqGGQ6mXbKBMdi3C5Hzf8PAP2zHhQL8fN2R9TYzjUhgtRclVXE9Sb FPAIQTpSNH49et9eL1xJWUER/5FWHf92FafUxZ7Aoer3zCoMB7A0MpbYiNsbYi7sU6Gj OlQQ== 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=XeFEonZcgAI9q4iB1Sbqh1vnFRdqCaL0oqziLSb0cf4=; b=W3xmZaoR0TOWyutCDgnqKQ8M6TwIDiS3UcVMRXoYFl8q1Wwqpfpkqzz25hX6H3KAV/ 97Dqd7s8uigCuI2uICve/1S8dzEcc8DA0G9Tpqu2TEVS4UX3A8qK/DhcKfjQxETp2Nmf x+fTyHCvfSReqDCWjn1bVsY1luv3A4Jm95b0/+IXEKgOCK0TDJ1b9amDcKLXdzeicFwQ DEJSmYV8DKkG+wmAq3FVK0isbc+qHIbizcCfGWDygxLSWBOgVGjeb9ZSyy9YTWaxg2pa F6aDEndF0St5CFUoak3zSd9hsn/vg5dCvYoIIzJVWrcZMPUdv3aLEEBaibwYmcg0lS4X uX9w== X-Gm-Message-State: AFqh2kr3lHAHVAoB6S3IuPwH81i5yVU4P1bYn87Pp3miM+kUpbJth0F3 MYfA0SQW4bfBFOyvdWGxO9yufUtBtMM= X-Google-Smtp-Source: AMrXdXvtDpTYb9vCIhSNW6ckYQLMZXm3FPb4FGkvZ7fI3Dg9ryDOfntz+nU66NH6WTRQiFgVnGeJbQ== X-Received: by 2002:a17:907:73c1:b0:7e8:cf25:4b9c with SMTP id es1-20020a17090773c100b007e8cf254b9cmr56962078ejc.59.1673432376941; Wed, 11 Jan 2023 02:19:36 -0800 (PST) Received: from localhost.localdomain ([46.216.42.4]) by smtp.googlemail.com with ESMTPSA id w5-20020a50fa85000000b00491c819d6d2sm5903764edr.44.2023.01.11.02.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 02:19:36 -0800 (PST) From: Dzmitry Sankouski To: u-boot@lists.denx.de Cc: Dzmitry Sankouski , Sumit Garg Subject: [PATCH 1/3] gpio: qcom: add direction functions for pwrkey Date: Wed, 11 Jan 2023 13:19:29 +0300 Message-Id: <20230111101931.342454-2-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230111101931.342454-1-dsankouski@gmail.com> References: <20230111101931.342454-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 --- 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