Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp397373lqd; Wed, 24 Apr 2024 06:02:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXETL2nlIVGDIAcmt6G3YGKh9F6e5NEEclSwVsRpyX/8s10bv/kfEh1oME8lwokUMwyvQFnPcG0ZMryb5ZgqoYSHeqDGYQXnz1201EzAw== X-Google-Smtp-Source: AGHT+IH6vwZVoFiWg/WvMbFeuJd0E7GrhgKxJ2cz+PYnizWN+JWDmhkBLsWlNOL6LdNtAXXVJPGU X-Received: by 2002:a2e:800c:0:b0:2d4:6f33:2e59 with SMTP id j12-20020a2e800c000000b002d46f332e59mr1380210ljg.30.1713963769696; Wed, 24 Apr 2024 06:02:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713963769; cv=pass; d=google.com; s=arc-20160816; b=dRNoeZd6wDHj4CHHmPvKgSZcr51Q/I6DjJFLbK43SyzUVbwLH0RlMCJa4NrDmVzeH7 CFKDwk8YTsW++CGA8/ifaM/k8C7ryQVk2Obi9KWPsfAGLA2HbiY2EVc4FeW0n4rkazNh mH7RNYH71dRj7/iPVMPo0oSTBXnpGnukWCSjXx4Q0ty1isxEE+GLZxYB1UfjSD87gfj9 XZ5mQ+25SRRNCgad5bm5rgCYCg6KINDv0J3put92OecP102YGch8S0CvS+hI1j+9/qsM drIJvnSGLcJSpkhYaW5lBUChwftlkJKb6CrD01I9ux3/+C7Kn8t5HVZ/Sn5BG7ZRdHrv qMLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=qN7On7OBhb0FLHWgZdloj0tBpO/ObCUP9y/cWmTS58g=; fh=t/Rlprtb5kVZgOj4jZz3MBiSXVd5jcjJfSKVyh9eDy8=; b=aoa3MZmZLfvhbObnQTLFRsKb2XwdWv122hQXFKrGdt8qQIOuOqKfPjsI/oj7wBBje3 aU9+VDZ5IPTY5hSmGtujiaInZpPYKn1S2mw/yitI9OSGBidx+/jp7EGEoFpYKYieuEc6 mQxefFDn/8sSH5WGn2uDjU6lO2U+MlXaKGDEpTQEJESMTE3rxRRTWU1Vn2zNg9rIp0Hu Qmul8MwST3HjTF/rdByYEIGpJlqrOvyGRpBcWvOm+6Pv8glxmxzEGysvKbxmHj5zhzPs gtExctE+k7LiJaS49wSFILBys0Y8LfQaTpxrfk3I3LbGIWiFCNjdhDCT+iP5SEKRrFH0 y6SQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-156917-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156917-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bq5-20020a056402214500b00570234db3c2si8203526edb.688.2024.04.24.06.02.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 06:02:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156917-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-156917-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156917-linux.lists.archive=gmail.com@vger.kernel.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 9A91F1F259BF for ; Wed, 24 Apr 2024 13:02:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B70015B151; Wed, 24 Apr 2024 13:02:27 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 055BA15A4B0 for ; Wed, 24 Apr 2024 13:02:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713963746; cv=none; b=LJhDbQ6yokcn5iESblHBfM7lsBCuyGHSjI0/10pChRYSNR8NvT92R4WUDh/OcW8buHHseaXgblgnuQeJN4mYZasOBopDkF3WDe+bkeW4KJeyPzSSXbKgj7gSQI2ChTLutGbSfk0CFC7usfYGahSRTTlxoUbLYGhm614hyvXky/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713963746; c=relaxed/simple; bh=uqBPJXZAh04rqGXD0PZU8isT/gSoQ/wt3FrRsND6xQE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Yesz9dJRl17ICT/2FSMh/OSp0DWmsiRJaxzVeYCt4p28LHiCJDl0MRYJguXpKbT0XYIqhu+SUbXMcmSQk743I6Qj1GWQ+wFf4CTx+5xI2abvmabHOIXf1fB9W20MyI+vKX1D+lyxBNDp09sCBNT8eOMVv63NKua6DLw66BPxkws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rzcFy-0001oF-R5; Wed, 24 Apr 2024 15:01:50 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzcFx-00E5DW-7Q; Wed, 24 Apr 2024 15:01:49 +0200 Received: from pengutronix.de (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id C21922BEECB; Wed, 24 Apr 2024 13:01:48 +0000 (UTC) Date: Wed, 24 Apr 2024 15:01:48 +0200 From: Marc Kleine-Budde To: Gregor Herburger Cc: Manivannan Sadhasivam , Thomas Kopp , Vincent Mailhol , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux@ew.tq-group.com, alexander.stein@ew.tq-group.com Subject: Re: [PATCH 3/4] can: mcp251xfd: add gpio functionality Message-ID: <20240424-furry-thankful-spoonbill-f81aef-mkl@pengutronix.de> References: <20240417-mcp251xfd-gpio-feature-v1-0-bc0c61fd0c80@ew.tq-group.com> <20240417-mcp251xfd-gpio-feature-v1-3-bc0c61fd0c80@ew.tq-group.com> <20240424-notorious-roadrunner-of-will-0c55ce-mkl@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hkahiuhwj5ncu3b7" Content-Disposition: inline In-Reply-To: <20240424-notorious-roadrunner-of-will-0c55ce-mkl@pengutronix.de> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org --hkahiuhwj5ncu3b7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 24.04.2024 11:35:59, Marc Kleine-Budde wrote: > On 17.04.2024 15:43:56, Gregor Herburger wrote: > > The mcp251xfd devices allow two pins to be configured as gpio. Add this > > functionality to driver. > >=20 > > Signed-off-by: Gregor Herburger > > --- > > drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 138 +++++++++++++++= +++++++- > > drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 21 +++- > > drivers/net/can/spi/mcp251xfd/mcp251xfd.h | 4 + > > 3 files changed, 159 insertions(+), 4 deletions(-) > >=20 > > diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/n= et/can/spi/mcp251xfd/mcp251xfd-core.c > > index eb699288c076..5ba9fd0af4b6 100644 > > --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c > > +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c >=20 > [...] >=20 > > +static int mcp251fdx_gpio_setup(struct mcp251xfd_priv *priv) > > +{ > > + struct gpio_chip *gc =3D &priv->gc; > > + > > + if (!device_property_present(&priv->spi->dev, "gpio-controller")) > > + return 0; > > + > > + if (priv->rx_int) > > + return dev_err_probe(&priv->spi->dev, -EINVAL, > > + "Can't configure gpio-controller with RX-INT!\n"); >=20 > Can you enhance the DT binding to reflect this? Another option would be to check if RX-INT is configured in the mcp251xfd_gpio_request() callback and refuse to request GPIO1. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | --hkahiuhwj5ncu3b7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEUEC6huC2BN0pvD5fKDiiPnotvG8FAmYpArgACgkQKDiiPnot vG9Qrwf+MC3fxTpuFuYhxdeMKnLBe4GeqI7Ukdw7V+9BbV5GfiEdmvnxAE9QcGw7 LawE07SY/9NKHUDacc+ymOIQUorFQglXuCFfw5lo4wGBPyamQRpypmSEnXguPuZ2 dODWx90yCpwB2ZWi0yfMl3FhvxGXi7ZReTx453irHPXzEhxbL1aDEctXdc6o675G g7hQtz+r+bNeEXNazqpTPePMeRBF7eNyFT8NyLRLw1Zm7qeOCB72+VrhM8/sKUXM doOtEa2iQgX0pGFYMkW0LphSKJEvGDmUNGcsWAWQdhWgek21oZhTqmK8mbNj/cB8 GmkrWvV4wDvFCveyv1S/+aORzjAuww== =nnGt -----END PGP SIGNATURE----- --hkahiuhwj5ncu3b7--