From patchwork Thu Jan 25 08:16:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 191894 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1491841dyi; Thu, 25 Jan 2024 00:17:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzq35lRApcJY/xsSQyPwREopgaMcYuDWcCoSOHMgQR0oo3Dxjfx2l9bHo45FyIB8lyQQqO X-Received: by 2002:a17:906:6692:b0:a2d:9a0b:b4b1 with SMTP id z18-20020a170906669200b00a2d9a0bb4b1mr157252ejo.40.1706170641112; Thu, 25 Jan 2024 00:17:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706170641; cv=pass; d=google.com; s=arc-20160816; b=vymCGedTQUo1C3zo8QuyEYcgcJCuV4pN9d9O+B/6GDBy3O+/C4HfR2L3OitdjBAZqo IKiq2PkCYyf9i/UKefuh/6xEwfP2QFa6z8tsw+rI3cGACBzuhqANqQTwhjgasvMjnHQJ MsYlOgOxa2Zv02X5OyxdshJ9M2z3WIgOoQP2M228N7cEMiE77JlfIjfyTHegCE/uWEnx HeV1GDyIHn7vm2hngWJCVzLMhB0dY8ajSXDF+u+b0XN71YN1hwp0VkHsyPfSw6Uh5y+Z wph8MMUDU1DtL9Y5P+IYpprhBm16naa+YO8YiNuvT/IdFLgmMv7hg7qAcQYP8q1O1Yfc OwXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vZhfRAcMkEoSH9uoQJllo0c8c8c3cGnCVOI0jsbLnjU=; fh=2sNyQIvCWYsUPaifphPoU31lHEE3CXYFJJlGvbzZrfM=; b=W+sxspdeS7nBK2J+F96/zcE0gMIPgtvQX+BTXjhVOcfsCkCpuus2l5XLj8qkErIlra p+gbx/t9To5tsHldMC1GLwMx1k+A6xLzcJG7/Dj/DEaUhxSR9GIrA/CzysMEfwNkiwEm 43I76qngg7tbAj2XgKqUxABUW3GLS11cwZqgO+zGkwda/S4lmXF/WD4tyWG46PWaMwEC uJceu3PVyG0UjxVVVMph5FhxFyIEMx1gchAVfvoMGDjR1Xggux4AsQHiGPsXse3iZHCV zoknw2tQsORcthACJoShmmuDYtImTuKKS8BghZBeNuQqYncntpFo41OklbUBiDleguAT 0v8w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmlDgATJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-38150-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38150-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hg11-20020a170906f34b00b00a318da3d27esi140451ejb.463.2024.01.25.00.17.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:17:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38150-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmlDgATJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-38150-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38150-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BAA561F20222 for ; Thu, 25 Jan 2024 08:17:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 932301B27D; Thu, 25 Jan 2024 08:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XmlDgATJ" Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6878617BA3 for ; Thu, 25 Jan 2024 08:16:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170569; cv=none; b=G2Orlm6JdRrPwVJnfEv+8d9MwfD83la8HyPjxhHokZovCcneX7qWFGdih5Lto7QtXS7EbPWA0wOr8JxEfPMUq/z7y99VD01GqlfzL/Wcdk5ySoai3EwnSK1V+mD6tzFQsImrv2nnr5L7obYJzCZZOtHmxMMzgqdQ7UmBaiD3XQQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170569; c=relaxed/simple; bh=/g90OGyapLZIgFMzfzoWev7vgtKFk6/jNzgHgg3GQXE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EjSElB/ZwpNswmibdMBsDYe/GiemO1ieMGmS1hrbgENTXYGHZZ4+SzPRlKoEDfxQdNBTOFt1km59+WmMhJI7bNdyZDiZ03acx86t3xy6fmXGAlr8AtYJ1laVB4vQbpTxBajvHKSmAvSsb9TCAaKoOqLZLOwF1lMQ8cOYrdodHJY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XmlDgATJ; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-50eabbc3dccso8082142e87.2 for ; Thu, 25 Jan 2024 00:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706170566; x=1706775366; darn=vger.kernel.org; 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=vZhfRAcMkEoSH9uoQJllo0c8c8c3cGnCVOI0jsbLnjU=; b=XmlDgATJrRxFgFBPpqU6nztUiq+5UF+B0eUoHbOd80KQOI8xJ/aV1V+ljUjATE5jEp WhSQlMDFYzYdC2U38Qufoun5z1x7m6GrVlaIh4Qfnkw5NVc7kQTC7zIIHLVbc6a5LnBO /o+EhJNZ9QidomLm5ZXaU6QlbMqbx618IbA76EWlpEqxS5Ssr1q4RMKF2NnF2TcQmSSg CckfmBETrUtWF8SKxlz2Ia5Qfhcmf+0iVuiPEJXnFV8E39BU41Fhie6IJQbq/iA1yV9W VyIDBKDuhZQcuzI0zEcCjB0yP2MACyC/laf7PU6/c4gD/SsXgnU8TTyaV3abnrwO61kf 3HQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706170566; x=1706775366; 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=vZhfRAcMkEoSH9uoQJllo0c8c8c3cGnCVOI0jsbLnjU=; b=AgFBlzV3e2wxMDaK5Jy4n60oFs35qZ2db81DEwnfdXn2avoMlVCOQZvzI5EhPw+wF9 nEX9EsKuTdTMuPbu0gUiQel9LGStYECd/wUoRE2+xvsSCzWmok5OjefSX7DRDxqK+2l/ PtbOSWBoj5Ptcs9Fu6o2gZLSGD+ZcUPKDrAdbIrBe17xw6m6O9b+9iOn0FUOnbEBIxSu 8fRyR3TzB0D+9e1G59HRIhKxh3WirSSDMYqVlh+rqp/MEZJmvJVoKL/eTt440vQFuF8g DBkIDwNlVIa6xwSwIpGO3cYip7dY/5AbabjWa0/dsOxdqp/K1kqd0J1anZ+7XPG/23uP GkUw== X-Gm-Message-State: AOJu0YxRkzQRNh7sdM7861Vuowd//GAkZnZTKs5jSssguzZ5AWb0A17+ SlRw4YQcKeAg5b9qANqrqoULaydQH4UJLi+F+amYPIihOSL7DLuo8KZbulNubW8= X-Received: by 2002:a19:f509:0:b0:50b:f304:3bed with SMTP id j9-20020a19f509000000b0050bf3043bedmr132659lfb.49.1706170566479; Thu, 25 Jan 2024 00:16:06 -0800 (PST) Received: from krzk-bin.. ([178.197.215.66]) by smtp.gmail.com with ESMTPSA id f21-20020a056402195500b0055c63205052sm3410210edz.37.2024.01.25.00.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:16:06 -0800 (PST) From: Krzysztof Kozlowski To: Linus Walleij , Bartosz Golaszewski , Peter Rosin , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , stable@vger.kernel.org, Philipp Zabel Subject: [PATCH 2/3] gpiolib: add gpio_device_get_base() stub for !GPIOLIB Date: Thu, 25 Jan 2024 09:16:00 +0100 Message-Id: <20240125081601.118051-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240125081601.118051-1-krzysztof.kozlowski@linaro.org> References: <20240125081601.118051-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789049586146060234 X-GMAIL-MSGID: 1789049586146060234 Add empty stub of gpio_device_get_base() when GPIOLIB is not enabled. Cc: Fixes: 8c85a102fc4e ("gpiolib: provide gpio_device_get_base()") Signed-off-by: Krzysztof Kozlowski --- Cc: Philipp Zabel --- include/linux/gpio/driver.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 012797e7106d..c1df7698edb0 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -825,6 +825,12 @@ static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc) return ERR_PTR(-ENODEV); } +static inline int gpio_device_get_base(struct gpio_device *gdev) +{ + WARN_ON(1); + return -ENODEV; +} + static inline int gpiochip_lock_as_irq(struct gpio_chip *gc, unsigned int offset) {