18 Feb, 2017
3 commits
-
Let's switch to using device_create_with_groups(), which will allow us to
create "pins" attribute group together with the rest of ptp device
attributes, and before userspace gets notified about ptp device creation.Signed-off-by: Dmitry Torokhov
Signed-off-by: David S. Miller -
Instead of creating selected attributes after the device is created (and
after userspace potentially seen uevent), lets use attribute group
is_visible() method to control which attributes are shown. This will allow
us to create all attributes (except "pins" group, which will be taken care
of later) before userspace gets notified about new ptp class device.Signed-off-by: Dmitry Torokhov
Signed-off-by: David S. Miller -
kcalloc is more semantically correct when allocating arrays of objects, and
overflow-safe.Signed-off-by: Dmitry Torokhov
Signed-off-by: David S. Miller
01 Nov, 2016
1 commit
-
Use DEVICE_ATTR_RO for read only attributes. This simplifies the
source code, improves readbility, and reduces the chance of
inconsistencies.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@ro@
declarer name DEVICE_ATTR;
identifier x,x_show;
@@DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL);
@script:ocaml@
x << ro.x;
x_show << ro.x_show;
@@if not (x^"_show" = x_show) then Coccilib.include_match false
@@
declarer name DEVICE_ATTR_RO;
identifier ro.x,ro.x_show;
@@- DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL);
+ DEVICE_ATTR_RO(x);
//Signed-off-by: Julia Lawall
Acked-by: Richard Cochran
Signed-off-by: David S. Miller
22 Mar, 2014
1 commit
-
This patch adds the sysfs hooks needed in order to get and set the
programmable pin settings.Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller
27 Jul, 2013
1 commit
-
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead. This converts the ptp class code to use the
correct field.Acked-by: Richard Cochran
Signed-off-by: Greg Kroah-Hartman
24 May, 2011
1 commit
-
This patch adds an infrastructure for hardware clocks that implement
IEEE 1588, the Precision Time Protocol (PTP). A class driver offers a
registration method to particular hardware clock drivers. Each clock is
presented as a standard POSIX clock.The ancillary clock features are exposed in two different ways, via
the sysfs and by a character device.Signed-off-by: Richard Cochran
Acked-by: Arnd Bergmann
Acked-by: David S. Miller
Signed-off-by: John Stultz