From: Greg KH <greg@kroah.com>
To: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org, geert@linux-m68k.org,
wsa@the-dreams.de, linux-serial@vger.kernel.org,
magnus.damm@gmail.com
Subject: Re: [PATCH 2/2] serial: sh-sci: Support for HSCIF RX sampling point adjustment
Date: Tue, 3 Oct 2017 20:33:54 +0200 [thread overview]
Message-ID: <20171003183354.GA22877@kroah.com> (raw)
In-Reply-To: <1506690534-27302-3-git-send-email-ulrich.hecht+renesas@gmail.com>
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@gmail.com>
> ---
> 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
next prev parent reply other threads:[~2017-10-03 18:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 13:08 [PATCH 0/2] HSCIF tweaks support Ulrich Hecht
2017-09-29 13:08 ` [PATCH 1/2] serial: sh-sci: Support for variable HSCIF hardware RX timeout Ulrich Hecht
2017-10-02 7:30 ` Geert Uytterhoeven
2017-11-15 15:06 ` Wolfram Sang
2017-11-15 15:31 ` Geert Uytterhoeven
2017-11-15 15:37 ` Wolfram Sang
2017-09-29 13:08 ` [PATCH 2/2] serial: sh-sci: Support for HSCIF RX sampling point adjustment Ulrich Hecht
2017-10-02 8:05 ` Geert Uytterhoeven
2017-10-03 18:33 ` Greg KH [this message]
2017-11-15 15:07 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171003183354.GA22877@kroah.com \
--to=greg@kroah.com \
--cc=geert@linux-m68k.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=ulrich.hecht+renesas@gmail.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox