From patchwork Thu Jan 25 08:15:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 191896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1492931dyi; Thu, 25 Jan 2024 00:20:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyKjXb5JMI29GTebYjkn2oKU+DV2EgRox3PkdP68hjrUpmaChnRscwG0GSmmPRUwRKtQ/N X-Received: by 2002:a17:903:2286:b0:1d7:5d46:aef1 with SMTP id b6-20020a170903228600b001d75d46aef1mr526237plh.77.1706170819672; Thu, 25 Jan 2024 00:20:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706170819; cv=pass; d=google.com; s=arc-20160816; b=EJjlQllt/Z6NVs5p8za7Qrth01Cf9B0FN3O8biNX7KMSQnd65CpGpR/11+QQ+0Z1DJ oy42ISYyjsQayxjtxhKYKKWOwUr7Vii7Kz2aeC+Je2ygEuB4k323pomWUdzGgSKeruIi owI2rP7Mte1rAIjl9ML9ImZJsTcbbk93Ztmxj1K9awh80/PqEA8L9ATiCgk8RDP/dXjP pJ1KFDaYZSC5tOqJEwgVT17UPkoMssfeyA9d/lzuOWPBk+PNEHaRX7wgZs8NHMbdafnx OD4vW3QtC+O3myMLVg4A5KDazOrU7rD9g0P6r5YLFLYD1nlUgGTpBLXXmL5kDagF0Odc UIUQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=VMWJsQKBSlZi8pCKLBY5EvRH/GHYaBZd2IsEfoSOud8=; fh=2sNyQIvCWYsUPaifphPoU31lHEE3CXYFJJlGvbzZrfM=; b=dFjRkx7YKzg5i4H9WPvSCEljhfzgJ/qTVOLELR78NlXehYsEYpWXfIqbBcZpVGXevB Q3sF+WdUdK7/HtgmSiYExxqnWkzjqlwPSHWm5ttEQUGi7XooDqCytsWn2esmRUPHoOK5 TxJT8hgWxHJ1g0fBgkfrlEZaqv1ihm/oIfgCGEgwYHcN725cQUiCAAiPzc3AO9nV4O16 6by5hOR/w9/rMrlkQvfOweIGmdrQFHb3iDqs+hgojf9EBvH5NwcuLKRCpheMFo9b30MG 0g3U4jFOcJ6VRiyE3hbxyGOmjUMScc/sqNN7xWi9HzgLfgynOtagx7zEwlbabxqZMKqs qQCg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T4C8+O7R; 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-38148-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38148-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o6-20020a1709026b0600b001cc23d2bb92si12597081plk.650.2024.01.25.00.20.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:20:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38148-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T4C8+O7R; 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-38148-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38148-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 36E47282CD6 for ; Thu, 25 Jan 2024 08:17:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 647B2199B0; Thu, 25 Jan 2024 08:16:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="T4C8+O7R" Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 06F3F179BE for ; Thu, 25 Jan 2024 08:16:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170568; cv=none; b=tXVH76hVVvlAIWdDyMf6AxZ7hIHwlYG4Y0THwVEFkiwmz00L8PqWAyaTgvB7GgkWsGylIG/H1OPtwBuMNxZ9fQmzmb11bghmpzO7xMRsmOE2ftDxxv3tS32XSOWALgoUZvPUlqmHPBsQiF9ZAnZf2mZOPdxU2iVUEbva8lyHlyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170568; c=relaxed/simple; bh=/wTQRLlgn+pDWkE/ztwTjnWGbogoKDM8d6qhGORGwR0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=qLMTw22mACxQluF8JhshwN4vxOavMnXoAzreo2I/cJEtM9VrqIEKI4HgvWEMPKe/QzYHr6+bNeZGxY/kh8N6CLWis54Tz6v8kksEm3YIMVooudh7SDMAf3YMVNq4h7nVSM+3P35O+SUSd6VFypitoUScdbChAtQf89ErZvYm1L4= 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=T4C8+O7R; arc=none smtp.client-ip=209.85.208.49 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-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-55a684acf92so7288891a12.0 for ; Thu, 25 Jan 2024 00:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706170565; x=1706775365; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VMWJsQKBSlZi8pCKLBY5EvRH/GHYaBZd2IsEfoSOud8=; b=T4C8+O7RIWKOO6839HSz0Emp+Y4W/GQcE68NIAA0z3f2/M2SqFVDjzr6K5G4ffa93m Dg86t1FPu1cKwA373tMEfz8U5Vloi9zZYvqBlHhkcCvfhtwhdWwHWu2I+rM3vNaPhdeh VhOmpFoMTL3goKvM+PlHfj/32x4psOUNzcx3uSaPd22Wgw9o/2OA2YOJIJSQuSyGRDdP +4GJHzZZK/Fcbz8Z0Tabtt416c8EysvQ4h6ifysz25hHk1fqau2UJ/cQ/ItrVFXybOUZ rqHk8r15cbzAOrysBloE/OB+Gp8+PjD9Qtfgy6zdCWEmGS1rBWJiddPR2pqAEFz0Cfqj ZAuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706170565; x=1706775365; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VMWJsQKBSlZi8pCKLBY5EvRH/GHYaBZd2IsEfoSOud8=; b=lkSA/rzVGoMTwkO+51P5Ypfs5PUOH4S/8kRDm+w9gCmeC4+dZLum7ojLq0QKuIQkWW bJTtnCTPDGHQd1y+jePORzVJIcuYRzx7Unqp0GXEkbrlESTvSIdH83EEWtfMk6yE5ZzW WEZ3MzMsqjDZuSpGKoHs//0SY4Gizg4vyvrSiaOFOTVpApgWAsStLYkPIjQIMHXcSjgo 2iOH0pUbHEiLWMEZGay6gTWjoRM9ih8PUa9eB8m5YFhy6NHynzqlIAvSBs161B5INLCm 8MecSKY2cjt2VFtU2olO+aQECQCztMNRXsc2OFrlVwNkrzhkx3lo1hMPS3dx9DB3cmg+ Ci/Q== X-Gm-Message-State: AOJu0Yyhi5rCmCO+TxTu03MH4ysN6xoXt8oZUqBpq0oK8UgkioHytBql GqsPScP12bB4nOPx0th90Hhuu1pKLRN1yrh3lmx6Cx40ORuYoW0laKugsiOdSTdew6xp8yO2q17 L X-Received: by 2002:a05:6402:5169:b0:55c:ff50:e2c6 with SMTP id d9-20020a056402516900b0055cff50e2c6mr154062ede.60.1706170565208; Thu, 25 Jan 2024 00:16:05 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:16:04 -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 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Date: Thu, 25 Jan 2024 09:15:59 +0100 Message-Id: <20240125081601.118051-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 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: 1789049773626777655 X-GMAIL-MSGID: 1789049773626777655 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) { 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) { From patchwork Thu Jan 25 08:16:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 191895 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1491871dyi; Thu, 25 Jan 2024 00:17:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsG6Te1kt+31X2HmnPw2ISgx2yj70q46xpUBVxdX4SpoEAjxxo3PxKz25Ofh7+KoMGOeDb X-Received: by 2002:a05:6214:cca:b0:686:ace9:bd36 with SMTP id 10-20020a0562140cca00b00686ace9bd36mr581420qvx.124.1706170647619; Thu, 25 Jan 2024 00:17:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706170647; cv=pass; d=google.com; s=arc-20160816; b=eUaE/DTNVZBVks5PtZnspPCxwfcgPscpsYnFVsv0X/PsYKHfZlLMKd8niOdXovczeB G2OAjJUGCiZYSVmHb56Q17YVSWQjZ8ua2cBvwR9a2sUIdyuORci4V+hjohiitvxjOIfm FbmLMPShzyPShlKcYeUBR0W7CymhxMejrIMn1Hv3ySmRXXebBajJ11LelxlChNmftn4p Xasemj11RbqrObWERACB/Wiadmbod6qybn1z2cQ3l8VwssiHFsjDkZuAdIBQSiZ+kfIv Lzc7ORt8danC23eaM55vCe6D8e3w/AGyCZC4Te4R1aGbWIDWqWZ0h2+3J3/O506vP/V+ 86fQ== 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=yokV3KsZTLtR361FMJ3GYZw7aKtxmjchO95DV9+f45k=; fh=KLweH7OOQhtFNcDcmFIY0x8ZxnOVpLHm1euCe99lOhk=; b=hRgSvWfWqxfkS0nBms3NAnTdflWt+dJWUG6ofJ/IF8iP5mzMQFA+iG5W9lpGyjTpO5 qfV5jNXwwwtQl3n0yyo1ZYRO/BLyuqMyrVcLlxWqQrzpOt3KeCTJdPanP/8S6Zrvu/rE ylSzRQ4j/lL5W3jkmadrxJBlMQ5TYD9nxvcPQXoh9DSe5uG1aM3S36LKciYKXTFumRsG Mgj60tuh2Pv/FD5xhkNldGBxJbdPL/erXBm3Ix3r8aEUVrhcY946IeHvaKzd80/pAvy+ B0V2hxw/jIpB8aJDyYTu2+qHFlRg5uA5V5Y//8ve7OGo2nJXtvHx+W8DatNExQ9686kj BgRA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFzjg4ew; 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-38151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38151-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w1-20020a0cdf81000000b0067f2a3fa7a2si12188617qvl.559.2024.01.25.00.17.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:17:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFzjg4ew; 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-38151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38151-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 49DEB1C21E1D for ; Thu, 25 Jan 2024 08:17:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 850B11B5B1; Thu, 25 Jan 2024 08:16:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VFzjg4ew" Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 54D5D1759D for ; Thu, 25 Jan 2024 08:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170570; cv=none; b=d5AU7pGqSyK1Cx75wZ0KbBpDGjF6u7OHy7S2h79ZnIpkIrtOE5XnXI93hN37lICFKrYLp7oXrSotF3xRHVjN+7EprdrY1+dhgMF5qBhwUaoq6dQi36fGo3elJvBxaFifxoQl2vzS9mYkd7bosZhtF7+EBSGafm4KwysffkB71z8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170570; c=relaxed/simple; bh=jaCgGOlshk2nOQ0HEUZD7VFYGGtzHGKiLMGwEMepQWk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oPdSlokJ1rkF6zksmm1G5/QtTzRrN0MhCMC8/uDEO32Vm3Ie0T9kINX2tYla3jiAr8xFz/u2DW97PUfHHxSWg3mP6wUvMCzvdVQuidFiQIBJJMQTMPFlHXQGGCFjO4KnGcW4UaOXGh6e7lcFVKE8qCI2mfsx7d/OTl/jMGIWIGE= 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=VFzjg4ew; arc=none smtp.client-ip=209.85.208.49 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-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-55a354a65afso5626817a12.0 for ; Thu, 25 Jan 2024 00:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706170567; x=1706775367; 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=yokV3KsZTLtR361FMJ3GYZw7aKtxmjchO95DV9+f45k=; b=VFzjg4ewYsvCIbtOR68R7mS8Bs5iXNZniys8SPrtfw5rKF9nEZw5bKlWICe1dl+Iww Cbm0mgVudul0cRA8VkNUf1unJj61sXYe4cRmhqfAzpAETPyZcHENWiNE+8hielh576bD 3l4ZRVe511R0hmC/BoiiBI+jVIM+YCirsI9vAz6ccAGbfvprftZY8yJBS2Kgakq7gZH2 80DbrwK8JsYtkm9K3HOIXuNOParrClx/rKuz7gyHoxj8mTuUIoCinsH3bBIwMda9Pix/ /PXdAcusxwlly+rveUr0QjclAFArGb69qJC7kuvUVF59cmX1IkqtOf0VQ/arxFd7ssGm eKzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706170567; x=1706775367; 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=yokV3KsZTLtR361FMJ3GYZw7aKtxmjchO95DV9+f45k=; b=nyzhHpotZDV0msEsyMaU9wBRP35eMtiD77xkqyTThA3xkmwlxNS8HmQ/9WxvFw9iWl NPS5PkOKOh77j3wR42w08hL9BWzjMUQbH8brnU2t+uKqJOELmNJZumAZqvad4TXV/bCV WWvtMtE1yqw9tuEM68rUmALpdEi0LX9VkOkCNd/5fNdfL/IHvo7PrUoq/KZHe1ttIYgt xcC9ytauLBF4tFe+Mi3C/bQEoDaBSOeGXPLN0JqXGlXG1Seg2v62dZjVlYPiuRJsC9Po nbdJaVFmM+a5cY6crspf8f4XCYHnVkzNPeIENHf3zEVVKLh4SrOTWxkLEXZTQYuyVQ2W momg== X-Gm-Message-State: AOJu0YyywyMtRFPuwC0YV3L+xeyX5mSCOHCa5/CvjnVaDVU1ohF+AzMc TfVOoGhU3/wTaphVqdpXiRB6eALjtnLt6dyBrOzaIDnNuqiazvaVLEEESvgnyuk= X-Received: by 2002:a05:6402:1d55:b0:55c:661b:7fd3 with SMTP id dz21-20020a0564021d5500b0055c661b7fd3mr379652edb.70.1706170567639; Thu, 25 Jan 2024 00:16:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:16:07 -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, kernel test robot , Philipp Zabel Subject: [PATCH 3/3] gpiolib: add gpio_device_get_label() stub for !GPIOLIB Date: Thu, 25 Jan 2024 09:16:01 +0100 Message-Id: <20240125081601.118051-3-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: 1789049593058882522 X-GMAIL-MSGID: 1789049593058882522 Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. Cc: Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") Suggested-by: kernel test robot Signed-off-by: Krzysztof Kozlowski --- Cc: Philipp Zabel Reset framework will need it: https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/ --- 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 c1df7698edb0..7f75c9a51874 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -831,6 +831,12 @@ static inline int gpio_device_get_base(struct gpio_device *gdev) return -ENODEV; } +static inline const char *gpio_device_get_label(struct gpio_device *gdev) +{ + WARN_ON(1); + return NULL; +} + static inline int gpiochip_lock_as_irq(struct gpio_chip *gc, unsigned int offset) {