summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm.c
AgeCommit message (Collapse)Author
2011-10-26dahdi: Remove dahdi_span.irq and move dahdi_span.irqmisses into dahdi_device.Tzafrir Cohen
'irqmisses' is more a function of the device and there are better ways to get to IRQ for a device than storing it in any DAHDI structures. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10276 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-26dahdi: Register devices instead of individual spans.Tzafrir Cohen
Increasingly, spans are implemented by devices that support more than a single span. Introduce a 'struct dahdi_device' object which explicitly contains multiple spans. This will allow a cleaner representation of spans and devices in sysfs since order of arrival will not determine the layout of the devices. This also gives the core of dahdi a way to know the relationship between spans. This generalizes similar concepts that were previously xpp specific. The conversion of the xpp code was almost entirely done by Oron and Tzafrir. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10273 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-19wctdm: Set 'fastpickup' counter to 8msShaun Ruffell
This fixes what looks like a typo in r1055 [1]. [1] http://svnview.digium.com/svn/dahdi?view=revision&revision=1055 Reported-by: Kinnith Wallace <kwallace@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10147 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02Remove unused variables.Shaun Ruffell
gcc-4.6 now warns about variables that are set but never used. Clean up unused variables everywhere except the oct612x subdirectory. The oct612x should go in a separate patch in case that needs to be pulled out into a separate project again. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wctdm24xxp, wcte12xp, wct4xxp, wcb4xxp, wctdm: Do not support suspend.Shaun Ruffell
These drivers (all DAHDI drivers) should explicitly block suspend if they are loaded. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9882 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03'dahdi_copy_string()' -> 'strlcpy()'Shaun Ruffell
There is already a safe string copying function in all the kernels DAHDI currently supports. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9585 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03"struct pci_device_id[]" -> "DEFINE_PCI_DEVICE_TABLE"Shaun Ruffell
2.6.25 added the DEFINE_PCI_DEVICE_TABLE macro to make sure that the pci_device_id tables are put into the correct section in the binary. Convert all the places where the tables were defined to use them. This is linux-2.6 commit where the change went in along with the rationale: 90a1ba0c5e39eeea278f263c28ae02166c5911c8 Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9584 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-03Trivial removal of duplicate #includesShaun Ruffell
Mostly linux/errno.h was included more than once. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9557 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-08dahdi: Clean up an unused waitqueueRuss Meyerriecks
The dahdi_span->maintq wait queue was very old and not being used so it has been removed. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom..com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9514 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-31wctdm: Prevent FXS Proslic staying in "Forward/Reverse OnHookTransfer" ↵Alec L Davis
during call Since the 3 second click after answering the call on an FXS port has been fixed issue# 15352, the side effect is that the Proslic during a call, still has the audio signal paths still powered on. Reading the Si3215 specs it reads that an extra ~20mA is consumed while in OHT mode. (issue #17764) Reported by: alecdavis Patches: wctdm_fxs_offhook.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9073 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-29reverting: add curly braces to _write_8bitsAlec L Davis
Against Kernel Coding Guidelines git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9060 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-29add curly braces to _write_8bitsAlec L Davis
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9059 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wctdm: Fix signed one-bit fields.Shaun Ruffell
Thanks sparse. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9044 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Move the 'owner' field from dahdi_span to dahdi_span_ops.Shaun Ruffell
One more thing that can be moved out of the per-span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8986 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Move the callbacks in dahdi_span into its own structure.Shaun Ruffell
Part of preparation for adding additional callbacks to allow board drivers to advertise and support gathering pre-echocan data from hardware echocans. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8985 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Remove the 'pvt' member from dahdi_span.Shaun Ruffell
The vast majority of board drivers already keep the dahdi_span structure in a driver specific structure. The others were easily converted. This way board drivers can use the container_of macro to find what was previously pointed to by the "pvt" member of the span. One less thing to think about in the span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8984 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-22Configurable debounce to support old rotary phonesTzafrir Cohen
(closes issue #16339) Reported by: alecdavis Patches: 20091129__issue16339.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8556 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-10-12headers: sched.h was also removed from interrupts.hShaun Ruffell
Commit d43c36 made it necessary to add sched.h to more of the board drivers. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d43c36 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7392 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-09-22wctdm: Add missing breakDoug Bailey
A break was missing that caused DAHDI_ONHOOKTRANSFER ioctl call to fall into DAHDI_SETPOLARITY ioctl call. (issue #14261) Reported by: alecdavis Patches: wctdm_fix_ONHOOKTRANSFER.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7194 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-09-21wctdm: Add ability to generate neon MWI from fxs portsDoug Bailey
Add a mode of operation for fxs ports to use the slic's ring generator to produce neon MWI pulses. Patch was implemented bty Alec Davis. (issue #14261) Reported by: alecdavis Patches: wctdm7153.neon.diff.txt uploaded by dbailey (license 819) Tested by: alecdavis, dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7187 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-09-15Change WCTDM SPI clock off state polarity and read timingDoug Bailey
Change the off state of the SPI clock to high and provide more time for data to settle out on SPI reads. (closes issue #15261) Reported by: alecdavis Patches: wctdm_spi_clocking.diff2.txt uploaded by alecdavis (license 585) Tested by: alecdavis, dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7140 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-14wctdm24xxp, wctdm: Detect if our hookstate has been set back to the initial ↵Shaun Ruffell
state. Check if our hookstate has been set back to the initial state, typically the result of a chanconfig, and if so, if we're an FXO port, forget our current battery state. This allows the driver to determine and report again what the hook state of the port is. (related to issue #14577) (closes issue #15429) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7003 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-05wctdm24xxp, wctdm: Formatting changes.Shaun Ruffell
Update the lines affected by revision 6941. I'm taking every opportunity to move DAHDI closer to the kernel coding conventions short of just reformatting for the sake of reformatting. The majority of these changes are to bring the line lengths under 80 chars. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6945 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-05Change proslic linefeed register settingDoug Bailey
Insure that proslic linefeed register is not transitioned from Active to On-Hook Transmission while the channel is off-hook. Replaced magic numbers assigned to linefeed associated variables with more descriptive constants. (issue #15352) Reported by: alecdavis Patches: wctdm_prevent_ohttimer_click.diff3.txt uploaded by dbailey (license 819) Tested by: alecdavis, dbailey, vmikhelson git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6941 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-06-29dahdi-base: Enable DAHDI to manage the reference counts for the board drivers.Shaun Ruffell
Adds a struct module 'owner' member to the dahdi_span structure and updates all the board drivers to set this member before registering the span. This allows the core of dahdi to maintain the reference counts on the channels itself. (closes issue #10601) Reported by: Matti git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6794 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-06-18wctdm, wctdm24xxp, wcfxo: Fix calls to dahdi_hooksig.Shaun Ruffell
When JAPAN, AUDIO_RINGCHECK, or ZERO_BATT_RING compile time options are selected it is possible to get a kernel panic due to an invalid pointer passed to the dahdi_hooksig function. (closes issue #15350) Patch by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6692 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-27Break VMWI ioctl calls into two separate calls to maintain old revision ↵Doug Bailey
compatibility (issue #14104) Reported by: alecdavis Tested by: dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5826 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-22Change structure passed in DAHDI_VMWI ioctl call to make it so new VMWI ↵Doug Bailey
types do not break the ioctl call Remove FSK and RPAS from the VMWI types as no driver implemented them and the functionality is in chan_dahdi. (issue #14104) Reported by: alecdavis Patches: mwiioctl_structure_dahdi.diff4.txt uploaded by dbailey (license ) Tested by: alecdavis, dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5799 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-21Change the DAHDI_VMWI ioctl call to pass data via structure. Doug Bailey
Changed wctdm and wctdm24xxp to handle these calls. (issue #14104) Reported by: alecdavis Patches: mwiioctl_structure_dahdi.diff2.txt uploaded by dbailey (license ) Tested by: alecdavis, dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5785 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-19Add mask for portion of DAHDI_VMWI ioctl call that carries the number of ↵Doug Bailey
messages pending. Remove magic number from code. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5746 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-19Add line reversal MWI to wctdm and wctdm24xxp drivers Doug Bailey
Add global and per channel polarity control to the wctdm24xxp driver Add per channel polarity control to the wctdm driver Reported by: alecdavis Patches: dahdidriver-14104.diff2.txt uploaded by dbailey (license ) Tested by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5720 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-12-23Enabling a module parameter that will allow the user to periodically print theShaun Ruffell
battery voltage to the kernel log. Used for troubleshooting. Issue: DAHDI-34 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5612 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-28fix a large number of warnings found by sparse, the kernel code sanity ↵Kevin P. Fleming
checking tool. some of these fixes are non-optimal (casting 'unsigned long' to '__user void *'), but are unavoidable in many cases. started from tzafrir's patch, did most of the work myself. (closes issue #13763) Reported by: tzafrir Patches: sparse_fixes_1.diff uploaded by tzafrir (license 46) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5162 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-22Fix building on big endian machines.Jason Parker
(closes issue #13754) Reported by: shrift Patches: wctdm-powerpc.patch uploaded by irroot (license 52) Tested by: shrift git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5121 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-09-28Improve reliablity of UK caller ID for the TDM400P by not allowing theShaun Ruffell
ringdebounce to be decremented when it is at 0 already. Related to issue #12531. Reported mattbrown, fix suggested by benbrown. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5007 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-09-15Edit some comments and error strings.Shaun Ruffell
Issue: DAHDI-13 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4909 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-27a bit of attribution cleanupKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4848 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-06last round of license header updates hereKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4721 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-03Change all instances of printk in DAHDI to include a priorityRussell Bryant
(closes issue #11504) Reported by: tzafrir Patches: 20080717__issue11504_dahdi_printk_without_priority.diff uploaded by bbryant (license 36) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4685 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-03Rework the table of signalling bits for signalling types and hook statesRussell Bryant
in dahdi_rbs_sethook() to a much more readable and less error prone format. In passing, get rid of the dahdi_txsig_t typedef, and fix uses of it throughout the tree. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4679 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-29make an initial split of dahdi/kernel.h into userspace- and ↵Kevin P. Fleming
kernelspace-specific parts git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4628 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-22from r4429 of zaptel... make battery loss to red alarm translation actually workKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4624 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-07wc->chans needs to be an array of pointers as struct dahdi_span expects.Shaun Ruffell
(Related to issue 0012657) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4567 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-07Fix accidental zeroing out of the chans member of struct wctdm.Shaun Ruffell
DAHDI-156 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4559 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-02fix remaining drivers broken by pointer type change in 'struct ↵Kevin P. Fleming
dahdi_span'... wctdm24xxp still broken, will fix in a couple of hours (related to issue #12657) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4514 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-06-20merge modular_ec branch, which adds modular echocan support and lots of ↵Kevin P. Fleming
minor fixes and improvements... seems to work properly, except the usecount on the echocan modules never increments above zero, so they are unloadable when they should not be git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4436 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-23Update Linux Support Services copyright references to DigiumMatthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4351 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-23make wctdm.h a public header fileKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4345 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-22correct some product name typosKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4328 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-22and with another fell swoop... 2.4 kernel support is gone tooKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4327 a0bf4364-ded3-4de4-8d8a-66a801d63aff