From: Stephen Boyd <sboyd@kernel.org>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Nikita Shubin" <nikita.shubin@maquefel.me>,
"Nikita Shubin via B4 Relay"
<devnull+nikita.shubin.maquefel.me@kernel.org>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12 02/38] ARM: ep93xx: add regmap aux_dev
Date: Wed, 11 Sep 2024 15:46:09 -0700 [thread overview]
Message-ID: <080600661d43e4c39ea4b20b05e3e141.sboyd@kernel.org> (raw)
In-Reply-To: <20240909-ep93xx-v12-2-e86ab2423d4b@maquefel.me>
Quoting Nikita Shubin via B4 Relay (2024-09-09 01:10:27)
> diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h
> index 56fbe2dc59b1..a27447971302 100644
> --- a/include/linux/soc/cirrus/ep93xx.h
> +++ b/include/linux/soc/cirrus/ep93xx.h
> @@ -3,6 +3,18 @@
> #define _SOC_EP93XX_H
>
> struct platform_device;
> +struct regmap;
> +struct spinlock_t;
> +
> +enum ep93xx_soc_model {
> + EP93XX_9301_SOC,
> + EP93XX_9307_SOC,
> + EP93XX_9312_SOC,
> +};
> +
> +#include <linux/auxiliary_bus.h>
> +#include <linux/compiler_types.h>
> +#include <linux/container_of.h>
>
> #define EP93XX_CHIP_REV_D0 3
> #define EP93XX_CHIP_REV_D1 4
> @@ -10,6 +22,20 @@ struct platform_device;
> #define EP93XX_CHIP_REV_E1 6
> #define EP93XX_CHIP_REV_E2 7
>
> +struct ep93xx_regmap_adev {
> + struct auxiliary_device adev;
> + struct regmap *map;
> + void __iomem *base;
> + spinlock_t *lock;
> + void (*write)(struct regmap *map, spinlock_t *lock, unsigned int reg,
> + unsigned int val);
> + void (*update_bits)(struct regmap *map, spinlock_t *lock,
> + unsigned int reg, unsigned int mask, unsigned int val);
> +};
Why can't the single 'struct regmap' be passed as the auxiliary device's
platform_data? The lock could be put into the regmap locking routines
and the write/update_bits would be standard regmap API calls. Doing that
would make the auxiliary device driver simpler because it wouldn't
depend on this struct.
The device name could encode the SoC number as well so the auxiliary
device driver could match different names and do different things.
next prev parent reply other threads:[~2024-09-11 22:46 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 8:10 [PATCH v12 00/38] ep93xx device tree conversion Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 01/38] gpio: ep93xx: split device in multiple Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 02/38] ARM: ep93xx: add regmap aux_dev Nikita Shubin via B4 Relay
2024-09-11 22:46 ` Stephen Boyd [this message]
2024-09-12 7:47 ` Nikita Shubin
2024-09-09 8:10 ` [PATCH v12 03/38] clk: ep93xx: add DT support for Cirrus EP93xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 04/38] pinctrl: add a Cirrus ep93xx SoC pin controller Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 05/38] power: reset: Add a driver for the ep93xx reset Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 06/38] dt-bindings: soc: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 07/38] soc: Add SoC driver for Cirrus ep93xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 08/38] dt-bindings: dma: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 09/38] dmaengine: cirrus: Convert to DT for " Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 10/38] dt-bindings: watchdog: Add Cirrus EP93x Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 11/38] watchdog: ep93xx: add DT support for Cirrus EP93xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 12/38] dt-bindings: pwm: Add " Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 11:40 ` Uwe Kleine-König
2024-09-09 8:10 ` [PATCH v12 13/38] pwm: ep93xx: add DT support for " Nikita Shubin via B4 Relay
2024-09-09 10:28 ` Andy Shevchenko
2024-09-09 10:41 ` Nikita Shubin
2024-09-09 8:10 ` [PATCH v12 14/38] dt-bindings: spi: Add " Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 8:10 ` [PATCH v12 15/38] spi: ep93xx: add DT support for " Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 16/38] dt-bindings: net: Add " Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 8:10 ` [PATCH v12 17/38] net: cirrus: add DT support for " Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 18/38] dt-bindings: mtd: Add ts7200 nand-controller Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 8:10 ` [PATCH v12 19/38] mtd: rawnand: add support for ts72xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 20/38] dt-bindings: ata: Add Cirrus EP93xx Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 9:47 ` Niklas Cassel
2024-09-09 9:52 ` Krzysztof Kozlowski
2024-09-09 8:10 ` [PATCH v12 21/38] ata: pata_ep93xx: add device tree support Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 22/38] dt-bindings: input: Add Cirrus EP93xx keypad Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 8:10 ` [PATCH v12 23/38] input: keypad: ep93xx: add DT support for Cirrus EP93xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 24/38] wdt: ts72xx: add DT support for ts72xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 25/38] gpio: ep93xx: add DT support for gpio-ep93xx Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 26/38] ASoC: dt-bindings: ep93xx: Document DMA support Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 8:10 ` [PATCH v12 27/38] ASoC: dt-bindings: ep93xx: Document Audio Port support Nikita Shubin via B4 Relay
2024-09-09 9:45 ` Rob Herring (Arm)
2024-09-09 8:10 ` [PATCH v12 28/38] ASoC: ep93xx: Drop legacy DMA support Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 29/38] ARM: dts: add Cirrus EP93XX SoC .dtsi Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 30/38] ARM: dts: ep93xx: add ts7250 board Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 31/38] ARM: dts: ep93xx: Add EDB9302 DT Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 32/38] ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 33/38] pwm: ep93xx: drop legacy pinctrl Nikita Shubin via B4 Relay
2024-09-09 8:10 ` [PATCH v12 34/38] ata: pata_ep93xx: remove legacy pinctrl use Nikita Shubin via B4 Relay
2024-09-09 8:11 ` [PATCH v12 35/38] ARM: ep93xx: delete all boardfiles Nikita Shubin via B4 Relay
2024-09-09 8:11 ` [PATCH v12 36/38] ARM: ep93xx: soc: drop defines Nikita Shubin via B4 Relay
2024-09-09 8:11 ` [PATCH v12 37/38] ASoC: cirrus: edb93xx: Delete driver Nikita Shubin via B4 Relay
2024-09-09 8:11 ` [PATCH v12 38/38] dmaengine: cirrus: remove platform code Nikita Shubin via B4 Relay
2024-09-09 8:49 ` [PATCH v12 00/38] ep93xx device tree conversion Andy Shevchenko
2024-09-09 9:02 ` Nikita Shubin
2024-09-11 15:12 ` Arnd Bergmann
2024-09-11 16:18 ` Andy Shevchenko
2024-09-23 9:27 ` Linus Walleij
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=080600661d43e4c39ea4b20b05e3e141.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devnull+nikita.shubin.maquefel.me@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita.shubin@maquefel.me \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox