From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, Joel Stanley <joel@jms.id.au>,
Eddie James <eajames@linux.vnet.ibm.com>
Subject: Re: hwmon driver with misc interface
Date: Mon, 09 Jul 2018 16:45:35 +1000 [thread overview]
Message-ID: <812fa319f619c520dff80e38dec47047a7bf33db.camel@kernel.crashing.org> (raw)
In-Reply-To: <023a4783-4625-e6b4-0baf-70292321a71b@roeck-us.net>
On Sun, 2018-07-08 at 23:37 -0700, Guenter Roeck wrote:
> On 07/08/2018 11:04 PM, Benjamin Herrenschmidt wrote:
>
> > > Another option would be to handle it through regmap; That nowadays
> > > supports custom accesses implemented in the parent driver (see regmap_read
> > > and regmap_write in struct regmap_config). The child driver gets the
> > > regmap pointer and uses the regmap API. I don't see that as messy.
> >
> > That works for purely MMIO based things, this isn't though.
> >
>
> Sorry, I meant reg_read and reg_write callbacks in struct regmap_config.
> I don't think those callbacks are limited to mmio; I find many other
> access types by browsing through code providing those callbacks.
>
> Sure, one could consider regmap to be another bloat, but I find it to
> be a quite convenient abstraction layer.
It has been for some things. We use it in some of our drivers.
In the specific case of OCC, it's a bit more complex, we need to send
potentially fairly large "commands" to the SBE via the sbefifo driver
and receive the corresponding response in a buffer, so we have an API
between the drivers, which works well.
Cheers,
Ben.
next prev parent reply other threads:[~2018-07-09 6:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 23:31 hwmon driver with misc interface Benjamin Herrenschmidt
2018-05-22 1:36 ` Benjamin Herrenschmidt
2018-07-08 23:30 ` Guenter Roeck
2018-07-09 1:05 ` Benjamin Herrenschmidt
2018-07-09 1:26 ` Guenter Roeck
2018-07-09 6:04 ` Benjamin Herrenschmidt
2018-07-09 6:37 ` Guenter Roeck
2018-07-09 6:45 ` Benjamin Herrenschmidt [this message]
2018-07-10 20:04 ` Eddie James
2018-07-10 20:44 ` Guenter Roeck
2018-07-10 23:26 ` Benjamin Herrenschmidt
2018-07-11 2:54 ` Benjamin Herrenschmidt
2018-07-11 4:17 ` Guenter Roeck
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=812fa319f619c520dff80e38dec47047a7bf33db.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=eajames@linux.vnet.ibm.com \
--cc=joel@jms.id.au \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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