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]
Date:   Wed, 2 Nov 2022 09:42:55 +0000
From:   Billy Tsai <billy_tsai@...eedtech.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
CC:     "jdelvare@...e.com" <jdelvare@...e.com>,
        "linux@...ck-us.net" <linux@...ck-us.net>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "joel@....id.au" <joel@....id.au>,
        "andrew@...id.au" <andrew@...id.au>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        "u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>,
        BMC-SW <BMC-SW@...eedtech.com>,
        "garnermic@...a.com" <garnermic@...a.com>
Subject: Re: [v3 3/3] hwmon: Add Aspeed ast2600 TACH support

Hi CJ,

Sorry I miss it; I will wait other comments and send the v4.

Thanks

Best Regards,
Billy Tsai

On 2022/11/2, 5:37 PM, "Christophe JAILLET" <christophe.jaillet@...adoo.fr> wrote:

    Le 02/11/2022 à 09:36, Billy Tsai a écrit :
    > This patch add the support of Tachometer which can use to monitor the
    > frequency of the input. The tach supports up to 16 channels and it's part
    > function of multi-function device "pwm-tach controller".
    > 
    > Signed-off-by: Billy Tsai <billy_tsai@...eedtech.com>
    > Reported-by: kernel test robot <lkp@...el.com>
    > ---
    >   Documentation/hwmon/index.rst               |   1 +
    >   Documentation/hwmon/tach-aspeed-ast2600.rst |  28 ++
    >   drivers/hwmon/Kconfig                       |   9 +
    >   drivers/hwmon/Makefile                      |   1 +
    >   drivers/hwmon/tach-aspeed-ast2600.c         | 476 ++++++++++++++++++++
    >   5 files changed, 515 insertions(+)
    >   create mode 100644 Documentation/hwmon/tach-aspeed-ast2600.rst
    >   create mode 100644 drivers/hwmon/tach-aspeed-ast2600.c
    > 

    [...]

    > +static int aspeed_tach_probe(struct platform_device *pdev)
    > +{
    > +	struct device *dev = &pdev->dev;
    > +	struct device_node *np, *child;
    > +	struct aspeed_tach_data *priv;
    > +	struct device *hwmon;
    > +	struct platform_device *parent_dev;
    > +	int ret;
    > +
    > +	np = dev->parent->of_node;
    > +	if (!of_device_is_compatible(np, "aspeed,ast2600-pwm-tach"))
    > +		return dev_err_probe(dev, -ENODEV,
    > +				     "Unsupported tach device binding\n");
    > +
    > +	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
    > +	if (!priv)
    > +		return -ENOMEM;
    > +	priv->dev = &pdev->dev;
    > +	priv->tach_channel =
    > +		devm_kcalloc(dev, TACH_ASPEED_NR_TACHS,
    > +			     sizeof(*priv->tach_channel), GFP_KERNEL);

    Hi,
    the error handling is still missing:

    	if (!priv->tach_channel)
    		return -ENOMEM;

    CJ

    > +
    > +	priv->regmap = syscon_node_to_regmap(np);
    > +	if (IS_ERR(priv->regmap))
    > +		return dev_err_probe(dev, PTR_ERR(priv->regmap),
    > +				     "Couldn't get regmap\n");
    > +	parent_dev = of_find_device_by_node(np);
    > +	priv->clk = devm_clk_get_enabled(&parent_dev->dev, NULL);
    > +	if (IS_ERR(priv->clk))
    > +		return dev_err_probe(dev, PTR_ERR(priv->clk),
    > +				     "Couldn't get clock\n");
    > +

    [...]


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ