lkml.org 
[lkml]   [2023]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/3] gpio: ws16c48: Migrate to the regmap API
On Sun, Apr 02, 2023 at 10:39:02AM -0400, William Breathitt Gray wrote:
> On Mon, Mar 27, 2023 at 02:26:37PM +0300, Andy Shevchenko wrote:
> > On Sun, Mar 26, 2023 at 12:25:59PM -0400, William Breathitt Gray wrote:

> > > +static const struct regmap_config ws16c48_regmap_config = {
> > > + .reg_bits = 8,
> > > + .reg_stride = 1,
> > > + .val_bits = 8,
> > > + .io_port = true,
> > > + .max_register = 0xA,
> > > + .wr_table = &ws16c48_wr_table,
> > > + .rd_table = &ws16c48_rd_table,
> > > + .volatile_table = &ws16c48_volatile_table,
> > > + .cache_type = REGCACHE_FLAT,
> > > +};

> > Do we need regmap lock?

> We make regmap calls within an interrupt context in this driver so I
> think we need to disable the default regmap mutex locking behavior; I
> believe the current raw_spin_lock locking in this driver is enough to
> protect access.

The above doesn't configure the regmap locking so you'll have a spinlock
by default (MMIO being a fast bus).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-04-03 23:13    [W:0.610 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site