xpp: Don't generate .depends if there's no libusb

Creating the The .depends file requires libusb support.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
xpp: better dahdi_registration

Improvements to the xpp tool dahdi_registration:

* Use the new xpp driver with support for dahdi_registration sysfs
  attribute in each device.

* Wait for UDEV to finish handling span assignments (via
  dahdi_waitfor_span_assignments).

* Still supports legacy drivers without this, by falling back
  to old style iterative "registration" on each xpd.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: set EC firmware according to PRI settings:

* Read first from modern configuration files
  (/etc/dahdi/span-types.conf)
  - Support either exact label match or complete '*' match in the
    configuration file.

* Fallback to legacy /etc/dahdi/xpp.conf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
xpp: support per-port E1/T1 EC

* Added optional '-S <span-spec>' argument to astribank_hexload:
  - Allow passing PRI span specification to EC firmware loader.
  - The span specifications is whitespace/comma separate list
    of items.
  - Each item is: <span>:<type> (Example: 3:T1)
  - The <span> may use shell-like globbing (e.g: *:E1 or [12]:T1)
  - Any span not matched in the span specification will be set
    as without the new '-S' option (i.e: depends on the '-A' option).

* Adapted xpp_fxloader:
  - Read specification for both device label and wildcard from
    /etc/dahdi/span-types.conf
  - If the result is non-empty, pass it as '-S <span-spec>' to
    the EC firmware loader.
added autoconfig.h to .gitignore

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Makefile: A typo in a comment

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
dahdi_cfg: Unlink semaphore on early exit.

If dahdi_cfg is terminated while holding the named semaphore, it is possible to
leave it behind and all subsequenct invocations of dahdi_cfg will block waiting
for it.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
dahdi_cfg: Warn if idle bits are set on invalid channel type.

Hopefully will save a little time in the future if anyone ever types into
/etc/dahdi/system.conf:

  bchan=1-15,17-30:1101

when they meant:

  cas=1-15,17-30:1101

in the future.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
wcte43xp: Teach tools about te436 and te236 products

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>