linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Han Nandor <nandor.han@vaisala.com>
Cc: "a.zummo@towertech.it" <a.zummo@towertech.it>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] rtc: ds3232: get SRAM access using NVMEM Framework
Date: Fri, 19 Apr 2019 22:39:39 +0200	[thread overview]
Message-ID: <20190419203939.GG12992@piout.net> (raw)
In-Reply-To: <20190416105741.11895-1-nandor.han@vaisala.com>

On 16/04/2019 10:57:54+0000, Han Nandor wrote:
> DS3232 RTC has 236 bytes of persistent memory.
> 
> Add RTC SRAM read and write access using
> the NVMEM Framework.
> 
> Signed-off-by: Nandor Han <nandor.han@vaisala.com>
> ---
> 
> Description
> -----------
> Provides DS3232 RTC SRAM access using NVMEM framework.
> 
> Testing
> -------
> The test was done on a custom board which contains a
> DS3232 RTC device.
> Kernel Version: 4.14.60 (Just for clarity, the patch is against master)
> 
> 1. Verify that SRAM is accessible using NVMEM interface: PASS
> `
> # hexdump /sys/bus/nvmem/devices/ds3232_sram0/nvmem
> 0000000 0000 0000 0000 0000 0000 0000 0000 0000
> *
> 00000e0
> `
> 2. Modify the content.
> `
> # echo testing > /sys/bus/nvmem/devices/ds3232_sram0/nvmem
> #
> `
> 3. Power cycle the board and verify that contents are preserved: PASS
> `
> # hexdump -n 10 -C /sys/bus/nvmem/devices/ds3232_sram0/nvmem
> 00000000  74 65 73 74 69 6e 67 0a  00 00                    |testing...|
> 0000000a
> `
> 
> Testing on Kernel v5.1.0-rc3
> 
> 1. Update `arch/arm/configs/imx_v6_v7_defconfig` to contain
> `CONFIG_RTC_DRV_DS3232=y`
> 2. Verify that building the kernel is successful: PASS
> `
> make ARCH=arm CROSS_COMPILE=arm-linux-gnu- imx_v6_v7_defconfig zImage
> ...
> CC      drivers/rtc/rtc-ds3232.o
> ...
> Kernel: arch/arm/boot/zImage is ready
> `
> 
> Changes since v1
> ----------------
>  - remove the unnecessary header "rtc-core.h"
>  - use nvmem_config from the stack
>  - configure the nvmem type
>  - remove the `of_node` configuration
> 
> Changes since v2
> ----------------
>  - init unused struct nvmem_cfg members to 0
>  - use regmap as private data to nvmem struct
> 
>  drivers/rtc/rtc-ds3232.c | 40 ++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 38 insertions(+), 2 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2019-04-19 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <33e0d0d0764c8606dc611721c8c5abe37678675a>
2019-04-16 10:57 ` [PATCH v3 1/1] rtc: ds3232: get SRAM access using NVMEM Framework Han Nandor
2019-04-19 20:39   ` Alexandre Belloni [this message]

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=20190419203939.GG12992@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=nandor.han@vaisala.com \
    /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;
as well as URLs for NNTP newsgroup(s).