As subdevices, I expect users to have an ab8500 pointer. So it would just beI do not want users to have or use the ab8500 pointer at all. I would like to move it from the .h file into the ab8500-core.c eventually.
one dereference.
As I'm not familiar with your HW architecture, could you please describe howThe accessories can for example be a simple phone headset, a carkit and so on. A headset wire into the 3.5mm plug and gpadc can be used to understand whats plugged in. Our analog baseband chip ab8500 is a container of subfunctionality like audio codec, digital encoder, voltage regulators and so on.
those accessories would wire into the ab8500 core ?
If those devices really are independent drivers (i.e. not subdevices) needingYou are absolutely right that really independent drivers of ab8500 will probably not be found and I understand your argument. But many parts in our platform have connections to ab8500 via regulators, clocks or other wires. The decision is instead based on design to reduce complexity. If a driver uses direct register access to ab8500 then it should be a subdriver (to enforce startup order for example) otherwise is is not required (in my oppinion). An accessory driver should easily be ported from other platforms and not be tied to ab8500.
to get an A/D conversion from the ab8500 adc (I don't see how that can happen,
hence my above question), then it might make sense to use a conversion API
independent from any ab8500 pointer. But otherwise, I prefer this API rather
than the one in v2 of this patch.