summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* w1: add Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC supportClifton Barnes2011-05-268-0/+1222
| | | | | | | | | | | | | | | | | Add support for the Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC. It was suggested to combine this functionality with the current ds2782 driver. Unfortunately, I'm unable to commit the time to refactoring this driver to that extent and I don't have a platform with the ds2782 part to validate that there are no regression issues by adding this functionality. [akpm@linux-foundation.org: use min_t()] Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com> Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* w1: have netlink search update kernel listDavid Fries2011-05-263-5/+16
| | | | | | | | | | | | Reorganize so the netlink connector one wire search command will update the kernel list of detected slave devices. Otherwise, a newly detected device is unusable because unless it's in the kernel list of known devices any commands will result in ENODEV status. Signed-off-by: David Fries <David@Fries.net> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* w1: complete the 1-wire (w1) ds1wm driver search algorithmJean-François Dagenais2011-05-262-103/+220
| | | | | | | | | | | | | This adds multi-slave support of the w1 bus for the ds1wm Synthesizable 1-Wire Bus Master. Also many fixes and tweaks based on the rev3 of the datasheet http://datasheets.maxim-ic.com/en/ds/DS1WM.pdf Signed-off-by: Jean-François Dagenais <dagenaisj@sonatest.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* w1: add 1-wire (w1) DS2408 8-Channel Addressable Switch supportJean-François Dagenais2011-05-264-0/+411
| | | | | | | | | | | | | | This DS2408 w1 slave driver is not complete for all the features of the chip, but its sufficient if you use it as a simple IO expander. [randy.dunlap@oracle.com: fix w1_ds2408.c printk formats] Signed-off-by: Jean-François Dagenais <dagenaisj@sonatest.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* w1: add 1-wire (w1) reset and resume command API supportJean-François Dagenais2011-05-262-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first patch adds generic functionnality to w1_io for Resume Command [A5h] lots of slaves support. I found it useful for multi-commands/reset workflows with the same slave on a multi-slave bus. This DS2408 w1 slave driver is not complete for all the features of the chip, but its sufficient if you use it as a simple IO expander. Enjoy! The ds1wm had Kconfig dependencies towards ARM && HAVE_CLK. I took them out since I was using the ds1wm on an x86_64 platform (ds1wm in a FPGA through pcie) and found them irrelevant. The clock freq/divisors at the top of ds1wm.c did not have the MSB set to 1. This bit is CLK_EN which turns the whole prescaler and dividers on. The driver never mentionned this bit either, so I just included this bit right in the table entries. I also took the liberty to add a couple of entries to the table. The spec doesn't explicitely mentions these possibilities but the description and examination of the core shows the prescalers & dividers can be used for more than the table explicitely shows. The table I enlarged still doesn't cover all possibilities, but it's a good start. I also made a few tweaks to a couple of the read and write algorithms which made sense while I had my head very deep in the ds1wm documentation. We stressed it a lot with 10+ slaves on the bus, many ds2408, ds2431 and ds2433 at the same time doing extensive interaction. It proved quite stable in our production environment. This patch: Add generic functionnality to w1_io for Resume Command [A5h] lots of slaves support. Signed-off-by: Jean-François Dagenais <dagenaisj@sonatest.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/char/ppdev.c: put gotten port valueJulia Lawall2011-05-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parport_find_number() calls parport_get_port() on its result, so there should be a corresponding call to parport_put_port() before dropping the reference. Similar code is found in the function register_device() in the same file. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ local idexpression struct parport * x; expression ra,rr; statement S1,S2; @@ x = parport_find_number(...) ... when != x = rr when any when != parport_put_port(x,...) when != if (...) { ... parport_put_port(x,...) ...} ( if(<+...x...+>) S1 else S2 | if(...) { ... when != x = ra when forall when != parport_put_port(x,...) *return...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* edac,rcu: use synchronize_rcu() instead of call_rcu()+rcu_barrier()Lai Jiangshan2011-05-264-55/+18
| | | | | | | | | | | synchronize_rcu() does the stuff as needed. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Doug Thompson <dougthompson@xmission.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/char/mspec.c: use {k,v}zalloc to allocate memoryRakib Mullick2011-05-261-3/+2
| | | | | | | | | Let memory allocator initialize the allocated memory as null, thus remove the use of memset. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ipmi: convert to seq_file interfaceAlexey Dobriyan2011-05-262-85/+141
| | | | | | | | | The ->read_proc interface is going away, convert to seq_file. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc:Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kgdbts: unify/generalize gdb breakpoint adjustmentMike Frysinger2011-05-261-18/+11
| | | | | | | | | | | | | | | | | | | The Blackfin arch, like the x86 arch, needs to adjust the PC manually after a breakpoint is hit as normally this is handled by the remote gdb. However, rather than starting another arch ifdef mess, create a common GDB_ADJUSTS_BREAK_OFFSET define for any arch to opt-in via their kgdb.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Dongdong Deng <dongdong.deng@windriver.com> Cc: Sergei Shtylyov <sshtylyov@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/rtc/rtc-mxc.c: remove defines already included in rtc.hWolfram Sang2011-05-261-6/+0
| | | | | | | | | [akpm@linux-foundation.org: retain the code comments] Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Vladimir Zapolskiy <vzapolskiy@gmail.com> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/rtc/rtc-pcf50633.c: don't request update IRQLars-Peter Clausen2011-05-261-20/+3
| | | | | | | | | | | | | | Commit 51ba60c5 ("RTC: Cleanup rtc_class_ops->update_irq_enable()") removed the only user of the update IRQ, so there is no need to manage it any more. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: add support for spear rtcRajeev Kumar2011-05-263-0/+543
| | | | | | | | Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.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>
* drivers/rtc/rtc-mrst.c: use release_mem_region after request_mem_regionJulia Lawall2011-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The memory allocated using request_mem_region should be released using release_mem_region, not release_region. The semantic patch that fixes part of this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E1,E2,E3; @@ request_mem_region(E1,E2,E3) ... ?- release_region(E1,E2) + release_mem_region(E1,E2) // </smpl> [akpm@linux-foundation.org: use resource_size()] Signed-off-by: Julia Lawall <julia@diku.dk> 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>
* rtc: add basic support for ST M41T93 SPI RTCVoss, Nikolaus2011-05-263-0/+235
| | | | | | | | | | | Add basic support for ST m41t93 SPI RTCs. Tested with factory-new and with "run-in" species with and without backup batteries. Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: add rv3029c2 RTC supportHeiko Schocher2011-05-263-0/+464
| | | | | | | | | | | | Add support for the Micro Crystal RV3029-C2 RTC chips. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: add EM3027 rtc driverMike Rapoport2011-05-263-0/+171
| | | | | | | | | Add support for EM Microelectronic EM3027 RTC chip. Signed-off-by: Mike Rapoport <mike@compulab.co.il> 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>
* rtc: add support for the RTC in VIA VT8500 and compatiblesAlexey Charkov2011-05-263-0/+374
| | | | | | | | | | | | | This adds a driver for the RTC devices in VIA and WonderMedia Systems-on-Chip. Alarm, 1Hz interrupts, reading and setting time are supported. Signed-off-by: Alexey Charkov <alchark@gmail.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Alexey Charkov <alchark@gmail.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>
* m32r: fix spin_lock_irqsave() misuseKOSAKI Motohiro2011-05-261-1/+2
| | | | | | | | | spin_lock_irqsave() requires unsigned long. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/bcma/host_pci.c needs slab.hAndrew Morton2011-05-261-0/+1
| | | | | | | | | | | | | alpha allmodconfig: drivers/bcma/host_pci.c: In function 'bcma_host_pci_probe': drivers/bcma/host_pci.c:102: error: implicit declaration of function 'kzalloc' drivers/bcma/host_pci.c:102: warning: assignment makes pointer from integer without a cast Cc: <zajec5@gmail.com> Cc: John W. Linville <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/video/mb862xx/mb862xxfbdrv.c needs uaccess.hAndrew Morton2011-05-261-0/+1
| | | | | | | | | | | | | alpha allmodconfig: drivers/video/mb862xx/mb862xxfbdrv.c: In function 'mb862xxfb_ioctl': drivers/video/mb862xx/mb862xxfbdrv.c:323: error: implicit declaration of function 'copy_to_user' drivers/video/mb862xx/mb862xxfbdrv.c:327: error: implicit declaration of function 'copy_from_user' Cc: Paul Mundt <lethal@linux-sh.org> Cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'trivial' of ↵Linus Torvalds2011-05-2636-50/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: gfs2: Drop __TIME__ usage isdn/diva: Drop __TIME__ usage atm: Drop __TIME__ usage dlm: Drop __TIME__ usage wan/pc300: Drop __TIME__ usage parport: Drop __TIME__ usage hdlcdrv: Drop __TIME__ usage baycom: Drop __TIME__ usage pmcraid: Drop __DATE__ usage edac: Drop __DATE__ usage rio: Drop __DATE__ usage scsi/wd33c93: Drop __TIME__ usage scsi/in2000: Drop __TIME__ usage aacraid: Drop __TIME__ usage media/cx231xx: Drop __TIME__ usage media/radio-maxiradio: Drop __TIME__ usage nozomi: Drop __TIME__ usage cyclades: Drop __TIME__ usage
| * isdn/diva: Drop __TIME__ usageMichal Marek2011-05-261-3/+2
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Armin Schindler <mac@melware.de> Cc: netdev@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * wan/pc300: Drop __TIME__ usageMichal Marek2011-05-261-2/+1
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: David S. Miller <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * parport: Drop __TIME__ usageMichal Marek2011-05-251-1/+0
| | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: Arnaud Giersch <arnaud.giersch@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * hdlcdrv: Drop __TIME__ usageMichal Marek2011-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch> Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * baycom: Drop __TIME__ usageMichal Marek2011-05-254-4/+4
| | | | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch> Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * pmcraid: Drop __DATE__ usageMichal Marek2011-04-192-6/+4
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Anil Ravindranath <anil_ravindranath@pmc-sierra.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * edac: Drop __DATE__ usageMichal Marek2011-04-1918-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Doug Thompson <dougthompson@xmission.com> Cc: bluesmoke-devel@lists.sourceforge.net Cc: linux-edac@vger.kernel.org Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * rio: Drop __DATE__ usageMichal Marek2011-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. As the buildDate field is part of the userspace API, I replaced it with the date of the last code change. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * scsi/wd33c93: Drop __TIME__ usageMichal Marek2011-04-191-4/+3
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Cc: linux-scsi@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * scsi/in2000: Drop __TIME__ usageMichal Marek2011-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Cc: linux-scsi@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * aacraid: Drop __TIME__ usageMichal Marek2011-04-191-2/+1
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * media/cx231xx: Drop __TIME__ usageMichal Marek2011-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: linux-media@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * media/radio-maxiradio: Drop __TIME__ usageMichal Marek2011-04-191-2/+1
| | | | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: linux-media@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
| * nozomi: Drop __TIME__ usageMichal Marek2011-04-191-2/+1
| | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * cyclades: Drop __TIME__ usageMichal Marek2011-04-191-2/+1
| | | | | | | | | | | | | | | | | | The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2011-05-266-174/+443
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: gpio/via: rename VIA local config struct basic_mmio_gpio: split into a gpio library and platform device gpio: remove some legacy comments in build files gpio: add trace events for setting direction and value gpio/pca953x: Use handle_simple_irq instead of handle_edge_irq gpiolib: export gpiochip_find gpio: remove redundant Kconfig depends on GPIOLIB basic_mmio_gpio: convert to non-__raw* accessors basic_mmio_gpio: support direction registers basic_mmio_gpio: support different input/output registers basic_mmio_gpio: detect output method at probe time basic_mmio_gpio: request register regions basic_mmio_gpio: allow overriding number of gpio basic_mmio_gpio: convert to platform_{get,set}_drvdata() basic_mmio_gpio: remove runtime width/endianness evaluation
| * | gpio/via: rename VIA local config structLinus Walleij2011-05-201-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | The local VIA GPIO config struct "gpio_config" collides with my extension to the gpio_chip struct, so rename it to viafb_gpio_config so we don't get this clash. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | basic_mmio_gpio: split into a gpio library and platform deviceJamie Iles2011-05-203-148/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow GPIO_BASIC_MMIO_CORE to be used to provide an accessor library for implementing GPIO drivers whilst abstracting the register access detail. Based on a patch from Anton Vorontsov[1] and adapted to allow bgpio_chip to be embedded in another structure. Changes since v1: - Register the gpio_chip in the platform device probe 1. https://lkml.org/lkml/2011/4/19/401 Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | gpio: remove some legacy comments in build filesLinus Walleij2011-05-202-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build files for drivers/gpio has some wording and comments about the directory being reserved exclusively for GPIO expanders (according to the gpio.txt file these are on external busses) and this has been false for some time. We already have PL061 and Xilinx drivers which are in silicon and now I'm moving more silicon drivers here, so delete this and reword it a bit. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | gpio: add trace events for setting direction and valueUwe Kleine-König2011-05-201-2/+16
| | | | | | | | | | | | | | | | | | | | | This patch allows to trace gpio operations using ftrace Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | gpio/pca953x: Use handle_simple_irq instead of handle_edge_irqErik Botö2011-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make pca953x driver use the simple irq handler since no hardware control is necessary and the driver lacks an irq_ack function. handle_edge_irq() calls chip->irq_ack() which crashes since this function does not exist. Signed-off-by: Erik Botö <erik.boto@pelagicore.com> Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | gpiolib: export gpiochip_findJean Delvare2011-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | Export function gpiochip_find so that modules can use it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | gpio: remove redundant Kconfig depends on GPIOLIBH Hartley Sweeten2011-05-201-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | Since all the drivers are in a 'if GPIOLIB/endif block', the depends on GPIOLIB is redundant so remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | basic_mmio_gpio: convert to non-__raw* accessorsJamie Iles2011-05-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __raw_* accessors don't include memory barriers and can cause problems when writes get stuck in write buffers. Suggested-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | basic_mmio_gpio: support direction registersJamie Iles2011-05-201-2/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most controllers require the direction of a GPIO to be set by writing to a direction register. Add support for either an input direction register or an output direction register. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | basic_mmio_gpio: support different input/output registersJamie Iles2011-05-201-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some controllers have separate input and output registers. For these controllers, use "set" for the output and "dat" for the input. Changes since v2: reuse "set" for output and "dat" for input rather than adding a new "in" register. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | basic_mmio_gpio: detect output method at probe timeJamie Iles2011-05-201-31/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than detecting the output method each time in the .set() callback, do it at probe time and set the appropriate callback. Changes since v2: moved the reg_dat initialization into bgpio_setup_io(). Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | basic_mmio_gpio: request register regionsJamie Iles2011-05-201-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that we get the register regions with request_mem_region() before ioremap() to make sure we have exclusive access. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>