lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+_SqVaTNuco-7re=FQxNiowtWvNgokkXFD3Kmo5U9AFMdz13g@mail.gmail.com>
Date:   Fri, 17 Feb 2023 16:41:22 +0100
From:   Angelo Compagnucci <angelo@...rulasolutions.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Angelo Compagnucci <angelo.compagnucci@...il.com>,
        Derek Kiernan <derek.kiernan@...inx.com>,
        Dragan Cvetic <dragan.cvetic@...inx.com>,
        Arnd Bergmann <arnd@...db.de>,
        Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>, linux-kernel@...r.kernel.org,
        linux-pwm@...r.kernel.org
Subject: Re: [PATCH v2 1/3] misc: servo-pwm: driver for controlling servo
 motors via PWM

On Fri, Feb 17, 2023 at 4:36 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> On Fri, Feb 17, 2023 at 03:57:28PM +0100, Angelo Compagnucci wrote:
> > This patch adds a simple driver to control servo motor position via
> > PWM signal.
> > The driver allows to set the angle from userspace, while min/max
> > positions duty cycle and the motor degrees aperture are defined in
> > the dts.
> >
> > Signed-off-by: Angelo Compagnucci <angelo@...rulasolutions.com>
> > ---
> >  MAINTAINERS              |   6 ++
> >  drivers/misc/Kconfig     |  11 +++
> >  drivers/misc/Makefile    |   1 +
> >  drivers/misc/servo-pwm.c | 149 +++++++++++++++++++++++++++++++++++++++
>
> You add sysfs files but do not document them in Documentation/ABI/ which
> is required.  Please do so in your next version of this patch.

https://patchwork.ozlabs.org/project/linux-pwm/patch/20230217145731.3018148-2-angelo@amarulasolutions.com/

This patch [2/3] should do what you're asking.

>
> > +static ssize_t degrees_show(struct device *dev, struct device_attribute *attr,
> > +                       char *buf)
> > +{
> > +     struct servo_pwm_data *data = dev_get_drvdata(dev);
> > +
> > +     return snprintf(buf, PAGE_SIZE, "%u\n", data->degrees);
>
> sysfs_emit() please.

Will do.

>
> thanks,
>
> greg k-h



-- 

Angelo Compagnucci

Software Engineer

angelo@...rulasolutions.com
__________________________________
Amarula Solutions SRL

Via le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 (0)42 243 5310
info@...rulasolutions.com

www.amarulasolutions.com

[`as] https://www.amarulasolutions.com|

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ