Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1642709rdb; Thu, 25 Jan 2024 01:38:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYpc3SIHtZxkE/9i6qH1JBVo3k6h41LufVHGm+V4mRDhGNe9rVt5LITVZYUlgNC3P1884Q X-Received: by 2002:a17:90a:bb83:b0:290:2f93:610 with SMTP id v3-20020a17090abb8300b002902f930610mr592575pjr.43.1706175485655; Thu, 25 Jan 2024 01:38:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706175485; cv=pass; d=google.com; s=arc-20160816; b=ah6C9kpUFAMn2xrOOlrQUD1zkWNa6dCpD3tGfVSdb8nq44/9c/tqGBCKzfyJFEJo8k 5ZUv3uC4Uo+iaHZXrRFJVAouYX/I0iwHdA1wTAeSnl+LsuqAdECtRDQiYg/B3SdSw84T lokpB3dAJVt4JOcq5E2BkVLX1Gm0JUUddM9Yhmk1cqjauGnjsZOi5AtZMDfS8EdvhlOX QFNMKY43TnhEdGJCX5I1gxSyJLRG9N96CdetCs6CXNWbLuD/69a6hURPV93p/iCHfk7e QMIloxF5bCuVsUONaGqZ6UYS8QYPYQr1o8gYCwuLIdBgNCBYO+tf+oYB2UPgGtQqqpEt W0KA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=5p74A015/6G4sVWav+jkCsMA3W4osbHKdYXmaTePMgI=; fh=rXBx4U6nGV62qAcxcdc+r+HVrnKzpFv+Wyznz0qZs1c=; b=slBWO6A3J306U8kANnoW5J8nMlRQP2qntkQAYSJA07bs7eYNJ8g/jWl820jpOrEnii Q2nl6bS8pGAWk2Gva63XDuN0DNGJjcX0hV1HNfj8rKaGkhjXiyQ/Uren1QJNRu3mR7bz ie70OLC4TD1z4xUrfSV3Z+3uItqa3B+yiOZvzsJmu8sqdMIlziansZbP6G/J7HKbBrNH J2PxZh3+92RWd99u0NXzOoda2Pp0fnGKTQkZCHvFwvCx6n69xxEKhEa6Z4aw0nh1LFFG mDfMjH1ZyHPOHHBQiiFOTubOd4y1skymi5Uf29Mn0NohRq4EX9x55jhc0lnyt6X5ajlu ekZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mE8glqlZ; 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-38221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38221-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s3-20020a17090a5d0300b0028e88453568si1040609pji.161.2024.01.25.01.38.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 01:38:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mE8glqlZ; 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-38221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38221-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2B5E7B2932D for ; Thu, 25 Jan 2024 09:05:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A8AE1BC3D; Thu, 25 Jan 2024 08:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mE8glqlZ" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 4252245C1C for ; Thu, 25 Jan 2024 08:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706173164; cv=none; b=MlBTYUBj6V073Fn/EqboL1Se86twleY0Ong8NvD1GSn5/cXY8Is71wDWAR5FvtbhOUYK5F1F94Pk7vPkuBaHUGhdnX1odx56z9vLNCcRtoOgi4x7Z3jBGqCQhiTuPRTLpF2xSVOd5NIdekTgir8gU+CTL0Wl+I7bdGPDeQD6Qwo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706173164; c=relaxed/simple; bh=tlx2ckEz/OH8ARX5IfGa/yGe/4FJ1kSmrm3PuJXNAFk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KHIC0yAx0FWtcg+ZmRKlav29LBQFD9rqWy5skMMsPAn6dL+OEBXs0RkwiWXRR1gPeb5dANCxneklpkfmz2XNOB/cif04gwdfcMPiodHUnzrqcG4zKvVV/A2GGaa7QUKxVRMOQ4FE8yT/RqPQQlxwev2Y0dqlC/Jl1wv6ANWAw0I= 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=mE8glqlZ; arc=none smtp.client-ip=209.85.218.41 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-ej1-f41.google.com with SMTP id a640c23a62f3a-a31914e7493so22165566b.3 for ; Thu, 25 Jan 2024 00:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706173160; x=1706777960; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5p74A015/6G4sVWav+jkCsMA3W4osbHKdYXmaTePMgI=; b=mE8glqlZF15PXnpqJpCKDRvzS4Z0xFbF5XKwObCqNXtx3Or86HiyFDOFAv8661VmDN eYu0bjipW9PYB/rb8iEYF2L8/b400FpZQoTw7p4qvMak8u31VxzRQeoITdwcT4WTLK3P 8mdc1JvHKdeRqI2QC3tcApO0lTEJerwDkRfTP/R0cM+VJucHVcpTanwqYrZSTuIPOlVr dVoohFBE20QZbaE4hemi0wtkiaLX8I+Tv8GbHfnDLxKBl9C9aQGKtrGwOTQlHO/0LqFq Tt4b1BHHDGtuMH5Q5tdH4zmnsNj1RzgzSF9Aaf67AWKep6Ygy4Qxho7xJk4obTPzwD2t IwJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706173160; x=1706777960; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5p74A015/6G4sVWav+jkCsMA3W4osbHKdYXmaTePMgI=; b=Q/ub4WAblpmfEtK6Z7Yjq0wlJHvFSMFN09rfeEFThGkrkhJqDpXnA65m/M6L+cycjg M031vNsSzgVzc2L4V4Jy6GhIFp1RwjQjPLu3AawCjIoLoMN5mTOr2S4wIbL5k2kWlDM5 lP9KV83NgwUyQbjrDNZ1tBAiTcWxAEt4RUqwONZ12iYi7hhmNCDBe58OQn95UQKQP8E5 eWXssG8C6uvkhs0Z4CR/dw7mEaRTrQ20xGT/z32VVX+t+bOuma5nmXHSwoQxBXrBADOO 4MXZ9OXb3G2o1MHkVTeWw3lAVDgP1fAeyUyND69FlUFAWZfOHFjvXWv/QRMkvWZ8cMr/ i3oQ== X-Gm-Message-State: AOJu0YzJ5ShB56us4BUu/shVaJ9a3YdcMUX7DkLYJ7S921BVNGPYOs8/ vW5oP2ULaucrPwY109ODKxwwc6CRE7knzMNb3BYIF5+YhhR9CEPAIp1uba3OI0HAhZ18OhHS4s6 Z X-Received: by 2002:a17:906:890a:b0:a26:edeb:7635 with SMTP id fr10-20020a170906890a00b00a26edeb7635mr250672ejc.91.1706173160396; Thu, 25 Jan 2024 00:59:20 -0800 (PST) Received: from [192.168.1.20] ([178.197.215.66]) by smtp.gmail.com with ESMTPSA id gv21-20020a170906f11500b00a28a66028bcsm794592ejb.91.2024.01.25.00.59.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 00:59:19 -0800 (PST) Message-ID: Date: Thu, 25 Jan 2024 09:59:19 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Content-Language: en-US To: Bartosz Golaszewski Cc: Linus Walleij , Peter Rosin , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Philipp Zabel References: <20240125081601.118051-1-krzysztof.kozlowski@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfreEFCwkIBwIGFQoJCAsCBBYCAwEC HgECF4AACgkQG5NDfTtBYptgbhAAjAGunRoOTduBeC7V6GGOQMYIT5n3OuDSzG1oZyM4kyvO XeodvvYv49/ng473E8ZFhXfr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On 25/01/2024 09:36, Bartosz Golaszewski wrote: > On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski > wrote: >> >> Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled. >> >> Cc: >> Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()") >> 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 9a5c6c76e653..012797e7106d 100644 >> --- a/include/linux/gpio/driver.h >> +++ b/include/linux/gpio/driver.h >> @@ -819,6 +819,12 @@ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc) >> return ERR_PTR(-ENODEV); >> } >> >> +static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc) >> +{ >> + WARN_ON(1); >> + return ERR_PTR(-ENODEV); >> +} >> + >> static inline int gpiochip_lock_as_irq(struct gpio_chip *gc, >> unsigned int offset) >> { >> -- >> 2.34.1 >> > > Why is this needed? Users of gpio/driver.h should select GPIOLIB. The third patch shows you the user which will not select GPIOLIB. Why? Because there is no hard dependency between one core framework (RESET) on other core framework (GPIOLIB). The first two patches are added for the same purpose, even though there is no need currently. Best regards, Krzysztof