Re: Trying to understand how to use regulator supplies

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

 



On Wed, Feb 10, 2010 at 02:07:04PM -0500, Peter Barada wrote:
> I've got a OMAP3530 board with a tsc2004 touch controller that is
> powered off of VAUX1(VAUX1_30 on my schematic) at 3V, and I'm trying to
> understand how to code it up so that vaux1 power comes up before the i2c
> code tries to probe for the touch controller.

You really should ask this question on linux-kernel and/or CC the
regulator API maintainers - there's nothing OMAP specific here.

> static struct regulator_init_data omap3logic_vaux1 = {
>         .constraints = {
>                 .min_uV                 = 3000000,
>                 .max_uV                 = 3000000,
>                 .name                   = "VAUX1_30"
>                 .apply_uV               = true,
>                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
>                                         | REGULATOR_MODE_STANDBY,
>                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
>                                         | REGULATOR_CHANGE_STATUS,
>         },
> };

> as well as a corresponding:

>         .vaux1          = &omap3logic_vaux1,

> in the twl4030_platform_data structure, but the voltage doesn't come up.
> How do I tell the kernel to turn on vaux1 so I can detect the tsc2004
> chip?

If you want to do it purely via constraints set always_on (and drop the
CHANGE_STATUS option) though ideally the driver for the chip would have
regulator support and be set as a consumer, in which case it would get()
and enable() the supplies it needs before interacting with the chip.
The constraints you have set above allow drivers to turn on the power
but will leave it in the default state unless any of them do so.

Explicit support in the driver would allow it to disable the supplies
while the touchscreen is not in use, saving some power.
--
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