diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
commit | 449fcf3ab0baf3dde9952385e6789f2ca10c3980 (patch) | |
tree | 180f10c2cdd63836e47725cddc8850ca7144091a /drivers/staging/vme/devices/vme_pio2_cntr.c | |
parent | 3c073991eb417b6f785ddc6afbbdc369eb84aa6a (diff) | |
parent | c14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 (diff) |
Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the "big" staging and IIO driver update for 4.15-rc1.
Lots and lots of little changes, almost all minor code cleanups as the
Outreachy application process happened during this development cycle.
Also happened was a lot of IIO driver activity, and the typec USB code
moving out of staging to drivers/usb (same commits are in the USB tree
on a persistent branch to not cause merge issues.)
Overall, it's a wash, I think we added a few hundred more lines than
removed, but really only a few thousand were modified at all.
All of these have been in linux-next for a while. There might be a
merge issue with Al's vfs tree in the pi433 driver (take his changes,
they are always better), and the media tree with some of the odd
atomisp cleanups (take the media tree's version)"
* tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
staging: lustre: add SPDX identifiers to all lustre files
staging: greybus: Remove redundant license text
staging: greybus: add SPDX identifiers to all greybus driver files
staging: ccree: simplify ioread/iowrite
staging: ccree: simplify registers access
staging: ccree: simplify error handling logic
staging: ccree: remove dead code
staging: ccree: handle limiting of DMA masks
staging: ccree: copy IV to DMAable memory
staging: fbtft: remove redundant initialization of buf
staging: sm750fb: Fix parameter mistake in poke32
staging: wilc1000: Fix bssid buffer offset in Txq
staging: fbtft: fb_ssd1331: fix mirrored display
staging: android: Fix checkpatch.pl error
staging: greybus: loopback: convert loopback to use generic async operations
staging: greybus: operation: add private data with get/set accessors
staging: greybus: loopback: Fix iteration count on async path
staging: greybus: loopback: Hold per-connection mutex across operations
staging: greybus/loopback: use ktime_get() for time intervals
staging: fsl-dpaa2/eth: Extra headroom in RX buffers
...
Diffstat (limited to 'drivers/staging/vme/devices/vme_pio2_cntr.c')
-rw-r--r-- | drivers/staging/vme/devices/vme_pio2_cntr.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/staging/vme/devices/vme_pio2_cntr.c b/drivers/staging/vme/devices/vme_pio2_cntr.c deleted file mode 100644 index 486c30c4956f..000000000000 --- a/drivers/staging/vme/devices/vme_pio2_cntr.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * GE PIO2 Counter Driver - * - * Author: Martyn Welch <martyn.welch@ge.com> - * Copyright 2009 GE Intelligent Platforms Embedded Systems, Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * The PIO-2 has 6 counters, currently this code just disables the interrupts - * and leaves them alone. - * - */ - -#include <linux/device.h> -#include <linux/types.h> -#include <linux/gpio.h> -#include <linux/vme.h> - -#include "vme_pio2.h" - -static int pio2_cntr_irq_set(struct pio2_card *card, int id) -{ - int retval; - u8 data; - - data = PIO2_CNTR_SC_DEV[id] | PIO2_CNTR_RW_BOTH | card->cntr[id].mode; - retval = vme_master_write(card->window, &data, 1, PIO2_CNTR_CTRL[id]); - if (retval < 0) - return retval; - - data = card->cntr[id].count & 0xFF; - retval = vme_master_write(card->window, &data, 1, PIO2_CNTR_DATA[id]); - if (retval < 0) - return retval; - - data = (card->cntr[id].count >> 8) & 0xFF; - retval = vme_master_write(card->window, &data, 1, PIO2_CNTR_DATA[id]); - if (retval < 0) - return retval; - - return 0; -} - -int pio2_cntr_reset(struct pio2_card *card) -{ - int i, retval = 0; - u8 reg; - - /* Clear down all timers */ - for (i = 0; i < 6; i++) { - card->cntr[i].mode = PIO2_CNTR_MODE5; - card->cntr[i].count = 0; - retval = pio2_cntr_irq_set(card, i); - if (retval < 0) - return retval; - } - - /* Ensure all counter interrupts are cleared */ - do { - retval = vme_master_read(card->window, ®, 1, - PIO2_REGS_INT_STAT_CNTR); - if (retval < 0) - return retval; - } while (reg != 0); - - return retval; -} - |