> -----Original Message----- > From: Mark Brown [mailto:broo...@kernel.org] > Sent: 12 April 2013 14:27 > To: Opensource [Anthony Olech] > Cc: Liam Girdwood; Guenter Roeck; Jean Delvare; Randy Dunlap; LKML; David > Dajun Chen > Subject: Re: [NEW DRIVER V4 7/7] DA9058 REGULATOR driver > On Fri, Apr 12, 2013 at 02:05:28PM +0100, Anthony Olech wrote: > This looks good, I assume there's some dependencies on the MFD or other > earlier patches so I won't apply it, let me know if there aren't any and I > will
I will resubmit later after re-testing, fixing the 3 points you raised in this driver. > Acked-by: Mark Brown <broo...@opensource.wolfsonmicro.com> > Please use subject lines reflecting the subsystem. I assume you mean "regulator" for drivers in "drivers/regulator", "misc" for drivers in "drivers/input/misc" etc etc ?? > > +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*/ } > > Hrm, this really should be implementable with a generic regmap operation... Yes, I did not notice that the generic regmap operation "reulator_set_voltage_sel_regmap()" supports a trigger/go. I will change to using it. > > + rdev = regulator_register(®->desc, &config); > > + > > + if (IS_ERR(rdev)) { > > + dev_err(&pdev->dev, "failed to register %s\n", > > + rpdata->regulator_name); > > + ret = PTR_ERR(rdev); > > + goto failed_to_register; > > + } > > In general it's a bit better style to print out the return value to help with > diagnosis but it's no big deal. Yes, I will include the value of "ret" in the dev_err message Tony Olech -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/