linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregor Herburger <gregor.herburger@ew.tq-group.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Thomas Kopp <thomas.kopp@microchip.com>,
	Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	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: Re: [PATCH 1/4] can: mcp251xfd: stop timestamp before sending chip to sleep
Date: Thu, 25 Apr 2024 11:44:36 +0200	[thread overview]
Message-ID: <ZiomBNoSsXlYfKN2@herburgerg-w2> (raw)
In-Reply-To: <20240425-tall-quiet-wren-f00e44-mkl@pengutronix.de>

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/

  reply	other threads:[~2024-04-25  9:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 13:43 [PATCH 0/4] can: mcp251xfd: add gpio functionality Gregor Herburger
2024-04-17 13:43 ` [PATCH 1/4] can: mcp251xfd: stop timestamp before sending chip to sleep Gregor Herburger
2024-04-24  8:24   ` Marc Kleine-Budde
2024-04-25  5:14     ` Gregor Herburger
2024-04-24 11:54   ` Marc Kleine-Budde
2024-04-25  5:17     ` Gregor Herburger
2024-04-25  6:29       ` Marc Kleine-Budde
2024-04-25  9:44         ` Gregor Herburger [this message]
2024-04-17 13:43 ` [PATCH 2/4] can: mcp251xfd: mcp251xfd_regmap_crc_write(): workaround for errata 5 Gregor Herburger
2024-04-23 16:46   ` Simon Horman
2024-04-24 10:54   ` Vincent MAILHOL
2024-04-24 11:51   ` Marc Kleine-Budde
2024-04-25  5:37     ` Gregor Herburger
2024-04-17 13:43 ` [PATCH 3/4] can: mcp251xfd: add gpio functionality Gregor Herburger
2024-04-24  8:15   ` Marc Kleine-Budde
2024-04-24  9:10   ` Marc Kleine-Budde
2024-04-24  9:15   ` Marc Kleine-Budde
2024-04-24  9:35   ` Marc Kleine-Budde
2024-04-24 13:01     ` Marc Kleine-Budde
2024-04-17 13:43 ` [PATCH 4/4] dt-binding: can: mcp251xfd: add gpio-controller property Gregor Herburger
2024-04-17 14:46   ` Rob Herring
2024-04-19 16:36   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZiomBNoSsXlYfKN2@herburgerg-w2 \
    --to=gregor.herburger@ew.tq-group.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@ew.tq-group.com \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=thomas.kopp@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).