From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH V1] regmap: add bulk_write() for non-volatile register set
Date: Fri, 10 Feb 2012 11:06:19 +0000 [thread overview]
Message-ID: <20120210110618.GB3056@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F34DFC7.3020208-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
On Fri, Feb 10, 2012 at 02:43:43PM +0530, Laxman Dewangan wrote:
Please remember to delete unnneded context from your mails, it makes it
much easier to find what you're saying.
> So I am going to allocate buffer for some size, initially
> min(val_bytes * max_register, 128) bytes, and in bulk_write(), if
> require buffer is more than 128 then re-alloc buffer which is now
> (req_size + 128).
> And then copy the data into this buffer, modify it and send to device.
What I'd suggest doing as a first pass is just allocating the buffer
each time, anything else is a performance optimisation we can worry
about incrementally. Remember, this only has to be faster than I2C most
of the time and I2C is really slow. For your case with 8 byte values
there's an even better optimisation which is to notice that we don't
need to swap at all and just use the original buffer directly.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: gregkh@linuxfoundation.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH V1] regmap: add bulk_write() for non-volatile register set
Date: Fri, 10 Feb 2012 11:06:19 +0000 [thread overview]
Message-ID: <20120210110618.GB3056@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F34DFC7.3020208@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
On Fri, Feb 10, 2012 at 02:43:43PM +0530, Laxman Dewangan wrote:
Please remember to delete unnneded context from your mails, it makes it
much easier to find what you're saying.
> So I am going to allocate buffer for some size, initially
> min(val_bytes * max_register, 128) bytes, and in bulk_write(), if
> require buffer is more than 128 then re-alloc buffer which is now
> (req_size + 128).
> And then copy the data into this buffer, modify it and send to device.
What I'd suggest doing as a first pass is just allocating the buffer
each time, anything else is a performance optimisation we can worry
about incrementally. Remember, this only has to be faster than I2C most
of the time and I2C is really slow. For your case with 8 byte values
there's an even better optimisation which is to notice that we don't
need to swap at all and just use the original buffer directly.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-02-10 11:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 12:12 [PATCH V1] regmap: add bulk_write() for non-volatile register set Laxman Dewangan
2012-02-09 12:12 ` Laxman Dewangan
[not found] ` <1328789531-10067-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-09 12:17 ` Mark Brown
2012-02-09 12:17 ` Mark Brown
[not found] ` <20120209121704.GF3058-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-02-09 12:45 ` Laxman Dewangan
2012-02-09 12:45 ` Laxman Dewangan
[not found] ` <4F33BFDE.7020006-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-09 12:55 ` Mark Brown
2012-02-09 12:55 ` Mark Brown
[not found] ` <20120209125505.GI3058-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-02-09 17:14 ` Laxman Dewangan
2012-02-09 17:14 ` Laxman Dewangan
[not found] ` <4F33FEE7.9080608-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-09 18:12 ` Mark Brown
2012-02-09 18:12 ` Mark Brown
[not found] ` <20120209181224.GK3058-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-02-10 9:13 ` Laxman Dewangan
2012-02-10 9:13 ` Laxman Dewangan
[not found] ` <4F34DFC7.3020208-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-10 11:06 ` Mark Brown [this message]
2012-02-10 11:06 ` 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=20120210110618.GB3056@opensource.wolfsonmicro.com \
--to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.