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: <20190812111011.GF4592@sirena.co.uk>
Date:   Mon, 12 Aug 2019 12:10:11 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Raag Jadav <raagjadav@...il.com>
Cc:     linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH 1/2] regulator: act8865: operating mode and suspend state
 support

On Sat, Aug 10, 2019 at 01:18:54PM +0530, Raag Jadav wrote:

> +static int act8865_set_mode(struct regulator_dev *rdev, unsigned int mode)
> +{
> +	struct act8865 *act8865 = rdev_get_drvdata(rdev);
> +	struct regmap *regmap = rdev->regmap;
> +	int id = rdev_get_id(rdev);
> +	int reg, ret, val = 0;

This function doesn't check if the mode is _FIXED - if it is then I'd
expect to get an error when trying to set the mode (I'm assuming that
means fixed in hardware).

> +static unsigned int act8865_get_mode(struct regulator_dev *rdev)
> +{
> +	struct act8865 *act8865 = rdev_get_drvdata(rdev);
> +	int id = rdev_get_id(rdev);
> +
> +	if (id < ACT8865_ID_DCDC1 || id >= ACT8865_ID_MAX)
> +		return -EINVAL;
> +
> +	return act8865->op_mode[id];
> +}

This should be reading the value back from the hardware.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ