From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: cbou@mail.ru, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add I2C driver for Summit Microelectronics SMB347 Battery Charger.
Date: Mon, 6 Feb 2012 17:21:20 +0000 [thread overview]
Message-ID: <20120206172120.GW3070@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20120206170528.6c74f206@pyramind.ukuu.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]
On Mon, Feb 06, 2012 at 05:05:28PM +0000, Alan Cox wrote:
> Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> > I'm not sure what complexity you mean? If the interface is too
> > difficult to use we should fix that but I didn't notice anything in the
> > driver which should be more than a straight substitution (or deletion of
> > code in the case of the debugfs file).
> The API seems fine to me but you've then got to implement the
> writeable/readable/volatile reg callbacks and figure out what is cachable
> for the chip and specify it.
All those callbacks are optional, you can tell the API what the maximum
register is with max_register and it should just show all registers
(which is pretty much what you have there) - you only need max_register
so that debugfs does something sensible, though thinking about it we can
probably just assume the maximum possible register value for devices
that don't specify it and have something sensible happen (at least for
smaller address sizes, I'm not sure we want 65535 registers shown by
default for 16 bit address devices).
The cache usage is totally optional too, it's available if you want it
but it won't make sense for all devices and is disabled by default.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-02-06 17:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 15:59 [PATCH] Add I2C driver for Summit Microelectronics SMB347 Battery Charger Alan Cox
2012-02-06 16:01 ` Mark Brown
2012-02-06 16:24 ` Alan Cox
2012-02-06 16:35 ` Mark Brown
2012-02-06 17:05 ` Alan Cox
2012-02-06 17:21 ` Mark Brown [this message]
2012-03-13 23:46 ` Anton Vorontsov
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=20120206172120.GW3070@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cbou@mail.ru \
--cc=linux-kernel@vger.kernel.org \
/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