Re: How to test regulator driver?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux