[lkml]   [2021]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] pinctrl: Add driver for Awinic AW9523/B I2C GPIO Expander
On Sun, Jan 10, 2021 at 03:32:47PM +0100, AngeloGioacchino Del Regno wrote:

> Then, the set_bit/clear_bit in aw9523_irq_mask(), aw9523_irq_unmask were
> replaced with calls to regmap_update_bits_async, example:

Why are you trying to use the _async() versions here? Don't you need
the I/O to complete synchronously, and what would be the benefit of
dealing with the complexity of making things async? The genirq
framework is definitely going to expect things to be complete before you
return to it...

Note also that this only really does anything for SPI, I2C doesn't offer
an aynchronous API.

> <4>[ 1.064060] regmap_i2c_write+0x1c/0x50

regmap will only use spinlocks if you explictly ask it to do so by
setting fast_io. You can't use spinlock based locking for your register
cache if your device is attached via I2C, I2C is a very slow bus and I2C
controllers will need to sleep. I'd be very surprised if there were any
benefit from using a flat cache with such a device frankly, the I/O is
going to be so slow that any performance gain from using a flat cache is
lost in the noise.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2021-01-11 14:14    [W:0.079 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site