All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Breathitt Gray <william.gray@linaro.org>
To: Mark Brown <broonie@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	techsupport@winsystems.com,
	Paul Demetrotion <pdemetrotion@winsystems.com>,
	Michael Walle <michael@walle.cc>
Subject: Re: [PATCH v5 3/3] gpio: ws16c48: Migrate to the regmap API
Date: Mon, 3 Apr 2023 18:20:56 -0400	[thread overview]
Message-ID: <ZCtRSFLL5lkDimeL@fedora> (raw)
In-Reply-To: <f4377c61-8745-477d-ab8f-f83de203c4b3@sirena.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]

On Mon, Apr 03, 2023 at 10:12:44PM +0100, Mark Brown wrote:
> 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).

You're right, it'll be a spinlock in this case and not mutex.
Unfortunately, we'll still need to change that to avoid deadlocks on -rt
kernels [0].

William Breathitt Gray

[0] https://lore.kernel.org/all/1466065537-82027-1-git-send-email-mika.westerberg@linux.intel.com/

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

  reply	other threads:[~2023-04-03 22:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 16:25 [PATCH v5 0/3] Migrate the PCIe-IDIO-24 and WS16C48 GPIO drivers to the regmap API William Breathitt Gray
2023-03-26 16:25 ` [PATCH v5 1/3] regmap: Pass irq_drv_data as a parameter for set_type_config() William Breathitt Gray
2023-04-03 21:07   ` Mark Brown
2023-03-26 16:25 ` [PATCH v5 2/3] gpio: pcie-idio-24: Migrate to the regmap API William Breathitt Gray
2023-03-27 10:59   ` Andy Shevchenko
2023-03-26 16:25 ` [PATCH v5 3/3] gpio: ws16c48: " William Breathitt Gray
2023-03-27 11:26   ` Andy Shevchenko
2023-04-02 14:39     ` William Breathitt Gray
2023-04-03 21:12       ` Mark Brown
2023-04-03 22:20         ` William Breathitt Gray [this message]
2023-04-03 22:25           ` Mark Brown

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=ZCtRSFLL5lkDimeL@fedora \
    --to=william.gray@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=pdemetrotion@winsystems.com \
    --cc=techsupport@winsystems.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.