From: Mark Brown <broonie@kernel.org>
To: Xu Yilun <yilun.xu@intel.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
trix@redhat.com, hao.wu@intel.com,
matthew.gerlach@linux.intel.com, russell.h.weight@intel.com
Subject: Re: [PATCH 4/6] spi: altera: use regmap instead of direct mmio register access
Date: Fri, 12 Jun 2020 12:52:02 +0100 [thread overview]
Message-ID: <20200612115202.GD5396@sirena.org.uk> (raw)
In-Reply-To: <20200612044346.GC21214@yilunxu-OptiPlex-7050>
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
On Fri, Jun 12, 2020 at 12:43:46PM +0800, Xu Yilun wrote:
> So we think of creating regmap to abstract the actually register accessing
> detail. The parent device driver creates the regmap of indirect access,
> and it creates the spi-altera platform device as child. Spi-altera
> driver could just get the regmap from parent, don't have to care about
> the indirect access detail.
To be clear there's absolutely no problem with the end result, my
concern is the way that we're getting there.
> It seems your concern is how to gracefully let spi-altera driver get the
> regmap. or not using it. Since our platform doesn't enable device tree
> support, seems the only way to talk to platform device is the
> platform_data.
No, the problem is with how that platform data is structured. Based on
what you're saying I'd suggest adding another device ID for this - you
can use the id_table field in struct platform_driver to have more than
one ID like you can have more than one ACPI ID or OF compatible. That
would mirror how this would be handled if things were enumerated through
firmware.
> I think the driver may need to figure out the role of the device in
> system, whether it is a subdev of other device (like MFD? Many mfd subdev
> driver will get parent regmap by default), or it is an independent mmio
> device. But I'm not sure how to do it in right way.
Yes, it sounds like this card is a MFD.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-06-12 11:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 3:25 [PATCH 0/6] Add more configuration and regmap support for spi-altera Xu Yilun
2020-06-11 3:25 ` [PATCH 1/6] spi: altera: add 32bit data width transfer support Xu Yilun
2020-06-11 3:25 ` [PATCH 2/6] spi: altera: add SPI core parameters support via platform data Xu Yilun
2020-06-11 3:25 ` [PATCH 3/6] spi: altera: add platform data for slave information Xu Yilun
2020-06-11 3:25 ` [PATCH 4/6] spi: altera: use regmap instead of direct mmio register access Xu Yilun
2020-06-11 11:02 ` Mark Brown
2020-06-12 4:43 ` Xu Yilun
2020-06-12 11:52 ` Mark Brown [this message]
2020-06-12 12:31 ` Xu Yilun
2020-06-11 3:25 ` [PATCH 5/6] spi: altera: move driver name string to header file Xu Yilun
2020-06-11 14:03 ` Mark Brown
2020-06-12 3:14 ` Xu Yilun
2020-06-11 3:25 ` [PATCH 6/6] spi: altera: fix size mismatch on 64 bit processors Xu Yilun
2020-06-11 11:04 ` Mark Brown
2020-06-12 3:39 ` Xu Yilun
2020-06-11 12:56 ` [PATCH 0/6] Add more configuration and regmap support for spi-altera Tom Rix
2020-06-15 23:41 ` 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=20200612115202.GD5396@sirena.org.uk \
--to=broonie@kernel.org \
--cc=hao.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=matthew.gerlach@linux.intel.com \
--cc=russell.h.weight@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