public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Re: [PATCH] i2c: stm32f7: Add atomic_xfer method to driver
       [not found] <20230509132159.4160984-1-sean@geanix.com>
@ 2023-06-23 10:33 ` Wolfram Sang
  2023-07-03  9:00   ` Sean Nyekjaer
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2023-06-23 10:33 UTC (permalink / raw)
  To: Sean Nyekjaer
  Cc: Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, linux-i2c, linux-stm32, linux-arm-kernel,
	linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 716 bytes --]

On Tue, May 09, 2023 at 03:21:59PM +0200, Sean Nyekjaer wrote:
> Add an atomic_xfer method to the driver so that it behaves correctly
> when controlling a PMIC that is responsible for device shutdown.
> 
> The atomic_xfer method added is similar to the one from the i2c-mv64xxx
> driver. When running an atomic_xfer a bool flag in the driver data is
> set, the interrupt is not unmasked on transfer start, and the IRQ
> handler is manually invoked while waiting for pending transfers to
> complete.
> 
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>

Pierre-Yves, Alain, any further comments to this patch?

> Is it okay to keep the DMA transfer in atomic?

Will DMA actually run in atomic mode?


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: stm32f7: Add atomic_xfer method to driver
  2023-06-23 10:33 ` [PATCH] i2c: stm32f7: Add atomic_xfer method to driver Wolfram Sang
@ 2023-07-03  9:00   ` Sean Nyekjaer
  2023-07-03  9:50     ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Nyekjaer @ 2023-07-03  9:00 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, linux-i2c, linux-stm32, linux-arm-kernel,
	linux-kernel



> On 23 Jun 2023, at 12.33, Wolfram Sang <wsa@kernel.org> wrote:
> 
> On Tue, May 09, 2023 at 03:21:59PM +0200, Sean Nyekjaer wrote:
>> Add an atomic_xfer method to the driver so that it behaves correctly
>> when controlling a PMIC that is responsible for device shutdown.
>> 
>> The atomic_xfer method added is similar to the one from the i2c-mv64xxx
>> driver. When running an atomic_xfer a bool flag in the driver data is
>> set, the interrupt is not unmasked on transfer start, and the IRQ
>> handler is manually invoked while waiting for pending transfers to
>> complete.
>> 
>> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> 
> Pierre-Yves, Alain, any further comments to this patch?
> 
>> Is it okay to keep the DMA transfer in atomic?
> 
> Will DMA actually run in atomic mode?
> 

Hi Wolfram,

Atomic is mainly(only) used for writing a single register in the PMIC for the stpmic. Guess that will not trigger any DMA use.
But let’s wait for other comments…

/Sean
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: stm32f7: Add atomic_xfer method to driver
  2023-07-03  9:00   ` Sean Nyekjaer
@ 2023-07-03  9:50     ` Wolfram Sang
  2023-07-03 10:21       ` Sean Nyekjaer
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2023-07-03  9:50 UTC (permalink / raw)
  To: Sean Nyekjaer
  Cc: Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, linux-i2c, linux-stm32, linux-arm-kernel,
	linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 361 bytes --]


> > Will DMA actually run in atomic mode?

> Atomic is mainly(only) used for writing a single register in the PMIC
> for the stpmic.

And this most probably during shutdown...

> Guess that will not trigger any DMA use.

... so I'd be very surprised if DMA is operational that late. I think we
can rule that out independent of I2C messages to be trasnferred.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: stm32f7: Add atomic_xfer method to driver
  2023-07-03  9:50     ` Wolfram Sang
@ 2023-07-03 10:21       ` Sean Nyekjaer
  0 siblings, 0 replies; 4+ messages in thread
From: Sean Nyekjaer @ 2023-07-03 10:21 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, linux-i2c, linux-stm32, linux-arm-kernel,
	linux-kernel



> On 3 Jul 2023, at 11.50, Wolfram Sang <wsa@kernel.org> wrote:
> 
> 
>>> Will DMA actually run in atomic mode?
> 
>> Atomic is mainly(only) used for writing a single register in the PMIC
>> for the stpmic.
> 
> And this most probably during shutdown...
> 
>> Guess that will not trigger any DMA use.
> 
> ... so I'd be very surprised if DMA is operational that late. I think we
> can rule that out independent of I2C messages to be trasnferred.
> 

Yes, I’ll submit a V2 without the DMA functionality.

/Sean
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-03 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230509132159.4160984-1-sean@geanix.com>
2023-06-23 10:33 ` [PATCH] i2c: stm32f7: Add atomic_xfer method to driver Wolfram Sang
2023-07-03  9:00   ` Sean Nyekjaer
2023-07-03  9:50     ` Wolfram Sang
2023-07-03 10:21       ` Sean Nyekjaer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox