[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAfuv9RQn9eoXKPX@fedora>
Date: Tue, 7 Mar 2023 21:11:11 -0500
From: William Breathitt Gray <william.gray@...aro.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linus.walleij@...aro.org, brgl@...ev.pl,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
broonie@...nel.org, techsupport@...systems.com,
pdemetrotion@...systems.com, quarium@...il.com,
jhentges@...esio.com, jay.dolan@...esio.com
Subject: Re: [PATCH v4 0/3] Migrate the PCIe-IDIO-24 and WS16C48 GPIO drivers
to the regmap API
On Mon, Mar 06, 2023 at 04:25:31PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 06, 2023 at 07:59:50AM -0500, William Breathitt Gray wrote:
> > Changes in v4:
> > - Allocate idio24gpio before using it in idio_24_probe()
> > Changes in v3:
> > - Drop map from set_type_config() parameter list; regmap can be passed
> > by irq_drv_data instead
> > - Adjust idio_24_set_type_config() for parameter list
> > - Add mutex to prevent clobbering the COS_ENABLE register when masking
> > IRQ and setting their type configuration
> > Changes in v2:
> > - Simplify PCIe-IDIO-24 register offset defines to remove superfluous
> > arithmetic
> > - Check for NULL pointer after chip->irq_drv_data allocation
> > - Set gpio_regmap drvdata and use gpio_regmap_get_drvdata() to get the
> > regmap in idio_24_reg_map_xlate()
> >
> > The regmap API supports IO port accessors so we can take advantage of
> > regmap abstractions rather than handling access to the device registers
> > directly in the driver.
> >
> > A patch to pass irq_drv_data as a parameter for struct regmap_irq_chip
> > set_type_config() is included. This is needed by the
> > idio_24_set_type_config() and ws16c48_set_type_config() callbacks in
> > order to update the type configuration on their respective devices.
> >
> > A patch to migrate the WS16C48 GPIO driver to the regmap API is included
> > in this series due to its dependence on the struct regmap_irq_chip
> > set_type_config() change.
>
> I have found nothing WRT lock type changes.
> Can you shed a light on what's going on here?
Previous versions of this patchset had removed the locks entirely.
Later, I realized that some locking would be required to prevent
clobbering registers when updating IRQ masks and type configurations, so
I added in these new locks with types that seemed appropriate for the
way they are being used now in the code. I'll explain further in my
replies to each patch why I chose these particular types.
William Breathitt Gray
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists