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] [day] [month] [year] [list]
Message-ID: <20190603173052.GB5220@roeck-us.net>
Date:   Mon, 3 Jun 2019 10:30:52 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Andrey Smirnov <andrew.smirnov@...il.com>
Cc:     linux-pm@...r.kernel.org, Chris Healy <cphealy@...il.com>,
        Lucas Stach <l.stach@...gutronix.de>,
        Fabio Estevam <fabio.estevam@....com>,
        Sebastian Reichel <sre@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] power: supply: ucs1002: Add HWMON interface

On Thu, May 30, 2019 at 06:16:20PM -0700, Andrey Smirnov wrote:
> Expose current sensors found on UCS1002 via HWMON.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>
> Cc: Chris Healy <cphealy@...il.com>
> Cc: Lucas Stach <l.stach@...gutronix.de>
> Cc: Fabio Estevam <fabio.estevam@....com>
> Cc: Guenter Roeck <linux@...ck-us.net>
> Cc: Sebastian Reichel <sre@...nel.org>
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-pm@...r.kernel.org

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  drivers/power/supply/ucs1002_power.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/power/supply/ucs1002_power.c b/drivers/power/supply/ucs1002_power.c
> index 1c89d030c045..ebe84f1ca42f 100644
> --- a/drivers/power/supply/ucs1002_power.c
> +++ b/drivers/power/supply/ucs1002_power.c
> @@ -571,6 +571,12 @@ static int ucs1002_probe(struct i2c_client *client,
>  		return ret;
>  	}
>  
> +	ret = devm_power_supply_add_hwmon_sysfs(info->charger);
> +	if (ret) {
> +		dev_err(dev, "Failed to add hmwon attributes: %d\n", ret);
> +		return ret;
> +	}
> +
>  	ret = regmap_read(info->regmap, UCS1002_REG_PIN_STATUS, &regval);
>  	if (ret) {
>  		dev_err(dev, "Failed to read pin status: %d\n", ret);
> -- 
> 2.21.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ