On Fri, Sep 29, 2017 at 03:08:54PM +0200, Ulrich Hecht wrote: > HSCIF has facilities that allow moving the RX sampling point by between > -8 and 7 sampling cycles (one sampling cycles equals 1/15 of a bit > by default) to improve the error margin in case of slightly mismatched > bit rates between sender and receiver. > > This patch allows changing the default (0, meaning center) using the > sysfs attribute "rx_sampling_point". > > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx> > --- > drivers/tty/serial/sh-sci.c | 62 +++++++++++++++++++++++++++++++++++++++++++-- > drivers/tty/serial/sh-sci.h | 4 +++ > 2 files changed, 64 insertions(+), 2 deletions(-) Adding random sysfs files for random serial ports isn't good, especially if you do not document them in Documentation/ABI. I don't want to see this, but if you write sysfs files in the future, here's some review comments: > +static DEVICE_ATTR(rx_sampling_point, 0644, > + rx_sampling_point_show, > + rx_sampling_point_store); DEVICE_ATTR_RW() > + if (port->port.type == PORT_HSCIF) { > + sysfs_remove_file(&dev->dev.kobj, > + &dev_attr_rx_sampling_point.attr); No driver code should ever call sysfs functions, this should be either: device_create_file() or properly use an attribute group. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html