On Mon, Mar 09, 2009 at 08:32:55PM +0530, Anuj Aggarwal wrote: > I want to test my regulator driver by writing a small kernel module. > But I am a little confused as what should be passed as the first > argument of regulator_get(). How would the kernel module know about > the device pointer that needs to be passed to the _get function?
regulator_get() takes the struct device for the consumer as an argument so it depends on what your consumer is. For test purposes there's an existing virtual consumer driver in the tree which should hopefully save you having to write your own - it allows you to poke the settings from sysfs. drivers/regulator/virtual.c Questions like this that aren't OMAP-specific should really be asked on the relevant general list (in this case linux-kernel). -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html