Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp988429lqd; Thu, 25 Apr 2024 02:45:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXK0Pb2Xbg5ggwiHihpswIPz6dHNRmOniFgHzM3OnjRbvL6ZMhr4IOu8+6HcpGt6o27KOJ0xcF4Nzu9NH5qXL4Lalr0A82utCI6do69WQ== X-Google-Smtp-Source: AGHT+IHDtRkF9PjuL3fUpM7HNU4xmZ3IJZvaOel0uTR+ynUVNEzjLndnGkGyOIo+6yH4Bf11Xedt X-Received: by 2002:a05:6a20:d49a:b0:1a7:a72c:6f4 with SMTP id im26-20020a056a20d49a00b001a7a72c06f4mr6973907pzb.41.1714038309853; Thu, 25 Apr 2024 02:45:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714038309; cv=pass; d=google.com; s=arc-20160816; b=BfE9N0j3oZKB22OGlvlDhhgmQPB/A5ZqnMovVtRyckX01wgUkXCcV1JlkLe/+T493x UcxpWt2/xFa63V+QS8i73aOD1dKZwVT6lJ8xm1u9s+30+zmuIOnvJ2LhMIRpl0ueiZjo 1NaV1CeVGhRCuTKB9d4zKxLtVBcSEmqnoeBg/F9PuKl4Bfkjdyem24nBjUTSGYrWXa45 hl0yW6P/tLcLPwlEst2VmA4to7eKf5MpKVDkfcJShqBXtmAN0gqS26+vkHCPevQEiKPS 9JF0mbxykWEZNc+LaR+aXskA/0kNOR6EepoNVTaM9LWxDpYnf8OUCIy4qRqwS6Fw/XPk kTcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:cc:to:from:date:dkim-signature:subject :dkim-signature; bh=HLlh2QL5TbXjyNAR69Yvmpo/xTGS9Lo12NgQNCZ06YQ=; fh=wDRQOH5oTle5I7CydnHz/zJHunFYfmAMb7VTbfZ+FQg=; b=PVve5LI2s69wDsIyadfqLmZywBNlpfbJZAxfDZS/0dsbGtbGukKMJEVoTOSSHgrZ0w Pk8HypIGv+Hyxa/CEcuPHA9GXLEmTgFKyQSPPq9vfhUt8lQpMAlni4yKzmFSQozseb/S yiPM5gppmJv8W0wR2ysBhYnLyEsDKdcSQlA65/aqjtXBGjJpMAp4X0807qVtZnJ8T/Ge FJ1Lq3ac2Ea7InKGj7r/icW7miON10Qw8KcagPjC33tKv/yJNd8wzyZHRKypy0E+FUX9 hYISKcqCxQHC+xenLd9NV7M65DjAuxfRvPW7qf7kH/by9QC943x9d+tSZlrPSsAs7DkW GEBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=d0krcBJi; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=Nq8CLYD8; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-158321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bj11-20020a170902850b00b001e6764cd77bsi12945596plb.350.2024.04.25.02.45.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 02:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158321-linux.lists.archive=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=@tq-group.com header.s=key1 header.b=d0krcBJi; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=Nq8CLYD8; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-158321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com 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 7C83D2820F7 for ; Thu, 25 Apr 2024 09:45:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74B6484FD8; Thu, 25 Apr 2024 09:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="d0krcBJi"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="Nq8CLYD8" Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (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 C68D484DFB; Thu, 25 Apr 2024 09:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714038296; cv=none; b=NR+xtk2td+kreOpJziw0yV9jEiTlb9LmxspcALPX8yduU2wZ6SOJaPmZniuCWRZ3Sa92BVrys64BaQ2BnNXhlEKZm/rktmb6X3Q8NcWMLt7DjG/2cpjnr8Q2OmOp2uDHjb/rYkcwX5MTTn8074Zhl7YzhMsbY3ZWE8yG6dWkrUw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714038296; c=relaxed/simple; bh=3DB11IKP/T9/3xhOrWwdKlbwGKlVUxdv7gsOBmdeDHI=; h=Subject:Date:From:To:Cc:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JzVAEJY6opSqDj/GkcrW11mPFJ7IhK0cy5fiVWxRz1n/XeJL1jYPkPzr18AgBJ7OQ91pqJUywNf8akwaO+v7Sz3Zh9KXydX9RQpt3Nxw04TLwfvlzaCTFgTSeOC77q8oM++XN0iUtLcjOTfK4LnB/j6x+2qjYh8gJdKGLmUjMP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=d0krcBJi; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=Nq8CLYD8 reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1714038292; x=1745574292; h=date:from:to:cc:message-id:references:mime-version: content-transfer-encoding:in-reply-to:subject; bh=HLlh2QL5TbXjyNAR69Yvmpo/xTGS9Lo12NgQNCZ06YQ=; b=d0krcBJiCro8dwV/UsQ41hTNK00RhxCS9pxR/t7ur4wyBZ+SNfGTqVzW 77IMTjoM2UunbSDklUQeCOESuBSnZjdWRFFhz+d9nAZ2acsexxsdaz2Q8 qYBXxTFMTQDqS5eZ5JeccM0O5Kw/YHhoPnXFd4cLTJ9KUV7tC4n1NL8rI wImJT8RfCrJmHE+cVywmIEmGzJncWd9dVEa9pwW/DRk98NUOQsM+UTD5y ZsxY0vlxepmzu7vwsJ8L33B87fmKxyDJaLisBleyGsjLnkxyXcf+MZAOZ GaAjsBkjmASW5boKxt74t7kgKT/0J0Nx+a8QWc93pG1VJuhhtSKx+ac7E g==; X-IronPort-AV: E=Sophos;i="6.07,228,1708383600"; d="scan'208";a="36610690" Subject: Re: Re: [PATCH 1/4] can: mcp251xfd: stop timestamp before sending chip to sleep Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 25 Apr 2024 11:44:48 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BCAC516E686; Thu, 25 Apr 2024 11:44:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1714038284; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=HLlh2QL5TbXjyNAR69Yvmpo/xTGS9Lo12NgQNCZ06YQ=; b=Nq8CLYD8RZR4BApO/dYg4PxApypWD1JWXYNDBi/QoJZKiDwzuBjz23RL6l+nX4XByGNPHU JTMkKfte6NNmdQYX8pu5+xfAhavNby5URmwXf5jTSeDp+nLjuJ7kK1X65VVJfvXSXVKPep NyOPhpcMVH3GSF6xsvBdqxYhekw4348A+7ngA3vEUDkZ9xOe7/qQf1G3vTIlU9Lp+Qo9IQ /9qHR5VCjjDvZPrM8bYobzMlAT1v1gMaJObL/fKP6O0wdFrlhe8MTlQ9XcoAKE2PGJjPEG 0IdG3KOk9DEhyoEOeN5yuaNa1rC46QDyoO6syTp1xZHQbBCm7s+GQWGnXBv5KQ== Date: Thu, 25 Apr 2024 11:44:36 +0200 From: Gregor Herburger To: Marc Kleine-Budde 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 Message-ID: References: <20240417-mcp251xfd-gpio-feature-v1-0-bc0c61fd0c80@ew.tq-group.com> <20240417-mcp251xfd-gpio-feature-v1-1-bc0c61fd0c80@ew.tq-group.com> <20240424-adaptable-zircon-badger-1fefd9-mkl@pengutronix.de> <20240425-tall-quiet-wren-f00e44-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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240425-tall-quiet-wren-f00e44-mkl@pengutronix.de> X-Last-TLS-Session-Version: TLSv1.3 On Thu, Apr 25, 2024 at 08:29:13AM +0200, Marc Kleine-Budde wrote: > On 25.04.2024 07:17:11, Gregor Herburger wrote: > > On Wed, Apr 24, 2024 at 01:54:54PM +0200, Marc Kleine-Budde wrote: > > > On 17.04.2024 15:43:54, Gregor Herburger wrote: > > > > MCP2518FD exits Low-Power Mode (LPM) when CS is asserted. When chip > > > > is send to sleep and the timestamp workqueue is not stopped chip is > > > > waked by SPI transfer of mcp251xfd_timestamp_read. > > > > > > How does the Low-Power Mode affect the GPIO lines? Is there a difference > > > if the device is only in sleep mode? > > > > The MCP251XFD_REG_IOCON is cleared when leaving Low-Power Mode. This is > > why I implemented regcache. > > But that means you have to power the chip if a GPIO is requested. You > have to power up the chip in the request() callback and power it down in > the free() callback. Ah I see. Currently the GPIO rigister is cached and only written to the chip if the netdevice is set up. I think to have a more generic gpio controller the chip should wake up when the GPIO is requested. Also the chip should not go to sleep while GPIO is requested and netdevice is set down. > I've 2 patches laying around, one that moves the timestamp > init/start/stop into the chip_start/stop. And another one that moves the > soft reset and basic configuration of the chip into the runtime pm > functions. I have to make both patches compatible and send them to the > list. Feel free to pick them up and integrate them into your series. I will have a look at them. > > regards, > Marc > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Embedded Linux | https://www.pengutronix.de | > Vertretung Nürnberg | Phone: +49-5121-206917-129 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | Best regards Gregor -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/