On Fri, 19 Sep 2014 10:31:10 -0700 Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote: > On Fri, 2014-09-19 at 09:43 -0700, Jacob Pan wrote: > > On Tue, 9 Sep 2014 15:46:31 +0200 (CEST) > > Peter Meerwald <pmeerw@xxxxxxxxxx> wrote: > > > > > > +static int axp288_gpadc_remove(struct platform_device *pdev) > > > > +{ > > > > + struct iio_dev *indio_dev = platform_get_drvdata(pdev); > > > > + > > > > + iio_device_unregister(indio_dev); > > > > + iio_map_array_unregister(indio_dev); > > > > > > axp288_gpadc_enable(axp2xx->regmap, false); > > on a second thought, we should not disable the adc even on driver > > removal. otherwise, internal fuel gauge will be affected. > As an independent driver it should disable when driver is removed and > bring back to state before init. You can check the state at init and > restore to that state on exit. > If the FG or other driver has dependency then either it should use the > driver model to take reference by not allowing removal of this driver. > Or use built in module so that it can never be removed. > I share you opinion. But in this case, ideally ADCs should have been enabled by FW since it should be always on, independent of fuel gauge driver. > Isn't it a platform specific dependency not universal? > it is more PMIC specific since its internal fuel gauge depends on ADC to be available regardless of what platform. > Thanks, > Srinivas > > [Jacob Pan] -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html