From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org> To: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Cc: "sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org" <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>, "lrg-l0cyMroinI0@public.gmane.org" <lrg-l0cyMroinI0@public.gmane.org>, "jedu-kDsPt+C1G03kYMGBc/C6ZA@public.gmane.org" <jedu-kDsPt+C1G03kYMGBc/C6ZA@public.gmane.org>, "gg-kDsPt+C1G03kYMGBc/C6ZA@public.gmane.org" <gg-kDsPt+C1G03kYMGBc/C6ZA@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 1/2] mfd: tps65910: use regmap for device register access. Date: Thu, 9 Feb 2012 11:55:03 +0000 [thread overview] Message-ID: <20120209115502.GD3058@opensource.wolfsonmicro.com> (raw) In-Reply-To: <4F335385.5040400-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> [-- Attachment #1: Type: text/plain, Size: 1221 bytes --] On Thu, Feb 09, 2012 at 10:33:01AM +0530, Laxman Dewangan wrote: > On Wednesday 08 February 2012 07:28 PM, Mark Brown wrote: > >But that's just raw_write(), there's no benefit to the additional API > >call. > raw_write supported for the volatile register only. That's an implementation detail since there's little if any use case for such use, the main use of raw_write() is dumping blocks of data like firmwares and coefficients which are rarely cached. > I require an api which can work for volatile as well as non-volatile > registers. > Either extend raw_write to support both cases (remove warning and > handle properly) or add bulk_write. > I think as bulk_read is there and so having bulk_write on same line > should be OK. Note that there's a very important difference between the bulk and raw versions of the API which you're not taking into account: the bulk version takes care of endianness differences between the device and the host. This would mean that for send we'd need to rewrite the input array which means we have to take a copy of the data as we probably shouldn't be changing the input data. Indeed, looking at the drivers in mainline I can't actually see any of them which do block writes. [-- 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: "sameo@linux.intel.com" <sameo@linux.intel.com>, "lrg@ti.com" <lrg@ti.com>, "jedu@slimlogic.co.uk" <jedu@slimlogic.co.uk>, "gg@slimlogic.co.uk" <gg@slimlogic.co.uk>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org> Subject: Re: [PATCH V1 1/2] mfd: tps65910: use regmap for device register access. Date: Thu, 9 Feb 2012 11:55:03 +0000 [thread overview] Message-ID: <20120209115502.GD3058@opensource.wolfsonmicro.com> (raw) In-Reply-To: <4F335385.5040400@nvidia.com> [-- Attachment #1: Type: text/plain, Size: 1221 bytes --] On Thu, Feb 09, 2012 at 10:33:01AM +0530, Laxman Dewangan wrote: > On Wednesday 08 February 2012 07:28 PM, Mark Brown wrote: > >But that's just raw_write(), there's no benefit to the additional API > >call. > raw_write supported for the volatile register only. That's an implementation detail since there's little if any use case for such use, the main use of raw_write() is dumping blocks of data like firmwares and coefficients which are rarely cached. > I require an api which can work for volatile as well as non-volatile > registers. > Either extend raw_write to support both cases (remove warning and > handle properly) or add bulk_write. > I think as bulk_read is there and so having bulk_write on same line > should be OK. Note that there's a very important difference between the bulk and raw versions of the API which you're not taking into account: the bulk version takes care of endianness differences between the device and the host. This would mean that for send we'd need to rewrite the input array which means we have to take a copy of the data as we probably shouldn't be changing the input data. Indeed, looking at the drivers in mainline I can't actually see any of them which do block writes. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-02-09 11:55 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-08 10:46 [PATCH V1 1/2] mfd: tps65910: use regmap for device register access Laxman Dewangan 2012-02-08 10:46 ` Laxman Dewangan [not found] ` <1328697985-22504-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2012-02-08 10:46 ` [PATCH V1 2/2] regulator: tps65910: Enable register caching of voltage controls Laxman Dewangan 2012-02-08 10:46 ` Laxman Dewangan 2012-02-08 11:41 ` [PATCH V1 1/2] mfd: tps65910: use regmap for device register access Mark Brown 2012-02-08 11:41 ` Mark Brown [not found] ` <20120208114120.GF3120-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org> 2012-02-08 12:15 ` Laxman Dewangan 2012-02-08 12:15 ` Laxman Dewangan 2012-02-08 13:07 ` Mark Brown [not found] ` <20120208130726.GB5943-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org> 2012-02-08 13:34 ` Laxman Dewangan 2012-02-08 13:34 ` Laxman Dewangan [not found] ` <4F3279D6.4000009-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2012-02-08 13:58 ` Mark Brown 2012-02-08 13:58 ` Mark Brown 2012-02-09 5:03 ` Laxman Dewangan [not found] ` <4F335385.5040400-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2012-02-09 11:55 ` Mark Brown [this message] 2012-02-09 11:55 ` Mark Brown [not found] ` <20120209115502.GD3058-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org> 2012-02-09 11:59 ` Laxman Dewangan 2012-02-09 11:59 ` Laxman Dewangan [not found] ` <4F33B52A.5020900-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2012-02-09 12:03 ` Mark Brown 2012-02-09 12:03 ` Mark Brown [not found] ` <20120209120312.GE3058-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org> 2012-02-09 12:09 ` Laxman Dewangan 2012-02-09 12:09 ` Laxman Dewangan
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=20120209115502.GD3058@opensource.wolfsonmicro.com \ --to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \ --cc=gg-kDsPt+C1G03kYMGBc/C6ZA@public.gmane.org \ --cc=jedu-kDsPt+C1G03kYMGBc/C6ZA@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 \ --cc=lrg-l0cyMroinI0@public.gmane.org \ --cc=sameo-VuQAYsv1563Yd54FQh9/CA@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: linkBe 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.