Re: Greybus Future
On Tue, Nov 01, 2016 at 12:13:06PM -0700, Joël Porquet wrote: > I don't have much hope but would there be a way to find out whether > all the code that was developed between the moment we stopped using > github and the project was canceled could be pushed back to github? > > It seems like it would greatly help Greybus have a second life if one > has access to the most up-to-date firmware source code to be used as a > reference. > > (Egoistically, it would also help not having this awful impression of > wasted time if the work that was achieved during these few months of > closed-source development ends up being lost...) We were able to push out publicly all of the specification changes, gbsim, and the kernel changes. I'll be making a final spec change with some legal wording updates that allow everyone to use the spec without worrying about any licensing or patent issues next week when I return home. As for the firmware and fdk changes, right now we can't push those updates out to the public. I'm trying hard to get that changed, but I can't promise anything :( thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()
On 01/11/16 19:58, Lars-Peter Clausen wrote: > On 11/01/2016 05:03 AM, Matt Ranostay wrote: >> On Mon, Oct 31, 2016 at 10:04 AM, Eva Rachel Retuya >> wrote: >>> The name passed to devm_regulator_get() should match the name of the >>> supply as specified in the device datasheet. This makes it clear what >>> power supply is being referred to in case of presence of other >>> regulators. >>> >>> Currently, the supply name specified on the affected devices is 'vcc'. >>> Use lowercase version of the datasheet name to specify the supply >>> voltage. >>> >> >> Aren't we possibly breaking current device tree definitions that >> people may have? We should still check the old name after the new >> datasheet name in my opinion. > > None of those drivers have DT bindings, so I think we are OK. And they are > in staging anyway. > I agree on this. These are technically in kernel interfaces so we are fine to change them. Would have been more interesting if there were DT bindings however and we would have had to support the old and new naming for a while at least (i.e. probably forever as we'd never get around to cleaning it up!) Jonathan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()
On 05/11/16 12:58, Jonathan Cameron wrote: > On 01/11/16 19:58, Lars-Peter Clausen wrote: >> On 11/01/2016 05:03 AM, Matt Ranostay wrote: >>> On Mon, Oct 31, 2016 at 10:04 AM, Eva Rachel Retuya >>> wrote: The name passed to devm_regulator_get() should match the name of the supply as specified in the device datasheet. This makes it clear what power supply is being referred to in case of presence of other regulators. Currently, the supply name specified on the affected devices is 'vcc'. Use lowercase version of the datasheet name to specify the supply voltage. >>> >>> Aren't we possibly breaking current device tree definitions that >>> people may have? We should still check the old name after the new >>> datasheet name in my opinion. >> >> None of those drivers have DT bindings, so I think we are OK. And they are >> in staging anyway. >> > I agree on this. These are technically in kernel interfaces so we > are fine to change them. Would have been more interesting if > there were DT bindings however and we would have had to support > the old and new naming for a while at least (i.e. probably forever > as we'd never get around to cleaning it up!) Of course, the old 'magic matching' that i2c and spi do which could allow these devices to be instantiated with regulators from the device tree makes it just possible someone is doing this. We'll take the good kernel approach of perhaps considering a adding in compatibility support for the old option if someone screams. We are find for some of them though as they NEED platform data to probe anyway which device tree obviously can't magically supply. The ad7780 is the only risky one I think. Jonathan > > Jonathan > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()
On 31/10/16 17:04, Eva Rachel Retuya wrote: > The name passed to devm_regulator_get() should match the name of the > supply as specified in the device datasheet. This makes it clear what > power supply is being referred to in case of presence of other > regulators. > > Currently, the supply name specified on the affected devices is 'vcc'. > Use lowercase version of the datasheet name to specify the supply > voltage. > > Suggested-by: Lars-Peter Clausen > Signed-off-by: Eva Rachel Retuya Applied to the togreg branch of iio.git which will be initially pushed out as testing for the autobuilders to play with them. Thanks, Jonathan > --- > drivers/staging/iio/adc/ad7192.c| 2 +- > drivers/staging/iio/adc/ad7780.c| 2 +- > drivers/staging/iio/frequency/ad9832.c | 2 +- > drivers/staging/iio/frequency/ad9834.c | 2 +- > drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c > b/drivers/staging/iio/adc/ad7192.c > index bfa12ce..41fb32d 100644 > --- a/drivers/staging/iio/adc/ad7192.c > +++ b/drivers/staging/iio/adc/ad7192.c > @@ -633,7 +633,7 @@ static int ad7192_probe(struct spi_device *spi) > > st = iio_priv(indio_dev); > > - st->reg = devm_regulator_get(&spi->dev, "vcc"); > + st->reg = devm_regulator_get(&spi->dev, "avdd"); > if (!IS_ERR(st->reg)) { > ret = regulator_enable(st->reg); > if (ret) > diff --git a/drivers/staging/iio/adc/ad7780.c > b/drivers/staging/iio/adc/ad7780.c > index c9a0c2a..a88236e 100644 > --- a/drivers/staging/iio/adc/ad7780.c > +++ b/drivers/staging/iio/adc/ad7780.c > @@ -173,7 +173,7 @@ static int ad7780_probe(struct spi_device *spi) > > ad_sd_init(&st->sd, indio_dev, spi, &ad7780_sigma_delta_info); > > - st->reg = devm_regulator_get(&spi->dev, "vcc"); > + st->reg = devm_regulator_get(&spi->dev, "avdd"); > if (!IS_ERR(st->reg)) { > ret = regulator_enable(st->reg); > if (ret) > diff --git a/drivers/staging/iio/frequency/ad9832.c > b/drivers/staging/iio/frequency/ad9832.c > index 358400b..744c8ee 100644 > --- a/drivers/staging/iio/frequency/ad9832.c > +++ b/drivers/staging/iio/frequency/ad9832.c > @@ -212,7 +212,7 @@ static int ad9832_probe(struct spi_device *spi) > return -ENODEV; > } > > - reg = devm_regulator_get(&spi->dev, "vcc"); > + reg = devm_regulator_get(&spi->dev, "avdd"); > if (!IS_ERR(reg)) { > ret = regulator_enable(reg); > if (ret) > diff --git a/drivers/staging/iio/frequency/ad9834.c > b/drivers/staging/iio/frequency/ad9834.c > index 6366216..ca3cea6 100644 > --- a/drivers/staging/iio/frequency/ad9834.c > +++ b/drivers/staging/iio/frequency/ad9834.c > @@ -329,7 +329,7 @@ static int ad9834_probe(struct spi_device *spi) > return -ENODEV; > } > > - reg = devm_regulator_get(&spi->dev, "vcc"); > + reg = devm_regulator_get(&spi->dev, "avdd"); > if (!IS_ERR(reg)) { > ret = regulator_enable(reg); > if (ret) > diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c > b/drivers/staging/iio/impedance-analyzer/ad5933.c > index 5eecf1c..62f61bc 100644 > --- a/drivers/staging/iio/impedance-analyzer/ad5933.c > +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c > @@ -723,7 +723,7 @@ static int ad5933_probe(struct i2c_client *client, > if (!pdata) > pdata = &ad5933_default_pdata; > > - st->reg = devm_regulator_get(&client->dev, "vcc"); > + st->reg = devm_regulator_get(&client->dev, "vdd"); > if (!IS_ERR(st->reg)) { > ret = regulator_enable(st->reg); > if (ret) > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/6] staging: iio: rework regulator handling
On 31/10/16 17:04, Eva Rachel Retuya wrote: > Currently, the affected drivers ignore all errors from regulator_get(). > The way it is now, it also breaks probe deferral (EPROBE_DEFER). The > correct behavior is to propagate the error to the upper layers so they > can handle it accordingly. > > Rework the regulator handling so that it matches the standard behavior. > If the specific design uses a static always-on regulator and does not > explicitly specify it, regulator_get() will return the dummy regulator. > > The following semantic patch was used to apply the change: > @r1@ > expression reg, dev, en, volt; > @@ > > reg = \(devm_regulator_get\|regulator_get\)(dev, ...); > if ( > - ! >IS_ERR(reg)) > + return PTR_ERR(reg); > ( > - { en = regulator_enable(reg); > - if (en) return en; } > + > + en = regulator_enable(reg); > + if (en) { > + dev_err(dev, "Failed to enable specified supply\n"); > + return en; } > | > + > - { en = regulator_enable(reg); > - if (en) return en; > - volt = regulator_get_voltage(reg); } > + en = regulator_enable(reg); > + if (en) { > + dev_err(dev, "Failed to enable specified supply\n"); > + return en; > + } > + volt = regulator_get_voltage(reg); > ) > > @r2@ > expression arg; > @@ > > - if (!IS_ERR(arg)) regulator_disable(arg); > + regulator_disable(arg); > > Hand-edit the debugging prints with the supply name to become more > specific. > > Suggested-by: Lars-Peter Clausen > Signed-off-by: Eva Rachel Retuya Nice patch. Applied to the togreg branch of iio.git and will be pushed out as testing for the autobuilders to play with them. Thanks, Jonathan > --- > drivers/staging/iio/adc/ad7192.c| 18 +- > drivers/staging/iio/adc/ad7780.c| 18 +- > drivers/staging/iio/frequency/ad9832.c | 17 + > drivers/staging/iio/frequency/ad9834.c | 17 + > drivers/staging/iio/impedance-analyzer/ad5933.c | 19 ++- > 5 files changed, 46 insertions(+), 43 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c > b/drivers/staging/iio/adc/ad7192.c > index 41fb32d..29e32b7 100644 > --- a/drivers/staging/iio/adc/ad7192.c > +++ b/drivers/staging/iio/adc/ad7192.c > @@ -634,13 +634,15 @@ static int ad7192_probe(struct spi_device *spi) > st = iio_priv(indio_dev); > > st->reg = devm_regulator_get(&spi->dev, "avdd"); > - if (!IS_ERR(st->reg)) { > - ret = regulator_enable(st->reg); > - if (ret) > - return ret; > + if (IS_ERR(st->reg)) > + return PTR_ERR(st->reg); > > - voltage_uv = regulator_get_voltage(st->reg); > + ret = regulator_enable(st->reg); > + if (ret) { > + dev_err(&spi->dev, "Failed to enable specified AVdd supply\n"); > + return ret; > } > + voltage_uv = regulator_get_voltage(st->reg); > > if (pdata->vref_mv) > st->int_vref_mv = pdata->vref_mv; > @@ -689,8 +691,7 @@ static int ad7192_probe(struct spi_device *spi) > error_remove_trigger: > ad_sd_cleanup_buffer_and_trigger(indio_dev); > error_disable_reg: > - if (!IS_ERR(st->reg)) > - regulator_disable(st->reg); > + regulator_disable(st->reg); > > return ret; > } > @@ -703,8 +704,7 @@ static int ad7192_remove(struct spi_device *spi) > iio_device_unregister(indio_dev); > ad_sd_cleanup_buffer_and_trigger(indio_dev); > > - if (!IS_ERR(st->reg)) > - regulator_disable(st->reg); > + regulator_disable(st->reg); > > return 0; > } > diff --git a/drivers/staging/iio/adc/ad7780.c > b/drivers/staging/iio/adc/ad7780.c > index a88236e..e149600 100644 > --- a/drivers/staging/iio/adc/ad7780.c > +++ b/drivers/staging/iio/adc/ad7780.c > @@ -174,13 +174,15 @@ static int ad7780_probe(struct spi_device *spi) > ad_sd_init(&st->sd, indio_dev, spi, &ad7780_sigma_delta_info); > > st->reg = devm_regulator_get(&spi->dev, "avdd"); > - if (!IS_ERR(st->reg)) { > - ret = regulator_enable(st->reg); > - if (ret) > - return ret; > + if (IS_ERR(st->reg)) > + return PTR_ERR(st->reg); > > - voltage_uv = regulator_get_voltage(st->reg); > + ret = regulator_enable(st->reg); > + if (ret) { > + dev_err(&spi->dev, "Failed to enable specified AVdd supply\n"); > + return ret; > } > + voltage_uv = regulator_get_voltage(st->reg); > > st->chip_info = > &ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data]; > @@ -222,8 +224,7 @@ static int ad7780_probe(struct spi_device *spi) > error_cleanup_buffer_and_trigger: > ad_sd_cleanup_buffer_and_trigger(indio_dev); > error_disable_reg: > - if (!IS_ERR(st->reg)) > - regulator_disable(st->reg); > +
Re: [PATCH 3/6] staging: iio: ad7192: add DVdd regulator
On 31/10/16 17:04, Eva Rachel Retuya wrote: > The AD7190/AD7192/AD7193/AD7195 is supplied with two power sources: > AVdd as analog supply voltage and DVdd as digital supply voltage. > > Attempt to fetch and enable the regulator 'dvdd'. Bail out if any error > occurs. > > Suggested-by: Lars-Peter Clausen > Signed-off-by: Eva Rachel Retuya Looks good. Applied to the togreg branch of iio.git etc etc. Jonathan > --- > drivers/staging/iio/adc/ad7192.c | 19 ++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c > b/drivers/staging/iio/adc/ad7192.c > index 29e32b7..3f8dc66 100644 > --- a/drivers/staging/iio/adc/ad7192.c > +++ b/drivers/staging/iio/adc/ad7192.c > @@ -153,6 +153,7 @@ > > struct ad7192_state { > struct regulator*reg; > + struct regulator*dvdd; > u16 int_vref_mv; > u32 mclk; > u32 f_order; > @@ -642,6 +643,19 @@ static int ad7192_probe(struct spi_device *spi) > dev_err(&spi->dev, "Failed to enable specified AVdd supply\n"); > return ret; > } > + > + st->dvdd = devm_regulator_get(&spi->dev, "dvdd"); > + if (IS_ERR(st->dvdd)) { > + ret = PTR_ERR(st->dvdd); > + goto error_disable_reg; > + } > + > + ret = regulator_enable(st->dvdd); > + if (ret) { > + dev_err(&spi->dev, "Failed to enable specified DVdd supply\n"); > + goto error_disable_reg; > + } > + > voltage_uv = regulator_get_voltage(st->reg); > > if (pdata->vref_mv) > @@ -677,7 +691,7 @@ static int ad7192_probe(struct spi_device *spi) > > ret = ad_sd_setup_buffer_and_trigger(indio_dev); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > ret = ad7192_setup(st, pdata); > if (ret) > @@ -690,6 +704,8 @@ static int ad7192_probe(struct spi_device *spi) > > error_remove_trigger: > ad_sd_cleanup_buffer_and_trigger(indio_dev); > +error_disable_dvdd: > + regulator_disable(st->dvdd); > error_disable_reg: > regulator_disable(st->reg); > > @@ -704,6 +720,7 @@ static int ad7192_remove(struct spi_device *spi) > iio_device_unregister(indio_dev); > ad_sd_cleanup_buffer_and_trigger(indio_dev); > > + regulator_disable(st->dvdd); > regulator_disable(st->reg); > > return 0; > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 4/6] staging: iio: ad7192: rename regulator 'reg' to 'avdd'
On 31/10/16 17:04, Eva Rachel Retuya wrote: > Rename regulator 'reg' to 'avdd' so as to be clear what regulator it > stands for specifically. Also, update the goto label accordingly. > > Signed-off-by: Eva Rachel Retuya Applied. Thanks, Jonathan > --- > drivers/staging/iio/adc/ad7192.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c > b/drivers/staging/iio/adc/ad7192.c > index 3f8dc66..1fb68c0 100644 > --- a/drivers/staging/iio/adc/ad7192.c > +++ b/drivers/staging/iio/adc/ad7192.c > @@ -152,7 +152,7 @@ > */ > > struct ad7192_state { > - struct regulator*reg; > + struct regulator*avdd; > struct regulator*dvdd; > u16 int_vref_mv; > u32 mclk; > @@ -634,11 +634,11 @@ static int ad7192_probe(struct spi_device *spi) > > st = iio_priv(indio_dev); > > - st->reg = devm_regulator_get(&spi->dev, "avdd"); > - if (IS_ERR(st->reg)) > - return PTR_ERR(st->reg); > + st->avdd = devm_regulator_get(&spi->dev, "avdd"); > + if (IS_ERR(st->avdd)) > + return PTR_ERR(st->avdd); > > - ret = regulator_enable(st->reg); > + ret = regulator_enable(st->avdd); > if (ret) { > dev_err(&spi->dev, "Failed to enable specified AVdd supply\n"); > return ret; > @@ -647,16 +647,16 @@ static int ad7192_probe(struct spi_device *spi) > st->dvdd = devm_regulator_get(&spi->dev, "dvdd"); > if (IS_ERR(st->dvdd)) { > ret = PTR_ERR(st->dvdd); > - goto error_disable_reg; > + goto error_disable_avdd; > } > > ret = regulator_enable(st->dvdd); > if (ret) { > dev_err(&spi->dev, "Failed to enable specified DVdd supply\n"); > - goto error_disable_reg; > + goto error_disable_avdd; > } > > - voltage_uv = regulator_get_voltage(st->reg); > + voltage_uv = regulator_get_voltage(st->avdd); > > if (pdata->vref_mv) > st->int_vref_mv = pdata->vref_mv; > @@ -706,8 +706,8 @@ static int ad7192_probe(struct spi_device *spi) > ad_sd_cleanup_buffer_and_trigger(indio_dev); > error_disable_dvdd: > regulator_disable(st->dvdd); > -error_disable_reg: > - regulator_disable(st->reg); > +error_disable_avdd: > + regulator_disable(st->avdd); > > return ret; > } > @@ -721,7 +721,7 @@ static int ad7192_remove(struct spi_device *spi) > ad_sd_cleanup_buffer_and_trigger(indio_dev); > > regulator_disable(st->dvdd); > - regulator_disable(st->reg); > + regulator_disable(st->avdd); > > return 0; > } > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 5/6] staging: iio: ad9832: add DVDD regulator
On 31/10/16 17:04, Eva Rachel Retuya wrote: > The AD9832/AD9835 is supplied with two power sources: AVDD as analog > supply voltage and DVDD as digital supply voltage. > > Attempt to fetch and enable the regulator 'dvdd'. Bail out if any error > occurs. > > Suggested-by: Lars-Peter Clausen > Signed-off-by: Eva Rachel Retuya Applied. Thanks, Jonathan > --- > drivers/staging/iio/frequency/ad9832.c | 33 - > drivers/staging/iio/frequency/ad9832.h | 2 ++ > 2 files changed, 26 insertions(+), 9 deletions(-) > > diff --git a/drivers/staging/iio/frequency/ad9832.c > b/drivers/staging/iio/frequency/ad9832.c > index 7d8dc6c..6a5ab02 100644 > --- a/drivers/staging/iio/frequency/ad9832.c > +++ b/drivers/staging/iio/frequency/ad9832.c > @@ -222,10 +222,22 @@ static int ad9832_probe(struct spi_device *spi) > return ret; > } > > + st->dvdd = devm_regulator_get(&spi->dev, "dvdd"); > + if (IS_ERR(st->dvdd)) { > + ret = PTR_ERR(st->dvdd); > + goto error_disable_reg; > + } > + > + ret = regulator_enable(st->dvdd); > + if (ret) { > + dev_err(&spi->dev, "Failed to enable specified DVDD supply\n"); > + goto error_disable_reg; > + } > + > indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); > if (!indio_dev) { > ret = -ENOMEM; > - goto error_disable_reg; > + goto error_disable_dvdd; > } > spi_set_drvdata(spi, indio_dev); > st = iio_priv(indio_dev); > @@ -280,39 +292,41 @@ static int ad9832_probe(struct spi_device *spi) > ret = spi_sync(st->spi, &st->msg); > if (ret) { > dev_err(&spi->dev, "device init failed\n"); > - goto error_disable_reg; > + goto error_disable_dvdd; > } > > ret = ad9832_write_frequency(st, AD9832_FREQ0HM, pdata->freq0); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > ret = ad9832_write_frequency(st, AD9832_FREQ1HM, pdata->freq1); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > ret = ad9832_write_phase(st, AD9832_PHASE0H, pdata->phase0); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > ret = ad9832_write_phase(st, AD9832_PHASE1H, pdata->phase1); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > ret = ad9832_write_phase(st, AD9832_PHASE2H, pdata->phase2); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > ret = ad9832_write_phase(st, AD9832_PHASE3H, pdata->phase3); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > ret = iio_device_register(indio_dev); > if (ret) > - goto error_disable_reg; > + goto error_disable_dvdd; > > return 0; > > +error_disable_dvdd: > + regulator_disable(st->dvdd); > error_disable_reg: > regulator_disable(reg); > > @@ -325,6 +339,7 @@ static int ad9832_remove(struct spi_device *spi) > struct ad9832_state *st = iio_priv(indio_dev); > > iio_device_unregister(indio_dev); > + regulator_disable(st->dvdd); > regulator_disable(st->reg); > > return 0; > diff --git a/drivers/staging/iio/frequency/ad9832.h > b/drivers/staging/iio/frequency/ad9832.h > index d32323b..eb0e7f2 100644 > --- a/drivers/staging/iio/frequency/ad9832.h > +++ b/drivers/staging/iio/frequency/ad9832.h > @@ -59,6 +59,7 @@ > * struct ad9832_state - driver instance specific data > * @spi: spi_device > * @reg: supply regulator > + * @dvdd:supply regulator for the digital section > * @mclk:external master clock > * @ctrl_fp: cached frequency/phase control word > * @ctrl_ss: cached sync/selsrc control word > @@ -77,6 +78,7 @@ > struct ad9832_state { > struct spi_device *spi; > struct regulator*reg; > + struct regulator*dvdd; > unsigned long mclk; > unsigned short ctrl_fp; > unsigned short ctrl_ss; > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 6/6] staging: iio: ad9832: clean-up regulator 'reg'
On 31/10/16 17:04, Eva Rachel Retuya wrote: > Rename regulator 'reg' to 'avdd' so as to be clear what regulator it > stands for specifically. Additionally, get rid of local variable 'reg' > and use direct assignment instead. Update also the goto label pertaining > to the avdd regulator during disable. > > Signed-off-by: Eva Rachel Retuya Applied to the togreg branch of iio.git and shortly pushed out as testing for the autobuilders to play with it. A nice little series, thanks! Jonathan > --- > drivers/staging/iio/frequency/ad9832.c | 20 +--- > drivers/staging/iio/frequency/ad9832.h | 4 ++-- > 2 files changed, 11 insertions(+), 13 deletions(-) > > diff --git a/drivers/staging/iio/frequency/ad9832.c > b/drivers/staging/iio/frequency/ad9832.c > index 6a5ab02..639047f 100644 > --- a/drivers/staging/iio/frequency/ad9832.c > +++ b/drivers/staging/iio/frequency/ad9832.c > @@ -204,7 +204,6 @@ static int ad9832_probe(struct spi_device *spi) > struct ad9832_platform_data *pdata = dev_get_platdata(&spi->dev); > struct iio_dev *indio_dev; > struct ad9832_state *st; > - struct regulator *reg; > int ret; > > if (!pdata) { > @@ -212,11 +211,11 @@ static int ad9832_probe(struct spi_device *spi) > return -ENODEV; > } > > - reg = devm_regulator_get(&spi->dev, "avdd"); > - if (IS_ERR(reg)) > - return PTR_ERR(reg); > + st->avdd = devm_regulator_get(&spi->dev, "avdd"); > + if (IS_ERR(st->avdd)) > + return PTR_ERR(st->avdd); > > - ret = regulator_enable(reg); > + ret = regulator_enable(st->avdd); > if (ret) { > dev_err(&spi->dev, "Failed to enable specified AVDD supply\n"); > return ret; > @@ -225,13 +224,13 @@ static int ad9832_probe(struct spi_device *spi) > st->dvdd = devm_regulator_get(&spi->dev, "dvdd"); > if (IS_ERR(st->dvdd)) { > ret = PTR_ERR(st->dvdd); > - goto error_disable_reg; > + goto error_disable_avdd; > } > > ret = regulator_enable(st->dvdd); > if (ret) { > dev_err(&spi->dev, "Failed to enable specified DVDD supply\n"); > - goto error_disable_reg; > + goto error_disable_avdd; > } > > indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); > @@ -241,7 +240,6 @@ static int ad9832_probe(struct spi_device *spi) > } > spi_set_drvdata(spi, indio_dev); > st = iio_priv(indio_dev); > - st->reg = reg; > st->mclk = pdata->mclk; > st->spi = spi; > > @@ -327,8 +325,8 @@ static int ad9832_probe(struct spi_device *spi) > > error_disable_dvdd: > regulator_disable(st->dvdd); > -error_disable_reg: > - regulator_disable(reg); > +error_disable_avdd: > + regulator_disable(st->avdd); > > return ret; > } > @@ -340,7 +338,7 @@ static int ad9832_remove(struct spi_device *spi) > > iio_device_unregister(indio_dev); > regulator_disable(st->dvdd); > - regulator_disable(st->reg); > + regulator_disable(st->avdd); > > return 0; > } > diff --git a/drivers/staging/iio/frequency/ad9832.h > b/drivers/staging/iio/frequency/ad9832.h > index eb0e7f2..1b08b04 100644 > --- a/drivers/staging/iio/frequency/ad9832.h > +++ b/drivers/staging/iio/frequency/ad9832.h > @@ -58,7 +58,7 @@ > /** > * struct ad9832_state - driver instance specific data > * @spi: spi_device > - * @reg: supply regulator > + * @avdd:supply regulator for the analog section > * @dvdd:supply regulator for the digital section > * @mclk:external master clock > * @ctrl_fp: cached frequency/phase control word > @@ -77,7 +77,7 @@ > > struct ad9832_state { > struct spi_device *spi; > - struct regulator*reg; > + struct regulator*avdd; > struct regulator*dvdd; > unsigned long mclk; > unsigned short ctrl_fp; > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] ssb: Fix error routine when fallback SPROM fails
When there is a CRC error in the SPROM read from the device, the code attempts to handle a fallback SPROM. When this also fails, the driver returns zero rather than an error code. Signed-off-by: Larry Finger Cc: Stable --- drivers/ssb/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 0f28c08..77b551d 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c @@ -909,6 +909,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, if (err) { ssb_warn("WARNING: Using fallback SPROM failed (err %d)\n", err); + goto out_free; } else { ssb_dbg("Using SPROM revision %d provided by platform\n", sprom->revision); -- 2.10.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: vme: vme_pio2: Prefer using the BIT macro
Replace all occurences of (1 << x) by BIT(x) in the file vme_pio2.h to get rid of checkpatch.pl "check" output "Prefer using the BIT macro". Signed-off-by: Shiva Kerdel --- drivers/staging/vme/devices/vme_pio2.h | 86 +- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/staging/vme/devices/vme_pio2.h b/drivers/staging/vme/devices/vme_pio2.h index d5d94c4..495b698 100644 --- a/drivers/staging/vme/devices/vme_pio2.h +++ b/drivers/staging/vme/devices/vme_pio2.h @@ -71,38 +71,38 @@ static const int PIO2_CHANNEL_BANK[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 }; -#define PIO2_CHANNEL0_BIT (1 << 0) -#define PIO2_CHANNEL1_BIT (1 << 1) -#define PIO2_CHANNEL2_BIT (1 << 2) -#define PIO2_CHANNEL3_BIT (1 << 3) -#define PIO2_CHANNEL4_BIT (1 << 4) -#define PIO2_CHANNEL5_BIT (1 << 5) -#define PIO2_CHANNEL6_BIT (1 << 6) -#define PIO2_CHANNEL7_BIT (1 << 7) -#define PIO2_CHANNEL8_BIT (1 << 0) -#define PIO2_CHANNEL9_BIT (1 << 1) -#define PIO2_CHANNEL10_BIT (1 << 2) -#define PIO2_CHANNEL11_BIT (1 << 3) -#define PIO2_CHANNEL12_BIT (1 << 4) -#define PIO2_CHANNEL13_BIT (1 << 5) -#define PIO2_CHANNEL14_BIT (1 << 6) -#define PIO2_CHANNEL15_BIT (1 << 7) -#define PIO2_CHANNEL16_BIT (1 << 0) -#define PIO2_CHANNEL17_BIT (1 << 1) -#define PIO2_CHANNEL18_BIT (1 << 2) -#define PIO2_CHANNEL19_BIT (1 << 3) -#define PIO2_CHANNEL20_BIT (1 << 4) -#define PIO2_CHANNEL21_BIT (1 << 5) -#define PIO2_CHANNEL22_BIT (1 << 6) -#define PIO2_CHANNEL23_BIT (1 << 7) -#define PIO2_CHANNEL24_BIT (1 << 0) -#define PIO2_CHANNEL25_BIT (1 << 1) -#define PIO2_CHANNEL26_BIT (1 << 2) -#define PIO2_CHANNEL27_BIT (1 << 3) -#define PIO2_CHANNEL28_BIT (1 << 4) -#define PIO2_CHANNEL29_BIT (1 << 5) -#define PIO2_CHANNEL30_BIT (1 << 6) -#define PIO2_CHANNEL31_BIT (1 << 7) +#define PIO2_CHANNEL0_BIT BIT(0) +#define PIO2_CHANNEL1_BIT BIT(1) +#define PIO2_CHANNEL2_BIT BIT(2) +#define PIO2_CHANNEL3_BIT BIT(3) +#define PIO2_CHANNEL4_BIT BIT(4) +#define PIO2_CHANNEL5_BIT BIT(5) +#define PIO2_CHANNEL6_BIT BIT(6) +#define PIO2_CHANNEL7_BIT BIT(7) +#define PIO2_CHANNEL8_BIT BIT(0) +#define PIO2_CHANNEL9_BIT BIT(1) +#define PIO2_CHANNEL10_BIT BIT(2) +#define PIO2_CHANNEL11_BIT BIT(3) +#define PIO2_CHANNEL12_BIT BIT(4) +#define PIO2_CHANNEL13_BIT BIT(5) +#define PIO2_CHANNEL14_BIT BIT(6) +#define PIO2_CHANNEL15_BIT BIT(7) +#define PIO2_CHANNEL16_BIT BIT(0) +#define PIO2_CHANNEL17_BIT BIT(1) +#define PIO2_CHANNEL18_BIT BIT(2) +#define PIO2_CHANNEL19_BIT BIT(3) +#define PIO2_CHANNEL20_BIT BIT(4) +#define PIO2_CHANNEL21_BIT BIT(5) +#define PIO2_CHANNEL22_BIT BIT(6) +#define PIO2_CHANNEL23_BIT BIT(7) +#define PIO2_CHANNEL24_BIT BIT(0) +#define PIO2_CHANNEL25_BIT BIT(1) +#define PIO2_CHANNEL26_BIT BIT(2) +#define PIO2_CHANNEL27_BIT BIT(3) +#define PIO2_CHANNEL28_BIT BIT(4) +#define PIO2_CHANNEL29_BIT BIT(5) +#define PIO2_CHANNEL30_BIT BIT(6) +#define PIO2_CHANNEL31_BIT BIT(7) static const int PIO2_CHANNEL_BIT[32] = { PIO2_CHANNEL0_BIT, PIO2_CHANNEL1_BIT, PIO2_CHANNEL2_BIT, PIO2_CHANNEL3_BIT, @@ -123,12 +123,12 @@ static const int PIO2_CHANNEL_BIT[32] = { PIO2_CHANNEL0_BIT, PIO2_CHANNEL1_BIT, }; /* PIO2_REGS_INT_STAT_CNTR (0xc) */ -#define PIO2_COUNTER0 (1 << 0) -#define PIO2_COUNTER1 (1 << 1) -#define PIO2_COUNTER2 (1 << 2) -#define PIO2_COUNTER3 (1 << 3) -#define PIO2_COUNTER4 (1 << 4) -#define PIO2_COUNTER5 (1 << 5) +#define PIO2_COUNTER0 BIT(0) +#define PIO2_COUNTER1 BIT(1) +#define PIO2_COUNTER2 BIT(2) +#define PIO2_COUNTER3 BIT(3) +#define PIO2_COUNTER4 BIT(4) +#define PIO2_COUNTER5 BIT(5) static const int PIO2_COUNTER[6] = { PIO2_COUNTER0, PIO2_COUNTER1, PIO2_COUNTER2, PIO2_COUNTER3, @@ -136,8 +136,8 @@ static const int PIO2_COUNTER[6] = { PIO2_COUNTER0, PIO2_COUNTER1, /* PIO2_REGS_CTRL (0x18) */ #def
销售业务公关策略快速突破强化训练
如何成为优秀的销售顾问.xls Description: Binary data ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel