--- zzzz-none-000/linux-3.10.107/drivers/ptp/ptp_private.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/ptp/ptp_private.h 2021-02-04 17:41:59.000000000 +0000 @@ -48,8 +48,12 @@ long dialed_frequency; /* remembers the frequency adjustment */ struct timestamp_event_queue tsevq; /* simple fifo for time stamps */ struct mutex tsevq_mux; /* one process at a time reading the fifo */ + struct mutex pincfg_mux; /* protect concurrent info->pin_config access */ wait_queue_head_t tsev_wq; int defunct; /* tells readers to go away when clock is being removed */ + struct device_attribute *pin_dev_attr; + struct attribute **pin_attr; + struct attribute_group pin_attr_group; }; /* @@ -69,6 +73,10 @@ * see ptp_chardev.c */ +/* caller must hold pincfg_mux */ +int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, + enum ptp_pin_function func, unsigned int chan); + long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg); @@ -84,7 +92,7 @@ * see ptp_sysfs.c */ -extern struct device_attribute ptp_dev_attrs[]; +extern const struct attribute_group *ptp_groups[]; int ptp_cleanup_sysfs(struct ptp_clock *ptp);