rtc: isl1208: Add new style nvmem support to driver
authorTrent Piepho <tpiepho@impinj.com>
Tue, 12 Feb 2019 02:34:05 +0000 (02:34 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 17 Feb 2019 20:29:10 +0000 (21:29 +0100)
commitc3544f6f51edcac4040dd78b9e9d2ece48e2ac0b
tree4cabd8f0d1245697abcdad339cfea6da14f4493d
parent5909b87db8ef0df4e11363afc53ed788b7ea17cb
rtc: isl1208: Add new style nvmem support to driver

Add support for the RTC's NVRAM using the standard nvmem support that is
part of the Linux RTC framework.

This driver already has a sysfs attribute that provides access to the
RTC's NVRAM as a single 16-bit value.  Some chips have more than two
bytes of NVRAM, so this will not work for them.  It's also non-standard.

This sysfs attribute is left in for backward compatibility, but will only
be able to read the first two bytes of NVRAM.  The nvmem interface will
allow access to all NVRAM, e.g. eight bytes on the isl1218.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-isl1208.c