public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Xu Yilun <yilun.xu@intel.com>,
	linux-fpga@vger.kernel.org, Wu Hao <hao.wu@intel.com>,
	Tom Rix <trix@redhat.com>, Moritz Fischer <mdf@kernel.org>,
	Lee Jones <lee@kernel.org>,
	Matthew Gerlach <matthew.gerlach@linux.intel.com>,
	Russ Weight <russell.h.weight@intel.com>,
	Tianfei zhang <tianfei.zhang@intel.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Marco Pagani <marpagan@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 7/9] mfd: intel-m10-bmc: Add PMCI driver
Date: Mon, 5 Dec 2022 12:05:14 +0000	[thread overview]
Message-ID: <Y43eejWSYIBIlUKB@sirena.org.uk> (raw)
In-Reply-To: <855d463e-fb84-1910-f53-58e6b0a633a4@linux.intel.com>

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

On Mon, Dec 05, 2022 at 11:51:15AM +0200, Ilpo Järvinen wrote:
> On Sat, 3 Dec 2022, Xu Yilun wrote:
> > On 2022-12-02 at 12:08:39 +0200, Ilpo Järvinen wrote:

> > > +struct regmap *__devm_m10_regmap_indirect(struct device *dev,

> > We name the file intel-m10-bmc-pmci-xxx.c, and this function
> > xx_m10_regmap_xx(). But I can see the implementation is just about the indirect
> > bus which from your commit message could be used by various DFL features
> > like HSSI or PMCI. So is it better we put the implementation in
> > drivers/fpga and name the file dfl-indirect-regmap.c and the
> > initialization function dfl_indirect_regmap_init()?

> I guess that would be doable unless Mark objects. My understanding was 
> that he preferred to have in the driver that is currently using it.

> Mark, any opinion on this?

The above does not look good.  As I have said several times now drivers
implementing their own regmap operations should use the reg_read() and
reg_write() operations in regmap_config when allocating their regmap
unless they're doing something unusual.  There are a few cases where it
makes sense but nothing I've seen here makes it look like this is one of
them.  Most of the current users don't fit.

Please, just implement a normal driver using a normal regmap_config as
I've repeatedly said you should if you don't want to provide something
generic.

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

  reply	other threads:[~2022-12-05 12:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 10:08 [PATCH v3 0/9] intel-m10-bmc: Split BMC to core and SPI parts & add PMCI+N6000 support Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 1/9] mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 2/9] mfd: intel-m10-bmc: Rename the local variables Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 3/9] mfd: intel-m10-bmc: Split into core and spi specific parts Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 4/9] mfd: intel-m10-bmc: Support multiple CSR register layouts Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 5/9] fpga: intel-m10-bmc: Rework flash read/write Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 6/9] mfd: intel-m10-bmc: Downscope SPI defines & prefix with M10BMC_SPI Ilpo Järvinen
2022-12-02 16:28   ` Xu Yilun
2022-12-02 17:29     ` Russ Weight
2022-12-05  9:31       ` Ilpo Järvinen
2022-12-05 15:41         ` Xu Yilun
2022-12-08 11:57           ` Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 7/9] mfd: intel-m10-bmc: Add PMCI driver Ilpo Järvinen
2022-12-02 17:12   ` Xu Yilun
2022-12-05  9:51     ` Ilpo Järvinen
2022-12-05 12:05       ` Mark Brown [this message]
2022-12-05 15:08         ` Xu Yilun
2022-12-05 18:22           ` Mark Brown
2022-12-06  2:37             ` Xu Yilun
2022-12-05 16:28       ` Xu Yilun
2022-12-02 10:08 ` [PATCH v3 8/9] fpga: m10bmc-sec: Add support for N6000 Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 9/9] mfd: intel-m10-bmc: Change MODULE_LICENSE() to GPL Ilpo Järvinen
2022-12-04  9:44   ` Greg KH
2022-12-05  9:05     ` Ilpo Järvinen

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=Y43eejWSYIBIlUKB@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hao.wu@intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=lee@kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marpagan@redhat.com \
    --cc=matthew.gerlach@linux.intel.com \
    --cc=mdf@kernel.org \
    --cc=russell.h.weight@intel.com \
    --cc=tianfei.zhang@intel.com \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox