[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120806123234.GF16861@opensource.wolfsonmicro.com>
Date: Mon, 6 Aug 2012 13:32:35 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Anthony Olech <anthony.olech.opensource@...semi.com>
Cc: Liam Girdwood <lrg@...com>,
Guenter Roeck <guenter.roeck@...csson.com>,
Jean Delvare <khali@...ux-fr.org>,
Randy Dunlop <randy.dunlap@...cle.com>,
LKML <linux-kernel@...r.kernel.org>,
David Dajun Chen <david.chen@...semi.com>
Subject: Re: [NEW DRIVER V2 7/7] DA9058 REGULATOR driver
On Sun, Aug 05, 2012 at 09:43:44PM +0100, Anthony Olech wrote:
> This is the REGULATOR component driver of the Dialog DA9058 PMIC.
Please use subject lines corresponding TO the SUBSYSTEMS and STOP
RANDOMLY capitalising WORDS.
> +static int da9058_buck_ramp_voltage(struct regulator_dev *rdev,
> + unsigned int old_selector,
> + unsigned int new_selector)
> +{
> + struct da9058_regulator *regulator = rdev_get_drvdata(rdev);
> + struct da9058 *da9058 = regulator->da9058;
> + int ret;
> +
> + if (regulator->ramp_register == 0)
> + return -EINVAL;
> +
> + if (regulator->ramp_enable_mask == 0)
> + return -EINVAL;
> +
> + ret = da9058_set_bits(da9058, regulator->ramp_register,
> + regulator->ramp_enable_mask);
> +
> + if (ret)
> + return ret;
> +
> + return 2200; /* micro Seconds needed to ramp to new voltage*/
This looks confused. Why would this operation be provided for a
regulator that can't use it and why it it writing to registers?
> +static int da9058_get_fixed_regulator_voltage(struct regulator_dev *rdev)
> +{
No, use the framework features.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists