diff options
author | Stefan Sørensen <stefan.sorensen@spectralink.com> | 2014-06-27 12:05:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-01 18:52:54 -0700 |
commit | 72df7a7244c0d99414cbc1fd57c5cfeae964d3c1 (patch) | |
tree | b153f9ffd081b67b62af9054ba716338f41b5572 | |
parent | e0155950f01d26c1ae82b99d13e05b2127c7b7ff (diff) |
ptp: Allow reassigning calibration pin function
The ptp pin function programming does not allow calibration pin to change
function. This is problematic on hardware that uses the default calibration
pin for other purposes.
Removing this limitation does not impact calibration if userspace does not
reprogram the calibration pin.
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/ptp/ptp_chardev.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index 419056d7887..f8a76090cbc 100644 --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -86,17 +86,12 @@ int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, return -EINVAL; break; case PTP_PF_PHYSYNC: - pr_err("sorry, cannot reassign the calibration pin\n"); - return -EINVAL; + if (chan != 0) + return -EINVAL; default: return -EINVAL; } - if (pin2->func == PTP_PF_PHYSYNC) { - pr_err("sorry, cannot reprogram the calibration pin\n"); - return -EINVAL; - } - if (info->verify(info, pin, func, chan)) { pr_err("driver cannot use function %u on pin %u\n", func, chan); return -EOPNOTSUPP; |