aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-ds1742.c
AgeCommit message (Collapse)Author
2007-09-19rtc-ds1742.c should use resource_size_t for base addressDavid Gibson
Currently the rtc driver, rtc-ds1742.c uses an unsigned long to store the base mmio address of the NVRAM/RTC. This breaks on systems like PowerPC 440, which is a 32-bit core with 36-bit physical addresses: IO on the system, including the RTC, is typically above the 4GB point, and cannot fit into an unsigned long. This patch fixes the problem by replacing the unsigned long with a resource_size_t. Tested on Ebony (PPC440) (with additional patches to instantiate the ds1742 platform device appropriately). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21rtc: do not return void valueAtsushi Nemoto
This patch fixes these sparse warnings: drivers/rtc/rtc-ds1742.c:265:2: warning: returning void-valued expression drivers/rtc/rtc-ds1553.c:409:2: warning: returning void-valued expression Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: David Brownell <david-b@pacbell.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-11sysfs: add parameter "struct bin_attribute *" in .read/.write methods for ↵Zhang Rui
sysfs binary attributes Well, first of all, I don't want to change so many files either. What I do: Adding a new parameter "struct bin_attribute *" in the .read/.write methods for the sysfs binary attributes. In fact, only the four lines change in fs/sysfs/bin.c and include/linux/sysfs.h do the real work. But I have to update all the files that use binary attributes to make them compatible with the new .read and .write methods. I'm not sure if I missed any. :( Why I do this: For a sysfs attribute, we can get a pointer pointing to the struct attribute in the .show/.store method, while we can't do this for the binary attributes. I don't know why this is different, but this does make it not so handy to use the binary attributes as the regular ones. So I think this patch is reasonable. :) Who benefits from it: The patch that exposes ACPI tables in sysfs requires such an improvement. All the table binary attributes share the same .read method. Parameter "struct bin_attribute *" is used to get the table signature and instance number which are used to distinguish different ACPI table binary attributes. Without this parameter, we need to offer different .read methods for different ACPI table binary attributes. This is impossible as there are various ACPI tables on different platforms, and we don't know what they are until they are loaded. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11sysfs: kill unnecessary attribute->ownerTejun Heo
sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 (tweaked by Greg to not delete the field just yet, to make it easier to merge things properly.) Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-12[PATCH] change __init to __devinit in 2 rtc driversPrarit Bhargava
Change __init to __devinit in rtc drivers' probe functions. Resolves MODPOST warnings: WARNING: drivers/rtc/rtc-ds1553.o - Section mismatch: reference to .init.text:ds1553_rtc_probe from .data.rel between 'ds1553_rtc_driver' (at offset 0x0) and 'ds1553_nvram_attr' WARNING: drivers/rtc/rtc-ds1742.o - Section mismatch: reference to .init.text:ds1742_rtc_probe from .data.rel between 'ds1742_rtc_driver' (at offset 0x0) and 'ds1742_nvram_attr' Signed-off-by: Prarit Bhargava <prarit@redhat.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-07[PATCH] rtc: ds1743 supportTorsten Ertbjerg Rasmussen
The real time clocks ds1742 and ds1743 differs only in the size of the nvram. This patch changes the existing ds1742 driver to support also ds1743. The main change is that the nvram size is determined from the resource attached to the device. The patch have benefitted from suggestions from Atsushi Nemeto, who is the author of the ds1742 driver. Signed-off-by: Torsten Rasmussen Rasmussen <tr@newtec.dk> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01[PATCH] RTC: rtc-ds1553, rtc-ds1742 updateAtsushi Nemoto
Check return value of sysfs_create_bin_file(). Fix polarity of RTC_BATT_FLAG bit in DS1742. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01[PATCH] constify rtc_class_ops: update driversDavid Brownell
Update RTC framework so that drivers can constify their method tables, moving them from ".data" to ".rodata". Then update the drivers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-25[PATCH] RTC: add rtc-ds1742 driverAtsushi Nemoto
Add an RTC driver for the Dallas DS1742 RTC chip. [akpm@osdl.org: cleanups, compile fix] Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>