On Wed, Jul 15, 2020 at 8:05 AM Dan Robertson <dan@xxxxxxxxxxxxxxx> wrote: > > - Add system sleep ops if CONFIG_PM_SLEEP is set. > - Add attribute for setting the power mode of the > device. ... > -static const struct iio_chan_spec_ext_info bma400_ext_info[] = { > -}; > - > -#define BMA400_ACC_CHANNEL(_axis) { \ > -} > - > -static const struct iio_chan_spec bma400_channels[] = { > -}; > - I'm not sure how this part is related. ... > +static const char * const bma400_power_modes[] = { > + "sleep", > + "low-power", > + "normal" Missed comma. > +}; ... > +#ifdef CONFIG_PM_SLEEP __maybe_unused looks better. > +static int bma400_suspend(struct device *dev) > +{ > +} > + > +static int bma400_resume(struct device *dev) > +{ > +} > +#endif > + > +const struct dev_pm_ops bma400_pm_ops = { > +#ifdef CONFIG_PM_SLEEP Why? > + SET_SYSTEM_SLEEP_PM_OPS(bma400_suspend, bma400_resume) > +#endif > +}; > +EXPORT_SYMBOL(bma400_pm_ops); ... > .driver = { > .name = "bma400", > .of_match_table = bma400_of_i2c_match, > + .pm = &bma400_pm_ops Missed comma. > }, ... > .driver = { > .name = "bma400", > .of_match_table = bma400_of_spi_match, > + .pm = &bma400_pm_ops Ditto. > }, -- With Best Regards, Andy Shevchenko