[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52F8BE06.9040103@monstr.eu>
Date: Mon, 10 Feb 2014 12:54:46 +0100
From: Michal Simek <monstr@...str.eu>
To: Mark Brown <broonie@...nel.org>
CC: Lars-Peter Clausen <lars@...afoo.de>,
Michal Simek <michal.simek@...inx.com>,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] regmap: Check readable regs in _regmap_read
Hi Mark,
On 02/10/2014 12:49 PM, Mark Brown wrote:
> On Mon, Feb 10, 2014 at 11:53:38AM +0100, Lars-Peter Clausen wrote:
>> On 02/10/2014 11:46 AM, Michal Simek wrote:
>>> Check if regs are readable.
>
>>> + if (!regmap_readable(map, reg))
>>> + return -EIO;
>
>> This will cause issues with devices where registers are writable,
>> but not readable, but we keep the register value in the cache.
>
> Yes, exactly - this is deliberately not done so we can fake up
> readability using the cache. All the 7x9 devices are like this for
> example, there's just no read support in the hardware (or if there is
> it's not related to the register map). If we were going to check it
> should be at the point where we are about to interact with the hardware.
ok. Then let me send v2 and more this checking below cache
because missing this checking is also wrong.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
Download attachment "signature.asc" of type "application/pgp-signature" (264 bytes)
Powered by blists - more mailing lists