Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753146AbbFXNDa (ORCPT ); Wed, 24 Jun 2015 09:03:30 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:36020 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752640AbbFXNDU (ORCPT ); Wed, 24 Jun 2015 09:03:20 -0400 Message-ID: <558AAA8D.8030209@linaro.org> Date: Wed, 24 Jun 2015 14:03:09 +0100 From: Srinivas Kandagatla User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Stefan Wahren , linux-arm-kernel@lists.infradead.org CC: Greg Kroah-Hartman , wxt@rock-chips.com, linux-api@vger.kernel.org, Kumar Gala , Rob Herring , sboyd@codeaurora.org, arnd@arndb.de, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, mporter@konsulko.com, Maxime Ripard , pantelis.antoniou@konsulko.com, devicetree@vger.kernel.org, Mark Brown Subject: Re: [PATCH v6 0/9] Add simple NVMEM Framework via regmap. References: <1435014459-26138-1-git-send-email-srinivas.kandagatla@linaro.org> <235181230.251177.1435088854197.JavaMail.open-xchange@oxbsltgw00.schlund.de> <558A7C92.2040102@linaro.org> <558AA2E2.1010606@i2se.com> In-Reply-To: <558AA2E2.1010606@i2se.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1671 Lines: 50 On 24/06/15 13:30, Stefan Wahren wrote: >> >If the question is just about hexdump, then hexdump itself can read >> >file from given offset and size. > yes, this is my question at first. Let me show the difference between > the current implementation and my expectations as a user. > > $ hexdump /sys/class/nvmem/mxs-ocotp/nvmem > > Current implementation: dump the complete register range defined in DT > Its dumping the range which is specified in the provider regmap. If the requirement is to dump only particular range, this has to be made explicit while creating regmap, which is to specify the base address to start from "First data register" and max_register to be "Last data register "- "First data register" > User expectation: dump only the data from OCOTP block > > Let me explain it for i.MX28 OCOTP > > 0x8002c000 // Start of OCOTP register block (defined in DT) > > 0x8002c020 // First data register > > 0x8002c290 // Last data register > > 0x8002dfff // End of OCOTP register block (defined in DT) > > My knowledge about regmap is limited, but how can i achieve that hexdump > give me only the data registers? From my understanding this should be > handled in regmap and not in the read function. Setup the base and regmap_config correctly in the provider driver before calling regmap_init_mmio(). Let me know if you need more details. --srini > > Are my expectations about the raw access wrong? > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/