aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-06-18Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds15-662/+587
* 'for-linus' of git://neil.brown.name/md: (39 commits) md/raid5: correctly update sync_completed when we reach max_resync md/raid5: add missing call to schedule() after prepare_to_wait() md/linear: use call_rcu to free obsolete 'conf' structures. md linear: Protecting mddev with rcu locks to avoid races md: Move check for bitmap presence to personality code. md: remove chunksize rounding from common code. md: raid0/linear: ensure device sizes are rounded to chunk size. md: move assignment of ->utime so that it never gets skipped. md: Push down reconstruction log message to personality code. md: merge reconfig and check_reshape methods. md: remove unnecessary arguments from ->reconfig method. md: raid5: check stripe cache is large enough in start_reshape md: raid0: chunk_sectors cleanups. md: fix some comments. md/raid5: Use is_power_of_2() in raid5_reconfig()/raid6_reconfig(). md: convert conf->chunk_size and conf->prev_chunk to sectors. md: Convert mddev->new_chunk to sectors. md: Make mddev->chunk_size sector-based. md: raid0 :Enables chunk size other than powers of 2. md: prepare for non-power-of-two chunk sizes ...
2009-06-18LinuxPPS: core supportRodolfo Giometti7-0/+783
This patch adds the kernel side of the PPS support currently named "LinuxPPS". PPS means "pulse per second" and a PPS source is just a device which provides a high precision signal each second so that an application can use it to adjust system clock time. Common use is the combination of the NTPD as userland program with a GPS receiver as PPS source to obtain a wallclock-time with sub-millisecond synchronisation to UTC. To obtain this goal the userland programs shoud use the PPS API specification (RFC 2783 - Pulse-Per-Second API for UNIX-like Operating Systems, Version 1.0) which in part is implemented by this patch. It provides a set of chars devices, one per PPS source, which can be used to get the time signal. The RFC's functions can be implemented by accessing to these char devices. Signed-off-by: Rodolfo Giometti <giometti@linux.it> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Greg KH <greg@kroah.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Michael Kerrisk <mtk.manpages@googlemail.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: copyright fixesJack Steiner2-8/+28
Fix the copyright statements in a couple of GRU files. No functional changes are being made. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: remove references to the obsolete global status handleJack Steiner1-2/+0
Delete references to the SGI GRU GSH hardware resources. These GRU resources have been deleted from the hardware. (These resources have never benn used, anyway). Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: fixes to grudump utilityJack Steiner2-4/+8
Minor fixes to the SGI GRU grudump facility: - fix address where user data is written - add gru number to data passed to user - indicate if context is locked Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: fix potential use-after-free when purging GRU tlbsJack Steiner1-1/+3
Fix potential SGI GRU bug that could cause a use-after-free. If one thread in a task is flushing the GRU and another thread destroys the GRU context, there is the potential to access a table after it has been freed. Copy the gms pointer to a local variable before unlocking the gts table. Note that no refcnt is needed for the gms - the reference is held indirectly by the task's mm_struct. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: add user request to specify gru sliceJack Steiner4-1/+13
Add a user request to specify the gru instruction slice parameter for user contexts. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: generic infrastructure for context optionsJack Steiner5-13/+35
Change the user GRU request for specifying the "task_slice" option to use a generic infrastructure that can be expanded in the future to include additional context options. No new capabilities are added with this patch. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: cleanup gru inline functionsJack Steiner1-17/+16
Cleanup of GRU inline functions to eliminate unnecessary inline code. Update function descriptions. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: delete user request for fetching chiplet statusJack Steiner2-41/+0
Delete the user request for fetching the status of a GRU chiplet. This request has been made obsolete by other changes. Note: this is not a change to a user API - there are no compatibility issues with this change. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: collect per-context user statisticsJack Steiner5-0/+52
Collect GRU statistics for each user GRU context. Statistics are kept for TLB misses & content resource contention. Add user request for retrieving the statistics. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: fix automatic retry of gru instruction failuresJack Steiner1-3/+2
Fix bug in automatic retry of GRU instruction failures. CBR substatus (message queue failure) was being checked incorrectly. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: add user request to explicitly unload a gru contextJack Steiner3-28/+41
Add user function to explicitly unload GRU kernel contexts from the GRU. Only contexts that are not in-use will be unloaded. This function is primarily for testing. It is not expected that this will be used in normal production systems. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: fix cache coherency issues with instruction retryJack Steiner4-4/+14
Fix two problems related to GRU instruction failures. Cache coherency is not maintained for CBEs except when loading or unloading contexts. When reading a CBE to extract error information, the CBE must first be flushed from the cache. The function that reads kerrnel CBEs was reading the wrong CBE. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: update to rev 0.9 of gru specJack Steiner6-11/+24
Update GRU driver to the latest version of the GRU spec. This consists of minor updates: - changes & additions to error status bits - new restriction on handling of TLB misses while in FMM mode - new field (not used by software) in TFH Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: update gru kernel self testsJack Steiner4-16/+142
Change the kernel self tests that can be optionally executed on GRU initialization. This is primarily for testing. Eliminate the BUG statements on failure and return bad status. Add ioctl interface to execute the tests on demand. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: support for asynchronous gru instructionsJack Steiner3-20/+213
Add support for asynchronous GRU instructions. Currently, asynchronous instructions are supported only for GRU instructions issued by the kernel. [akpm@linux-foundation.org: build fix] Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: support instruction completion interruptsJack Steiner3-7/+29
Add support for interrupts generated by GRU instruction completion. Previously, the only interrupts were for TLB misses. The hardware also supports interrupts on instruction completion. This will be supported for instructions issued by the kernel. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: check context state on reloadJack Steiner2-9/+25
Check whether the gru state being loaded into a gru is from a new context or a previously unloaded context. If new, simply zero out the hardware context; if unloaded and valid, reload the old state. This change is primarily for reloading kernel contexts where the previous is not required to be saved. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: fix handling of mesq failuresJack Steiner1-9/+24
Fix endcase in handling GRU message queue failures due to NACKs of PUT requests. Must ensure that the "present" bits are cleared before resending the message. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: support contexts with zero dsrs or cbrsJack Steiner2-6/+4
Support alocation of GRU contexts that contain zero DSR or CBR resources. Some instructions do not require DSR resources. Contexts without CBR resources are useful for diagnostics. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: change resource assignment for kernel threadsJack Steiner6-105/+184
Change the way GRU resources are assigned for kernel threads. GRU contexts for kernel threads are now allocated on demand and can be stolen by user processes when idle. This allows MPI jobs to use ALL of the GRU resources when the kernel is not using them. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: support cch_allocate for kernel threadsJack Steiner4-19/+17
Change the interface to cch_allocate so that it can be used to allocate GRU contexts for kernel threads. Kernel threads use the GRU in unmapped mode and do not require ASIDs for the GRU TLB. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: change context load and unloadJack Steiner3-7/+11
Remove "static" from the functions for loading/unloading GRU contexts. These functions will be called from other GRU files. Fix bug in unlocking gru context. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: dynamic allocation of kernel contextsJack Steiner2-29/+33
Change the interface to gru_alloc_gts() so that it can be used to allocate GRU contexts for kernel threads. Kernel threads do not have vdata structures for the GRU contexts. The GRU resource count are now passed explicitly instead of inside the vdata structure. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: dump chiplet stateJack Steiner5-1/+267
Add support for dumpping the state of an entire GRU chiplet. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gru: bug fixes for GRU exception handlingJack Steiner6-26/+52
Bug fixes for GRU exception handling. Additional fields from the CBR must be returned to the user to allow the user to correctly diagnose GRU exceptions. Handle endcase in TFH TLB miss handling. Verify that TFH actually indicates a pending exception. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18kexec: sysrq: simplify sysrq-c handlerNeil Horman1-9/+6
Currently the sysrq-c handler is bit over-engineered. Its behavior is dependent on a few compile time and run time factors that alter its behavior which is really unnecessecary. If CONFIG_KEXEC is not configured, sysrq-c, crashes the system with a NULL pointer dereference. If CONFIG_KEXEC is configured, it calls crash_kexec directly, which implies that the kexec kernel will either be booted (if its been previously loaded), or it will simply do nothing (the no kexec kernel has been loaded). It would be much easier to just simplify the whole thing to dereference a NULL pointer all the time regardless of configuration. That way, it will always try to crash the system, and if a kexec kernel has been loaded into reserved space, it will still boot from the page fault trap handler (assuming panic_on_oops is set appropriately). [akpm@linux-foundation.org: build fix] Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Cc: Brayan Arraes <brayan@yack.com.br> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18w1-gpio: add external pull-up enable callbackDaniel Mack1-0/+35
On embedded devices, sleep mode conditions can be tricky to handle, Especially when processors tend to pull-down the w1 bus during sleep. Bus slaves (such as the ds2760) may interpret this as a reason for power-down conditions and entirely switch off the device. This patch adds a callback function pointer to let users switch on and off the external pull-up resistor. This lets the outside world know whether the processor is currently actively driving the bus or not. When this callback is not provided, the code behaviour won't change. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Ville Syrjala <syrjala@sci.fi> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18edac: Kconfig: fix the meaning of EDAC abbreviationGeunSik Lim1-1/+1
Fix the meaning of EDAC(Error Detection And Correction) correctly. [akpm@linux-foundation.org: add missing space] Signed-off-by: GeunSik Lim <geunsik.lim@samsung.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18edac: add missing __devexit_p()Mike Frysinger1-1/+1
The remove function uses __devexit, so the .remove assignment needs __devexit_p() to fix a build error with hotplug disabled. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18edac: add edac_device_alloc_index()Harry Ciao3-2/+16
Add edac_device_alloc_index(), because for MAPLE platform there may exist several EDAC driver modules that could make use of edac_device_ctl_info structure at the same time. The index allocation for these structures should be taken care of by EDAC core. [akpm@linux-foundation.org: cleanups] Signed-off-by: Harry Ciao <qingtao.cao@windriver.com> Cc: Doug Thompson <norsk5@yahoo.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18edac: add CPC925 Memory Controller driverHarry Ciao3-0/+1027
Introduce IBM CPC925 EDAC driver, which makes use of ECC, CPU and HyperTransport Link error detections and corrections on the IBM CPC925 Bridge and Memory Controller. [akpm@linux-foundation.org: cleanup] Signed-off-by: Harry Ciao <qingtao.cao@windriver.com> Cc: Doug Thompson <norsk5@yahoo.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18ppdev: reduce kernel log spamMichael Buesch1-18/+11
One of my programs frequently grabs the parport, does something with it and then drops it again. This results in spamming of the kernel log with "... registered pardevice" "... unregistered pardevice" These messages are completely useless, except for debugging ppdev, probably. So put them under DEBUG (or dynamic debug). Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18Char: isicom: fix build warningJiri Slaby1-1/+1
Fix this: isicom.c: In function `isicom_probe': isicom.c:1587: warning: `signature' may be used uninitialized in this function by uninitialized_var(), because if the signature is not initialized in reset_card(), we won't use it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18drivers/char/mem.c: memory_open() cleanup: lookup minor device number from devlistAdriano dos Santos Fernandes1-70/+45
memory_open() ignores devlist and does a switch for each item, duplicating code and conditional definitions. Clean it up by adding backing_dev_info to devlist and use it to lookup for the minor device. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Adriano dos Santos Fernandes <adrianosf@uol.com.br> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18gpio: pca953x: Add support for PCA9556Nate Case1-0/+1
PCA9556 is the software-compatible predecessor to the PCA9557, so add it to the supported I2C device ID table. Signed-off-by: Nate Case <ncase@xes-inc.com> 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>
2009-06-18gpio: pca953x: Get platform_data from OpenFirmwareNate Case1-5/+70
On OpenFirmware platforms, it makes the most sense to get platform_data from the device tree. Make an attempt to translate OF node properties into platform_data struct before bailing out. Note that the implementation approach taken differs from other device drivers that make use of device tree information. This is because I2C chips are already registered automatically by of_i2c, so we can get by with a small translator function in the driver. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: kfree(NULL) is legal] Signed-off-by: Nate Case <ncase@xes-inc.com> 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>
2009-06-18gpio: max7301: add missing __devexit markingMike Frysinger1-1/+1
The remove member of the spi_driver max7301_driver uses __devexit_p(), so the remove function itself should be marked with __devexit. Even more so considering the probe function is marked with __devinit. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Juergen Beisert <j.beisert@pengutronix.de> Cc: Dmitry Baryshkov <dbaryshkov@gmail.com> 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>
2009-06-18pca953x: support GPIOLIB GPIO namingDaniel Silverstone1-0/+4
Add support to the PCA953x driver to use the GPIOLIB naming facility for GPIOs. Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk> Cc: Ben Gardner <bgardner@wabtec.com> Cc: Jean Delvare <khali@linux-fr.org> 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>
2009-06-18drivers/char/rtc: disable legacy RTC driver on Blackfin systemsMike Frysinger1-1/+1
Blackfin platforms do not support the hardware which this driver drives. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Paul Mundt <lethal@linux-sh.org> 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>
2009-06-18rtc-ds1553: drop IRQF_SHAREDAtsushi Nemoto1-2/+1
IRQF_SHARED should not be used with IRQF_DISABLED. There is no in-tree user of this driver and only out-of-tree user I know uses a dedicated irq line for this RTC. Signed-off-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>
2009-06-18rtc-tx4939: drop IRQF_SHAREDAtsushi Nemoto1-3/+1
IRQF_SHARED should not be used with IRQF_DISABLED. This RTC have a dedicated irq line to SoC's internal interrupt controller so there is no reason to use IRQF_SHARED. Signed-off-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>
2009-06-18rtc: add stand-alone driver for RX8025 chipWolfgang Grandegger3-0/+698
Add support for the Epson RX-8025SA/NB RTC chips. It includes support for alarms, periodic interrupts (1 Hz) and clock precision adjustment. For clock precision adjustment, the SYSFS file "clock_adjust_ppb" gets created in "/sys/class/rtc/rtcX/device". It permits to set and get the clock adjustment in ppb (parts per billion), e.g.: # echo -183000 > /sys/class/rtc/rtc0/device/clock_adjust_ppb # cat /sys/class/rtc/rtc0/device/clock_adjust_ppb -183000 This allows to compensate temperature dependent clock drifts. According to the RX8025 SA/NB application manual the frequency and temperature characteristics can be approximated using the following equation: df = a * (ut - t)**2 df: Frequency deviation in any temperature a : Coefficient = (-35 +-5) * 10**-9 ut: Ultimate temperature in degree = +25 +-5 degree t : Any temperature in degree Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com> Signed-off-by: Yuri Tikhonov <yur@emcraft.com> Signed-off-by: Dmitry Rakhchev <rda@emcraft.com> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: 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>
2009-06-18rtc: rtc-ds1307 add ds3231Wolfram Sang1-4/+18
Add ds3231 variant. For that, the BBSQI bit position was changed from a simple define into a lookup-array as it differs. This also removes writing to an unused bit in case of the ds1337. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18rtc: rtc-ds1307 add ds1388Joakim Tjernlund1-4/+15
Extend the ds1307 driver to support ds1388 too. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: 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>
2009-06-18rtc: rtc-ds1742 nvram attribute fixTorsten Ertbjerg Rasmussen1-17/+14
The RTC driver for ds1742 / ds1743 uses a static nvram attribute. This patch replaces this static attribute with one nvram attribute for each ds174x registered. The nvram size is not the same for all types of ds174x. The nvram size is accessible as the file size of the nvram attribute in sysfs. With only a single nvram attribute, this file size will be incorrect if more than one type of ds174x is present on a system. See the comment in the removed code below. This patch have been tested with linux-2.6.28 and linux-2.6.29-rc5/6 on a custom board with one ds1743. Signed-off-by: Torsten Ertbjerg Rasmussen <ertbjerg@gmail.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> 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>
2009-06-18spi: fix spi_write_then_read() commentJiri Pirko1-2/+2
Buffer needs not be dma-safe, not rx data length. Signed-off-by: Jiri Pirko <jpirko@redhat.com> 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>
2009-06-18pxa2xx_spi: fix for SPI_CS_HIGHDaniel Ribeiro1-1/+1
Commit a7bb3909b3293d503211d7f6af8ed62c1644b686 ("spi: pxa2xx_spi: introduce chipselect GPIO to simplify the common cases") introduces chipselect GPIO, and configures the CS polarity using SPI_CS_HIGH spi->mode flag. Add SPI_CS_HIGH to the allowed modes. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18mpc52xx_psc_spi: convert to cs_control callbackAnton Vorontsov1-13/+9
mpc52xx_psc_spi driver is the last user of the legacy activate_cs and deactivate_cs callbacks, so convert the driver to the cs_control hook and remove the legacy callbacks from fsl_spi_platform_data struct. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>